diff --git a/README.md b/README.md index b940336..3f7e44e 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,151 @@ res = requests.post(url, headers=headers, json=json.dumps(data)) Coming soon... ## modules ![modelcache modules](docs/modelcache_modules_en.png) +## Function-Comparison +In terms of functionality, we have made several changes to the git repository. Firstly, we have addressed the network issues with huggingface and enhanced the inference speed by introducing local inference capabilities for embeddings. Additionally, considering the limitations of the SqlAlchemy framework, we have completely revamped the module responsible for interacting with relational databases, enabling more flexible database operations. In practical scenarios, LLM products often require integration with multiple users and multiple models. Hence, we have added support for multi-tenancy in the ModelCache, while also making preliminary compatibility adjustments for system commands and multi-turn dialogue. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ModuleFunction
ModelCacheGPTCache
Basic InterfaceData query interface
Data writing interface
EmbeddingEmbedding model configuration
Large model embedding layer
BERT model long text processing
Large model invocationDecoupling from large models
Local loading of embedding model
Data isolationModel data isolation
Hyperparameter isolation
DatabasesMySQL
Milvus
OceanBase
Session managementSingle-turn dialogue
System commands
Multi-turn dialogue
Data managementData persistence
One-click cache clearance
Tenant managementSupport for multi-tenancy
Milvus multi-collection capability
OtherLong-short dialogue distinction
+ + + + ## Core-Features 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: diff --git a/README_CN.md b/README_CN.md index bddb1c1..680b4f3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -90,6 +90,149 @@ res = requests.post(url, headers=headers, json=json.dumps(data)) 敬请期待 ## 架构大图 ![modelcache modules](docs/modelcache_modules.png) +## 功能对比 +功能方面,为了解决huggingface网络问题并提升推理速度,增加了embedding本地推理能力。鉴于SqlAlchemy框架存在一些限制,我们对关系数据库交互模块进行了重写,以更灵活地实现数据库操作。在实践中,大型模型产品需要与多个用户和多个模型对接,因此在ModelCache中增加了对多租户的支持,同时也初步兼容了系统指令和多轮会话。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块功能
ModelCacheGPTCache
基础接口数据查询接口
数据写入接口
Embeddingembedding模型配置
大模型embedding层
bert模型长文本处理
Large model invocation是否与大模型解耦
embeddingg模型本地加载
数据隔离模型数据隔离
超参数隔离
数据库MySQL
Milvus
OceanBase
会话管理单轮回话
system指令
多轮回话
数据管理数据持久化
一键清空缓存
租户管理支持多租户(多模型)
milvus多表能力
其他长短对话区分能力
+ + + ## 核心功能 在ModelCache中,沿用了GPTCache的主要思想,包含了一系列核心模块:adapter、embedding、similarity和data_manager。adapter模块主要功能是处理各种任务的业务逻辑,并且能够将embedding、similarity、data_manager等模块串联起来;embedding模块主要负责将文本转换为语义向量表示,它将用户的查询转换为向量形式,并用于后续的召回或存储操作;rank模块用于对召回的向量进行相似度排序和评估;data_manager模块主要用于管理数据库。同时,为了更好的在工业界落地,我们做了架构和功能上的升级,如下: diff --git a/docs/modelcache_modules_en.png b/docs/modelcache_modules_en.png index 5356fd1..180a94a 100644 Binary files a/docs/modelcache_modules_en.png and b/docs/modelcache_modules_en.png differ