Practical overview
When it fits
Use ModelCache when building an LLM service that could benefit from reusing results for similar requests, or when evaluating cache write, query and clear operations before integrating a cache into an application.
Who it is for
- Developers adding semantic response caching to an LLM-backed application.
- Teams evaluating a demo cache using SQLite and FAISS.
- Operators configuring the standard service with MySQL and Milvus.
Documented uses
- Store pre-generated LLM query-and-answer pairs.
- Query the cache for a result matching a request within a model scope.
- Clear cached entries by model.
- Start a demo or standard cache service, including a Docker Compose setup.
Requirements & limits
- The demo uses SQLite and FAISS; the standard service requires MySQL and Milvus.
- Both documented service paths require a downloaded embedding-model file in model/text2vec-base-chinese.
- The standard service requires importing the provided SQL file and configuring MySQL and Milvus access.
- Docker Compose startup requires creating a Docker network named modelcache.
- The README lists certain extensions, including FastAPI support and additional model-loading compatibility, as todo items.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Start the SQLite and FAISS demo service
Set up the documented demo service as a basis for exploring ModelCache.
Before you start
- Python 3.8 or later
- Project dependencies installed from requirements.txt
- Embedding model bin file placed in model/text2vec-base-chinese
Steps
Download the embedding model file referenced by the README and place it in model/text2vec-base-chinese.
Install dependencies with pip install -r requirements.txt.
From the repository directory, start the demo with python flask4modelcache_demo.py.
Expected outcome
The demo backend service starts using embedded SQLite and FAISS, without separate database configuration.
Guide limitations
- This guide covers service startup; it does not establish successful execution or application integration.
- The demo uses SQLite and FAISS; the standard service has separate MySQL and Milvus requirements.
Start ModelCache with Docker Compose
Start the cache service using the repository's documented Docker Compose setup.
Before you start
- Docker Compose
- Embedding model bin file placed in model/text2vec-base-chinese
Steps
Download the embedding model file referenced by the README and place it in model/text2vec-base-chinese.
From the repository directory, create the Docker network with docker network create modelcache.
Run docker-compose up --build when the image is not local or the Dockerfile has changed; otherwise run docker-compose up.
Expected outcome
The repository's Docker Compose service startup is initiated.
Guide limitations
- The README does not specify deployment environment details.
- This guide covers startup commands, not verification of deployment or integration.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 5 November 2026
- Original website title
- codefuse-ai/ModelCache · Official homepage title · retained in its source language

