OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Infrastructure & Serving

Modelcache

ModelCache is a self-hosted Python semantic caching system for large language model services. It stores query-result pairs and provides REST operations to write, query and clear cache entries, with a goal of reusing results for similar requests to reduce response time.

Independent OpenViST project profile, based on linked sources.

Modelcache — Developers who need cache operations exposed through a REST service
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Download the embedding model file referenced by the README and place it in model/text2vec-base-chinese.

  2. Install dependencies with pip install -r requirements.txt.

  3. 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.
Source-based practical guide

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

  1. Download the embedding model file referenced by the README and place it in model/text2vec-base-chinese.

  2. From the repository directory, create the Docker network with docker network create modelcache.

  3. 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.
Evidence and transparency

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