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
Baichuan2_tgi
Commits
95f3bed8
Commit
95f3bed8
authored
Nov 04, 2024
by
dcuai
Browse files
Update README.md
parent
81eaed1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
README.md
README.md
+16
-15
No files found.
README.md
View file @
95f3bed8
...
@@ -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


### 精度
无
## 应用场景
## 应用场景
### 算法类别
### 算法类别
...
...
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