Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ChatGLM-6B_fastllm
Commits
3df8baf7
Commit
3df8baf7
authored
Oct 16, 2023
by
zhouxiang
Browse files
增加模型转换所需依赖安装的描述
parent
59ffe699
Pipeline
#593
failed with stages
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
README.md
README.md
+3
-3
requirements.txt
requirements.txt
+3
-0
No files found.
README.md
View file @
3df8baf7
...
@@ -39,7 +39,7 @@ ChatGLM-6B基于GLM架构开发。GLM是一种基于Transformer的语言模型
...
@@ -39,7 +39,7 @@ ChatGLM-6B基于GLM架构开发。GLM是一种基于Transformer的语言模型
在光源可拉取推理的docker镜像,拉取方式如下:
在光源可拉取推理的docker镜像,拉取方式如下:
```
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:
chatglm-6b-dcu-infer-
1.0
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:
glm-ft-v
1.0
```
```
### 容器启动
### 容器启动
...
@@ -49,7 +49,7 @@ docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:chatglm-6b-dcu-infer-
...
@@ -49,7 +49,7 @@ docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:chatglm-6b-dcu-infer-
```
```
# <container_name> 自定义容器名
# <container_name> 自定义容器名
# <project_path> 当前工程所在路径
# <project_path> 当前工程所在路径
docker run -it --name=<container_name> -v <project_path>:/work -w /work --device=/dev/kfd --device=/dev/dri --security-opt seccomp=unconfined --cap-add=SYS_PTRACE --shm-size=16G --group-add 39 image.sourcefind.cn:5000/dcu/admin/base/custom:
chatglm-6b-dcu-infer-
1.0 /bin/bash
docker run -it --name=<container_name> -v <project_path>:/work -w /work --device=/dev/kfd --device=/dev/dri --security-opt seccomp=unconfined --cap-add=SYS_PTRACE --shm-size=16G --group-add 39 image.sourcefind.cn:5000/dcu/admin/base/custom:
glm-ft-v
1.0 /bin/bash
```
```
### 编译方法
### 编译方法
...
@@ -82,7 +82,7 @@ make -j4
...
@@ -82,7 +82,7 @@ make -j4
### ChatGLM原版模型转换
### ChatGLM原版模型转换
```
```
# 将模型转换脚本tools/chatglm_export.py移动到python的ChatGLM-6B环境中
# 将模型转换脚本tools/chatglm_export.py移动到python的ChatGLM-6B环境中
,也可以使用"pip3 install -r requirements.txt"命令根据工程自带的requirements.txt安装模型转换时需要的相关依赖
# 如果使用自己finetune的模型可能需要修改chatglm_export.py文件中创建tokenizer, model的代码
# 如果使用自己finetune的模型可能需要修改chatglm_export.py文件中创建tokenizer, model的代码
# 执行:
# 执行:
python3 chatglm_export.py ./chatglm-6b.bin # 导出浮点模型,参数为导出的模型路径
python3 chatglm_export.py ./chatglm-6b.bin # 导出浮点模型,参数为导出的模型路径
...
...
requirements.txt
0 → 100644
View file @
3df8baf7
urllib3
==1.26.13
transformers
==4.27.1
sentencepiece
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment