Skip to content

Commit 2367a56

Browse files
authored
Merge pull request #8 from codefuse-ai/modelcache_dev
Modelcache dev
2 parents 2d5e022 + ec17493 commit 2367a56

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

README.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Codefuse-ModelCache
1010
<p>
1111
<a href="https://github.com/codefuse-ai/CodeFuse-ModelCache/blob/main/README_CN.md">中文</a> |
1212
<b>English</b>
13-
<p>
13+
</p>
1414
</h4>
1515
</div>
1616

@@ -93,24 +93,6 @@ Coming soon...
9393
## Function-Comparison
9494
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.
9595

96-
<html>
97-
<head>
98-
<style>
99-
table, th, td {
100-
border-collapse: collapse;
101-
text-align: left;
102-
padding: 10px;
103-
margin-left: 20px;
104-
margin-right: 20px;
105-
}
106-
.checkmark {
107-
font-size: 24px;
108-
}
109-
110-
</style>
111-
</head>
112-
<body>
113-
11496
<table>
11597
<tr>
11698
<th rowspan="2">Module</th>
@@ -232,8 +214,6 @@ table, th, td {
232214
</tr>
233215
</table>
234216

235-
</body>
236-
</html>
237217

238218
## Core-Features
239219
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:

README_CN.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,6 @@ res = requests.post(url, headers=headers, json=json.dumps(data))
9292
![modelcache modules](docs/modelcache_modules_20231114.png)
9393
## 功能对比
9494
功能方面,为了解决huggingface网络问题并提升推理速度,增加了embedding本地推理能力。鉴于SqlAlchemy框架存在一些限制,我们对关系数据库交互模块进行了重写,以更灵活地实现数据库操作。在实践中,大型模型产品需要与多个用户和多个模型对接,因此在ModelCache中增加了对多租户的支持,同时也初步兼容了系统指令和多轮会话。
95-
<html>
96-
<head>
97-
<style>
98-
table, th, td {
99-
border-collapse: collapse;
100-
text-align: left;
101-
padding: 8px;
102-
margin-left: 20px;
103-
margin-right: 20px;
104-
}
105-
.checkmark {
106-
font-size: 24px;
107-
}
108-
109-
</style>
110-
</head>
111-
<body>
11295

11396
<table>
11497
<tr>
@@ -231,8 +214,6 @@ table, th, td {
231214
</tr>
232215
</table>
233216

234-
</body>
235-
</html>
236217
## 核心功能
237218
在ModelCache中,沿用了GPTCache的主要思想,包含了一系列核心模块:adapter、embedding、similarity和data_manager。adapter模块主要功能是处理各种任务的业务逻辑,并且能够将embedding、similarity、data_manager等模块串联起来;embedding模块主要负责将文本转换为语义向量表示,它将用户的查询转换为向量形式,并用于后续的召回或存储操作;rank模块用于对召回的向量进行相似度排序和评估;data_manager模块主要用于管理数据库。同时,为了更好的在工业界落地,我们做了架构和功能上的升级,如下:
238219

0 commit comments

Comments
 (0)