Skip to content

Commit

Permalink
feat:llm support for chatglm2 (#271)
Browse files Browse the repository at this point in the history
Add support for ChatGLM2-6B,which is the second-generation version of
the open-source bilingual (Chinese-English) chat model
[ChatGLM-6B](https://github.com/THUDM/ChatGLM-6B).
  • Loading branch information
Aries-ckt authored Jun 25, 2023
2 parents 0558a8b + aa4115e commit 8a54ae7
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ As large models are released and iterated upon, they are becoming increasingly i
DB-GPT is an experimental open-source project that uses localized GPT large models to interact with your data and environment. With this solution, you can be assured that there is no risk of data leakage, and your data is 100% private and secure.

## News
- [2023/06/25]🔥support chatglm2-6b model. [documents](https://db-gpt.readthedocs.io/en/latest/modules/llms.html)
- [2023/06/14] support gpt4all model, which can run at M1/M2, or cpu machine. [documents](https://db-gpt.readthedocs.io/en/latest/modules/llms.html)
- [2023/06/01]🔥 On the basis of the Vicuna-13B basic model, task chain calls are implemented through plugins. For example, the implementation of creating a database with a single sentence.[demo](./assets/auto_plugin.gif)
- [2023/06/01]🔥 QLoRA guanaco(7b, 13b, 33b) support.
- [2023/05/28]🔥 Learning from crawling data from the Internet [demo](./assets/chaturl_en.gif)
- [2023/05/28] Learning from crawling data from the Internet [demo](./assets/chaturl_en.gif)
- [2023/05/21] Generate SQL and execute it automatically. [demo](./assets/auto_sql_en.gif)
- [2023/05/15] Chat with documents. [demo](./assets/new_knownledge_en.gif)
- [2023/05/06] SQL generation and diagnosis. [demo](./assets/demo_en.gif)
Expand Down
1 change: 1 addition & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DB-GPT 是一个开源的以数据库为基础的GPT实验项目,使用本地


## 最新发布
- [2023/06/25]🔥 支持ChatGLM2-6B模型。 [使用文档](https://db-gpt.readthedocs.io/projects/db-gpt-docs-zh-cn/zh_CN/latest/modules/llms.html)
- [2023/06/14]🔥 支持gpt4all模型,可以在M1/M2 或者CPU机器上运行。 [使用文档](https://db-gpt.readthedocs.io/projects/db-gpt-docs-zh-cn/zh_CN/latest/modules/llms.html)
- [2023/06/01]🔥 在Vicuna-13B基础模型的基础上,通过插件实现任务链调用。例如单句创建数据库的实现.
- [2023/06/01]🔥 QLoRA guanaco(原驼)支持, 支持4090运行33B
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
copyright = "2023, csunny"
author = "csunny"

version = "👏👏 0.2.2"
version = "👏👏 0.2.3"
html_title = project + " " + version

# -- General configuration ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/getting_started/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Once the environment is installed, we have to create a new folder "models" in th
git clone https://huggingface.co/Tribbiani/vicuna-13b
git clone https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2
git clone https://huggingface.co/GanymedeNil/text2vec-large-chinese
git clone https://huggingface.co/THUDM/chatglm2-6b
```

The model files are large and will take a long time to download. During the download, let's configure the .env file, which needs to be copied and created from the .env.template
Expand Down
2 changes: 1 addition & 1 deletion docs/locales/zh_CN/LC_MESSAGES/modules/llms.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: DB-GPT 0.1.0\n"
"Project-Id-Version: DB-GPT 0.2.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-14 22:33+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
6 changes: 6 additions & 0 deletions docs/modules/llms.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ if you want use other model, such as chatglm-6b, you just need update .env confi
```
LLM_MODEL=chatglm-6b
```
or chatglm2-6b, which is the second-generation version of the open-source bilingual (Chinese-English) chat model ChatGLM-6B.
```
LLM_MODEL=chatglm2-6b
```



## Run Model with cpu.
we alse support smaller models, like gpt4all. you can use it with cpu/mps(M1/M2), Download from [gpt4all model](https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin)
Expand Down
2 changes: 2 additions & 0 deletions pilot/configs/model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"codet5p-2b": os.path.join(MODEL_PATH, "codet5p-2b"),
"chatglm-6b-int4": os.path.join(MODEL_PATH, "chatglm-6b-int4"),
"chatglm-6b": os.path.join(MODEL_PATH, "chatglm-6b"),
"chatglm2-6b": os.path.join(MODEL_PATH, "chatglm2-6b"),
"chatglm2-6b-int4": os.path.join(MODEL_PATH, "chatglm2-6b-int4"),
"text2vec-base": os.path.join(MODEL_PATH, "text2vec-base-chinese"),
"guanaco-33b-merged": os.path.join(MODEL_PATH, "guanaco-33b-merged"),
"falcon-40b": os.path.join(MODEL_PATH, "falcon-40b"),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def parse_requirements(file_name: str) -> List[str]:
setuptools.setup(
name="DB-GPT",
packages=find_packages(),
version="0.2.2",
version="0.2.3",
author="csunny",
author_email="[email protected]",
description="DB-GPT is an experimental open-source project that uses localized GPT large models to interact with your data and environment."
Expand Down

0 comments on commit 8a54ae7

Please sign in to comment.