Skip to content

Commit 9f30f51

Browse files
authored
更新 ChatGLM3 离线包 (#49)
* Update download_model.py * Update download_model.py * Update test_models.py * Update requirements.txt * Update download_model.py * Update requirements.txt * Update app_fastapi.py * Update README.md * Update README.md * Update download_model.py * Update README.md
1 parent 02fe5f2 commit 9f30f51

5 files changed

+14
-23
lines changed

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,22 @@
1717

1818
| 名称 | 大小 | 百度网盘 | 备注 |
1919
| ---- |---------| ---- | ---- |
20-
| **小显存离线包** | 5.3 GB | [点击下载](https://pan.baidu.com/s/1NgY-i2CXh50vAEhr9N-1EQ?pwd=cglm) | 使用 ChatGLM-6B-int4 权重的离线包,显存需求 8GB |
21-
| 大显存离线包 | 11.8 GB | [点击下载](https://pan.baidu.com/s/19Sx8pBm-BesSQMPd9Zymug?pwd=cglm) | 使用 ChatGLM-6B 权重的离线包,显存需求 16GB |
22-
| 环境离线包 | 2.6 GB | [点击下载](https://pan.baidu.com/s/1Es-Sr8tpc17q69W_RkrlsA?pwd=cglm) | 不带权重的离线包,启动之后可以自动下载模型,默认自动下载 ChatGLM-6B 权重。 |
20+
| **小显存离线包** | 5.3 GB | [点击下载](https://pan.baidu.com/s/1fI1JWBE7KP7cJsoD-dL38g?pwd=cglm) | chatglm2-6b-int4 离线包,显存需求 8GB |
21+
| 大显存离线包 | 11.5 GB | [点击下载](https://pan.baidu.com/s/10oUwW2DUMDFk3RuIkaqGbA?pwd=cglm) | chatglm3-6b 离线包,显存需求 16GB |
22+
| 长文本离线包 | 11.5 GB | [点击下载](https://pan.baidu.com/s/1kbeTdPcUmYd16IE0stXnTA?pwd=cglm) | chatglm3-6b-128k 离线包,显存需求 16GB |
23+
| 环境离线包 | 2.6 GB | [点击下载](https://pan.baidu.com/s/1Kt9eZlgXJ03bVwIM22IR6w?pwd=cglm) | 不带权重的环境包,启动之后自动下载 chatglm2-6b-int4 权重。 |
2324

24-
除了这些离线一键环境之外,你还可以在下面下载一些模型的权重,包括 `THUDM/chatglm-6b` 系列、`silver/chatglm-6b-slim` 系列、`BelleGroup/BELLE` 系列
25+
除了这些一键环境包之外,你还可以在下面下载更多模型的权重
2526

2627
* 百度网盘链接:[https://pan.baidu.com/s/1pnIEj66scZOswHm8oivXmw?pwd=cglm](https://pan.baidu.com/s/1pnIEj66scZOswHm8oivXmw?pwd=cglm)
2728

2829
下载好环境包之后,解压,然后运行 `start_offline.bat` 脚本,即可启动服务:
2930

30-
<img width="734" alt="企业微信截图_16822982234979" src="https://user-images.githubusercontent.com/10473170/229680404-0b28dfd4-382e-4cfc-9392-997f134c0242.png">
31+
![Snipaste_2024-04-07_16-14-54](https://github.com/ypwhs/CreativeChatGLM/assets/10473170/7ab0c0e8-9ada-43ad-b237-ba0f2008bdac)
3132

3233
如果你想使用 API 的形式来调用,可以运行 `start_offline_api.bat` 启动 API 服务:
3334

34-
<img width="734" alt="企业微信截图_16822982234979" src="https://user-images.githubusercontent.com/10473170/233877877-1a0a1daf-2cf1-41d1-9cd8-7f2ad8cb2427.png">
35+
![Snipaste_2024-04-07_16-16-01](https://github.com/ypwhs/CreativeChatGLM/assets/10473170/959c1742-da2e-4b37-b40f-6fb96c53ab89)
3536

3637
## 虚拟环境
3738

app_fastapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# 加载模型
1313
# model_name = 'THUDM/chatglm-6b'
14-
model_name = 'THUDM/chatglm-6b-int4'
14+
model_name = 'THUDM/chatglm3-6b'
1515

1616
if 'chatglm' in model_name.lower():
1717
from predictors.chatglm_predictor import ChatGLM

download_model.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,11 @@
1515
'THUDM/chatglm2-6b-int4',
1616

1717
'THUDM/chatglm3-6b',
18-
19-
# 'BelleGroup/BELLE-LLAMA-7B-2M-gptq',
20-
# 'BelleGroup/BELLE-7B-gptq',
21-
# 'BelleGroup/BELLE-LLAMA-7B-2M',
22-
# 'BelleGroup/BELLE-7B-2M',
18+
'THUDM/chatglm3-6b-128k',
2319

2420
# 'silver/chatglm-6b-slim',
2521
# 'silver/chatglm-6b-int4-slim',
2622
# 'silver/chatglm-6b-int4-qe-slim',
27-
28-
# 'fnlp/moss-moon-003-base',
29-
# 'fnlp/moss-moon-003-sft',
30-
# 'fnlp/moss-moon-003-sft-plugin',
31-
# 'fnlp/moss-moon-003-sft-int4',
32-
# 'fnlp/moss-moon-003-sft-plugin-int4'
3323
]
3424

3525
for model_name in model_name_list:

requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
protobuf~=3.20.0
2-
transformers~=4.35.2
2+
transformers~=4.36.2
33
icetk~=0.0.4
44
cpm_kernels~=1.0.11
55
torch>=1.10
6-
gradio~=4.8.0
6+
gradio~=4.25.0
77
numpy~=1.23.0
8-
accelerate~=0.25.0
8+
accelerate~=0.29.1
99
mdtex2html~=1.2.0
1010
sentencepiece~=0.1.97
1111
uvicorn~=0.19.0
12-
fastapi~=0.85.2
12+
fastapi~=0.110.1
1313
requests~=2.27.1

test_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def test_model(model_name):
3838

3939
def main():
4040
model_list = [
41-
'THUDM/chatglm2-6b',
4241
'THUDM/chatglm2-6b-int4',
4342
'THUDM/chatglm3-6b',
43+
'THUDM/chatglm3-6b-128k',
4444
]
4545
for model_name in model_list:
4646
print(f'Testing {model_name}')

0 commit comments

Comments
 (0)