Commit 53e02bdd authored by zhouxiang's avatar zhouxiang
Browse files

更新readme

parent 67472ca4
......@@ -59,7 +59,7 @@ source /opt/dtk-23.04/cuda/env.sh
```
#进入本工程目录
cd package
python setup install
python setup.py install
```
## 数据集
......@@ -81,7 +81,7 @@ python setup install
# 如果有现成的原版Baichuan-13B-chat的运行环境中,可以将模型转换脚本baichuan2flm.py移动到原版模型的运行环境中,
# 也可以通过执行pip install -r requirements.txt安装模型转换所需依赖;
# 对于已经下载完成的模型或者自己finetune的模型需要修改baichuan2flm.py文件中创建tokenizer, model时的模型存放路径
# 执行:
# 在本工程目录下执行:
python3 baichuan2flm.py baichuan-13b-fp16.bin float16 # 导出fp16模型,参数为导出的模型路径
# 如果使用的dcu显存为16G,则需要用int8精度模型:
......@@ -89,13 +89,13 @@ python3 baichuan2flm.py baichuan-13b-int8.bin int8 # 导出fp16模型,参数
```
### 模型推理运行实例
### 模型推理
```
# 命令行聊天程序,使用了模型创建以及流式对话效果
python cli_demo.py -p baichuan-13b-fp16.bin
# 简易webui,需要先安装streamlit-chat
# 简易webui,需要先安装streamlit-chat,并且需要在容器启动时映射streamlit的端口到外部网络
streamlit run web_demo.py baichuan-13b-fp16.bin
```
......@@ -111,8 +111,8 @@ cd benchmark
chmod +x benchmark
# 测试示例
./benchmark -p ../baichuan-13b-fp16.bin -f prompts/beijing.txt
./benchmark -p ../baichuan-13b-fp16.bin -f prompts/hello.txt -b 512 -l 18
./benchmark -p ../baichuan-13b-fp16.bin -f prompts/beijing.txt -b 1
./benchmark -p ../baichuan-13b-fp16.bin -f prompts/beijing.txt -b 16
```
## result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment