Commit 95f3bed8 authored by dcuai's avatar dcuai
Browse files

Update README.md

parent 81eaed1b
...@@ -23,12 +23,12 @@ Baichuan整体模型基于标准的Transformer结构,采用了和LLaMA一样 ...@@ -23,12 +23,12 @@ Baichuan整体模型基于标准的Transformer结构,采用了和LLaMA一样
## 环境配置 ## 环境配置
### Docker(方法一) ### Docker(方法一)
## **TODO** ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
### 源码编译安装(方法二)
基于光源pytorch2.1.0基础镜像环境:镜像下载地址:[https://sourcefind.cn/#/image/dcu/pytorch](https://sourcefind.cn/#/image/dcu/pytorch),根据pytorch2.1.0、python、dtk及系统下载对应的镜像版本。pytorch2.1.0镜像里已经安装了trition,flash-attn docker run -it -v /path/your_code_data/:/path/your_code_data/ -v /opt/hyhal:/opt/hyhal:ro --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
```
1. 安装Rust 1. 安装Rust
```shell ```shell
...@@ -44,7 +44,6 @@ sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc ...@@ -44,7 +44,6 @@ sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP rm -f $PROTOC_ZIP
``` ```
3. 安装TGI Service 3. 安装TGI Service
```bash ```bash
...@@ -59,7 +58,6 @@ cd .. #回到项目根目录 ...@@ -59,7 +58,6 @@ cd .. #回到项目根目录
source $HOME/.cargo/env source $HOME/.cargo/env
BUILD_EXTENSIONS=True make install #安装text-generation服务 BUILD_EXTENSIONS=True make install #安装text-generation服务
``` ```
4. 安装benchmark 4. 安装benchmark
```bash ```bash
...@@ -74,20 +72,12 @@ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple ...@@ -74,20 +72,12 @@ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
``` ```
另外,`cargo install` 太慢也可以通过在`~/.cargo/config`中添加源来提速。 另外,`cargo install` 太慢也可以通过在`~/.cargo/config`中添加源来提速。
## 查看安装的版本号 ## 查看安装的版本号
```bash ```bash
text-generation-launcher -V #版本号与官方版本同步 text-generation-launcher -V #版本号与官方版本同步
``` ```
## 使用前
```bash
export PYTORCH_TUNABLEOP_ENABLED=0
```
##
## 数据集 ## 数据集
...@@ -102,6 +92,13 @@ export PYTORCH_TUNABLEOP_ENABLED=0 ...@@ -102,6 +92,13 @@ export PYTORCH_TUNABLEOP_ENABLED=0
### 部署TGI ### 部署TGI
## 使用前
```bash
export PYTORCH_TUNABLEOP_ENABLED=0
```
#### 1. 启动TGI服务 #### 1. 启动TGI服务
``` ```
HIP_VISIBLE_DEVICES=2 text-generation-launcher --dtype=float16 --model-id /models/baichuan2/Baichuan2-7B-Chat --trust-remote-code --port 3001 HIP_VISIBLE_DEVICES=2 text-generation-launcher --dtype=float16 --model-id /models/baichuan2/Baichuan2-7B-Chat --trust-remote-code --port 3001
...@@ -141,9 +138,13 @@ print(response.json()) ...@@ -141,9 +138,13 @@ print(response.json())
更多API查看,请参考 [https://huggingface.github.io/text-generation-inference](https://huggingface.github.io/text-generation-inference) 更多API查看,请参考 [https://huggingface.github.io/text-generation-inference](https://huggingface.github.io/text-generation-inference)
### 推理结果 ### result
![img1](./readme_images/img1.png) ![img1](./readme_images/img1.png)
### 精度
## 应用场景 ## 应用场景
### 算法类别 ### 算法类别
......
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