• bitcoinBitcoin(BTC)$79,574.00-1.83%
  • ethereumEthereum(ETH)$2,450.86-2.49%
  • tetherTether(USDT)$1.000.02%
  • binancecoinBNB(BNB)$722.60-0.36%
  • rippleXRP(XRP)$1.40-3.54%
  • usd-coinUSDC(USDC)$1.000.01%
  • solanaSolana(SOL)$101.85-1.94%
  • tronTRON(TRX)$0.3318560.88%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.040.53%
  • HyperliquidHyperliquid(HYPE)$83.95-3.03%
  • zcashZcash(ZEC)$1,021.276.91%
  • dogecoinDogecoin(DOGE)$0.084778-2.87%
  • RainRain(RAIN)$0.016417-4.05%
  • moneroMonero(XMR)$532.145.40%
  • USDSUSDS(USDS)$1.00-0.01%
  • chainlinkChainlink(LINK)$11.67-2.30%
  • whitebitWhiteBIT Coin(WBT)$73.10-1.19%
  • leo-tokenLEO Token(LEO)$9.23-0.82%
  • cardanoCardano(ADA)$0.211085-5.31%
  • stellarStellar(XLM)$0.181192-1.37%
  • bitcoin-cashBitcoin Cash(BCH)$247.83-3.35%
  • daiDai(DAI)$1.000.02%
  • Ethena USDeEthena USDe(USDE)$1.000.02%
  • CantonCanton(CC)$0.107845-3.31%
  • USD1USD1(USD1)$1.000.00%
  • litecoinLitecoin(LTC)$52.682.96%
  • uniswapUniswap(UNI)$6.301.01%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.402.01%
  • hedera-hashgraphHedera(HBAR)$0.0793891.49%
  • Global DollarGlobal Dollar(USDG)$1.000.01%
  • avalanche-2Avalanche(AVAX)$7.42-1.21%
  • suiSui(SUI)$0.77-0.40%
  • shiba-inuShiba Inu(SHIB)$0.000005-0.86%
  • nearNEAR Protocol(NEAR)$2.2113.47%
  • paypal-usdPayPal USD(PYUSD)$1.00-0.01%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • tether-goldTether Gold(XAUT)$4,426.42-0.86%
  • crypto-com-chainCronos(CRO)$0.055680-3.61%
  • Circle USYCCircle USYC(USYC)$1.140.04%
  • MemeCoreMemeCore(M)$1.139.39%
  • Ripple USDRipple USD(RLUSD)$1.000.00%
  • okbOKB(OKB)$109.19-0.29%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.140.07%
  • BittensorBittensor(TAO)$227.19-1.50%
  • aaveAave(AAVE)$129.57-3.50%
  • AsterAster(ASTER)$0.731.41%
  • pax-goldPAX Gold(PAXG)$4,433.42-0.89%
  • mantleMantle(MNT)$0.570.97%
  • OndoOndo(ONDO)$0.3725632.30%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.056625-2.81%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Meet GPTCache: A Library for Developing LLM Query Semantic Cache

August 3, 2023
in AI & Technology
Reading Time: 5 mins read
A A
Meet GPTCache: A Library for Developing LLM Query Semantic Cache
ShareShareShareShareShare

ChatGPT and large language models (LLMs) are extremely flexible, allowing for the creation of numerous programs. However, the costs associated with LLM API calls might become significant when the application gains popularity and experiences increased traffic levels. When processing many queries, LLM services may also have lengthy wait periods.

To meet this difficulty head-on, researchers have developed GPTCache, a project aimed at creating a semantic cache for storing LLM answers. An open-source GPTCache program can make LLMs faster by caching their output answers. When the response has been requested before and is already stored in a cache, this can drastically cut down on the time it takes to obtain it.

GPTCache is flexible and simple, making it ideal for any application. It’s compatible with many language learning machines (LLMs), such as OpenAI’s ChatGPT.

How does it work?

To function, GPTCache caches the LLM’s final replies. The cache is a memory buffer used to retrieve recently used information quickly. GPTCache initially looks in the cache to determine if the requested response is already stored there whenever a new request is made to the LLM. If the answer can be found in the cache, it will be returned immediately. The LLM will generate the response and add it to the cache if not already there.

GPTCache’s modular architecture makes it simple to implement bespoke semantic caching solutions. Users can tailor their experience with each module by selecting various settings.

The LLM Adapter unifies the APIs and request protocols used by various LLM models by standardizing them on the OpenAI API. Since the LLM Adapter may move between LLM models without requiring a rewrite of the code or familiarity with a new API, it simplifies testing and experimentation.

The Embedding Generator creates embeddings using the requested model to carry out a similarity search. The OpenAI embedding API can be used with the supported models. This is ONNX using the GPTCache/paraphrase-albert-onnx model, the Hugging Face embedding API, the Cohere embedding API, the fastText embedding API, and the SentenceTransformers embedding API.

In Cache Storage, responses from LLMs like ChatGPT are kept until they can be retrieved. When determining whether or not two entities are semantically similar, cached replies are fetched and sent back to the requesting party. GPTCache is compatible with many different database management systems. Users can pick the database that best meets their requirements regarding performance, scalability, and cost of the most commonly supported databases.

Choices for Vector Store: GPTCache includes a Vector Store module, which uses embeddings derived from the original request to identify the K most similar requests. This feature can be used to determine how similar two requests are. In addition, GPTCache supports multiple vector stores, such as Milvus, Zilliz Cloud, and FAISS, and presents a straightforward interface for working with them. Users are provided with a variety of vector store options, any of which may affect GPTCache’s similarity search performance. With its support for various vector stores, GPTCache promises to be adaptable and meet the needs of a wider variety of use cases.

The GPTCache Cache Manager manages the eviction policies for the Cache Storage and Vector Store components. To create room for new data, a replacement policy decides which old data should be removed from the cache when it fills up.

The information for the Similarity Evaluator comes from both the Cache Storage and the Vector Store sections of GPTCache. It compares the input request to requests in the Vector Store using several different approaches. Whether or not a request is served from the cache depends on the degree of similarity. GPTCache offers a unified interface to similar methods and a library of available implementations. GPTCache’s ability to determine cache matches using a variety of similarity algorithms allows it to become adaptable to a large range of use cases and user requirements.

Features and Benefits

  • Enhanced responsiveness and speed thanks to a decrease in LLM query latency made possible by GPTCache.
  • Cost savings – many thanks to the token- and request-based pricing structure common to many LLM services. GPTCache can cut down on the cost of the service by limiting the number of times the API must be called.
  • Increased scalability thanks to GPTCache’s capacity to offload work from the LLM service. As the number of requests you receive grows, this can help you continue to operate at peak efficiency.
  • Costs associated with creating an LLM application can be kept to a minimum with the aid of GPTCache. Caching data generated by or mocked up in LLM allows you to test your app without making API requests to the LLM service.

GPTCache can be used in tandem with your chosen application, LLM (ChatGPT), cache store (SQLite, PostgreSQL, MySQL, MariaDB, SQL Server, or Oracle), and vector store (FAISS, Milvus, Ziliz Cloud). The goal of the GPTCache project is to make the most efficient use of language models in GPT-based applications by reusing previously generated replies whenever possible rather than starting from blank each time.


Check out the GitHub and Documentation. All Credit For This Research Goes To the Researchers on This Project. Also, don’t forget to join our 27k+ ML SubReddit, 40k+ Facebook Community, Discord Channel, and Email Newsletter, where we share the latest AI research news, cool AI projects, and more.


YOU MAY ALSO LIKE

Google Launches Agentic Video Understanding for Gemini Flash Models, Cutting Video Tokens by Up to 88%

How To See What’s Taking Up Space On Your Windows PC

Dhanshree Shenwai is a Computer Science Engineer and has a good experience in FinTech companies covering Financial, Cards & Payments and Banking domain with keen interest in applications of AI. She is enthusiastic about exploring new technologies and advancements in today’s evolving world making everyone’s life easy.


🔥 Use SQL to predict the future (Sponsored)

Credit: Source link

ShareTweetSendSharePin

Related Posts

Google Launches Agentic Video Understanding for Gemini Flash Models, Cutting Video Tokens by Up to 88%
AI & Technology

Google Launches Agentic Video Understanding for Gemini Flash Models, Cutting Video Tokens by Up to 88%

September 5, 2026
How To See What’s Taking Up Space On Your Windows PC
AI & Technology

How To See What’s Taking Up Space On Your Windows PC

September 4, 2026
The Tetris Company Wants Nothing To Do With The White House’s New Copycat Game
AI & Technology

The Tetris Company Wants Nothing To Do With The White House’s New Copycat Game

September 4, 2026
OpenAI Commits B to Frontline Cyber Defense, Launches MS-ISAC Pilot – Unite.AI
AI & Technology

OpenAI Commits $1B to Frontline Cyber Defense, Launches MS-ISAC Pilot – Unite.AI

September 4, 2026
Next Post
Biggest Competitor Is Still Pen and Paper, HelloSign CEO Says

Biggest Competitor Is Still Pen and Paper, HelloSign CEO Says

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Truck bursts into flames after being struck by lightning

Truck bursts into flames after being struck by lightning

September 1, 2026
‘Cigfluencers’ are pushing smoking on social media against doctors’ orders

‘Cigfluencers’ are pushing smoking on social media against doctors’ orders

September 1, 2026
Researchers from Princeton, Ant Group and Stanford Introduce AQuA: A Two-Part Agentic Framework for Autonomous Factor Discovery and Model Development in Quantitative Finance

Researchers from Princeton, Ant Group and Stanford Introduce AQuA: A Two-Part Agentic Framework for Autonomous Factor Discovery and Model Development in Quantitative Finance

September 1, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!