Skip to content

Latest commit

 

History

History
132 lines (125 loc) · 4.04 KB

1.what-is-model-cache.md

File metadata and controls

132 lines (125 loc) · 4.04 KB

What is ModelCache

In ModelCache, we adopted the main idea of GPTCache, includes core modules: adapter, embedding, similarity, and data_manager. The adapter module is responsible for handling the business logic of various tasks and can connect the embedding, similarity, and data_manager modules. The embedding module is mainly responsible for converting text into semantic vector representations, it transforms user queries into vector form.The rank module is used for sorting and evaluating the similarity of the recalled vectors. The data_manager module is primarily used for managing the database. In order to better facilitate industrial applications, we have made architectural and functional upgrades as follows:

Architecture

modelcache modules

Function comparison

We've implemented several key updates to our repository. We've resolved network issues with Hugging Face and improved inference speed by introducing local embedding capabilities. Due to limitations in SqlAlchemy, we've redesigned our relational database interaction module for more flexible operations. We've added multi-tenancy support to ModelCache, recognizing the need for multiple users and models in LLM products. Lastly, we've made initial adjustments for better compatibility with system commands and multi-turn dialogues.

Module Function
ModelCache GPTCache
Basic Interface Data query interface ☑ ☑
Data writing interface ☑ ☑
Embedding Embedding model configuration ☑ ☑
Large model embedding layer ☑
BERT model long text processing ☑
Large model invocation Decoupling from large models ☑
Local loading of embedding model ☑
Data isolation Model data isolation ☑ ☑
Hyperparameter isolation
Databases MySQL ☑ ☑
Milvus ☑ ☑
OceanBase ☑
Session management Single-turn dialogue ☑ ☑
System commands ☑
Multi-turn dialogue ☑
Data management Data persistence ☑ ☑
One-click cache clearance ☑
Tenant management Support for multi-tenancy ☑
Milvus multi-collection capability ☑
Other Long-short dialogue distinction ☑