dengshiyang2003 commited on
Commit
dc8a907
·
1 Parent(s): b3db4b1

Switch deployment tutorial in model card from .simulst/env to conda

Browse files
Files changed (2) hide show
  1. README.md +30 -15
  2. README_zh.md +30 -15
README.md CHANGED
@@ -168,37 +168,52 @@ COMET and CometKiwi are on a 0–100 scale. The best value in each column of eac
168
 
169
  ### Requirements
170
 
171
- - Linux, Python 3.10+, NVIDIA GPU: one 80 GB GPU for the FP16 model (or two 48 GB GPUs with tensor parallelism), 48 GB or more for the FP8 model;
172
  - vLLM (tested with 0.28.0 and a 0.23 nightly, with transformers 5.13.1);
173
  - see below for the GGUF version with llama.cpp.
174
 
175
- ### One-command deployment (vLLM)
 
 
176
 
177
  ```bash
178
  git clone https://github.com/timekettle/Babelfish-SimulMT.git
179
  cd Babelfish-SimulMT
180
- bash scripts/deploy.sh --install --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
181
- ```
182
 
183
- This creates an environment in `.simulst/env`, installs vLLM and this project, downloads the model and starts the server. Once you see `Ready: http://127.0.0.1:8080/` it is ready; Ctrl+C stops it.
 
 
 
 
 
 
 
 
 
 
 
184
 
185
- More examples:
186
 
187
  ```bash
188
- # NVIDIA driver supports CUDA 12.x only: install the CUDA 12.9 builds of vLLM / torch
189
- bash scripts/deploy.sh --install --cu129 --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
190
- # existing vLLM environment, local model
191
- bash scripts/deploy.sh --python /path/to/env/bin/python --model /path/to/Babelfish-30B-A3B --gpus 0
192
  # FP8 version
193
- bash scripts/deploy.sh --install --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B-FP8
194
- # tensor parallelism over two GPUs
195
- bash scripts/deploy.sh --python /path/to/env/bin/python --model /path/to/Babelfish-30B-A3B --gpus 0,1
 
 
 
 
 
 
 
196
  ```
197
 
198
- Or start the server directly:
199
 
200
  ```bash
201
- pip install -e . # in an environment that has vLLM
202
  python -m simulst.server --model /path/to/Babelfish-30B-A3B --port 8080
203
  ```
204
 
 
168
 
169
  ### Requirements
170
 
171
+ - Linux, Conda (Python 3.10+), NVIDIA GPU: one 80 GB GPU for the FP16 model (or two 48 GB GPUs with tensor parallelism), 48 GB or more for the FP8 model;
172
  - vLLM (tested with 0.28.0 and a 0.23 nightly, with transformers 5.13.1);
173
  - see below for the GGUF version with llama.cpp.
174
 
175
+ ### Setup and deployment (vLLM)
176
+
177
+ Create and activate a conda environment, then install the dependencies:
178
 
179
  ```bash
180
  git clone https://github.com/timekettle/Babelfish-SimulMT.git
181
  cd Babelfish-SimulMT
 
 
182
 
183
+ conda create -n babelfish python=3.12 -y
184
+ conda activate babelfish
185
+
186
+ # driver supports CUDA 13 (>= 580)
187
+ pip install vllm==0.28.0
188
+ # driver supports CUDA 12.x only (e.g. 535 / 550): use this instead
189
+ # pip install "vllm==0.28.0+cu129" "torch==2.13.0+cu129" \
190
+ # --extra-index-url https://download.pytorch.org/whl/cu129 \
191
+ # --extra-index-url https://wheels.vllm.ai/0.28.0/cu129
192
+
193
+ pip install -e .
194
+ ```
195
 
196
+ With the `babelfish` environment active, start the server (passing a model ID downloads it automatically; once you see `Ready: http://127.0.0.1:8080/` it is ready; Ctrl+C stops it):
197
 
198
  ```bash
199
+ # download from Hugging Face and start (FP16)
200
+ bash scripts/deploy.sh --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
 
 
201
  # FP8 version
202
+ bash scripts/deploy.sh --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B-FP8
203
+ # local model, single GPU or tensor parallelism over two GPUs
204
+ bash scripts/deploy.sh --model /path/to/Babelfish-30B-A3B --gpus 0
205
+ bash scripts/deploy.sh --model /path/to/Babelfish-30B-A3B --gpus 0,1
206
+ ```
207
+
208
+ You can also pass `--install` to let the script create and set up the `babelfish` conda environment automatically (add `--cu129` for CUDA 12.x drivers):
209
+
210
+ ```bash
211
+ bash scripts/deploy.sh --install --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
212
  ```
213
 
214
+ Or start the server directly inside the `babelfish` conda environment:
215
 
216
  ```bash
 
217
  python -m simulst.server --model /path/to/Babelfish-30B-A3B --port 8080
218
  ```
219
 
README_zh.md CHANGED
@@ -151,37 +151,52 @@ COMET 和 CometKiwi 为百分制(0–100);每个指标每列最好的值
151
 
152
  ### 环境要求
153
 
154
- - Linux,Python 3.10 及以上,NVIDIA GPU:FP16 版需要 1 张 80 GB 显卡(或 2 张 48 GB 做张量并行),FP8 版需要 48 GB 及以上显存;
155
  - vLLM(已测试 0.28.0 和 0.23 nightly,配 transformers 5.13.1);
156
  - llama.cpp 部署 GGUF 版的要求见下文。
157
 
158
- ### 一键部署(vLLM)
 
 
159
 
160
  ```bash
161
  git clone https://github.com/timekettle/Babelfish-SimulMT.git
162
  cd Babelfish-SimulMT
163
- bash scripts/deploy.sh --install --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
164
- ```
165
 
166
- 命令会在 `.simulst/env` 新建环境并安装 vLLM 和本项目、下载模型、启动服务。看到 `Ready: http://127.0.0.1:8080/` 后即可使用,按 Ctrl+C 停止。
 
 
 
 
 
 
 
 
 
 
 
167
 
168
- 常用写法:
169
 
170
  ```bash
171
- # 显卡驱动只支持到 CUDA 12.x:安装 CUDA 12.9 构建的 vLLM / torch
172
- bash scripts/deploy.sh --install --cu129 --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
173
- # 已有 vLLM 环境、模型已在本地
174
- bash scripts/deploy.sh --python /path/to/env/bin/python --model /path/to/Babelfish-30B-A3B --gpus 0
175
  # FP8 版
176
- bash scripts/deploy.sh --install --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B-FP8
177
- # 两张卡张量并行
178
- bash scripts/deploy.sh --python /path/to/env/bin/python --model /path/to/Babelfish-30B-A3B --gpus 0,1
 
 
 
 
 
 
 
179
  ```
180
 
181
- 也可以不用脚本,直接启动服务:
182
 
183
  ```bash
184
- pip install -e . # 在已装好 vLLM 的环境里
185
  python -m simulst.server --model /path/to/Babelfish-30B-A3B --port 8080
186
  ```
187
 
 
151
 
152
  ### 环境要求
153
 
154
+ - Linux,Conda(Python 3.10 及以上),NVIDIA GPU:FP16 版需要 1 张 80 GB 显卡(或 2 张 48 GB 做张量并行),FP8 版需要 48 GB 及以上显存;
155
  - vLLM(已测试 0.28.0 和 0.23 nightly,配 transformers 5.13.1);
156
  - llama.cpp 部署 GGUF 版的要求见下文。
157
 
158
+ ### 环境配置与部署(vLLM)
159
+
160
+ 先创建并激活 conda 环境,再安装依赖:
161
 
162
  ```bash
163
  git clone https://github.com/timekettle/Babelfish-SimulMT.git
164
  cd Babelfish-SimulMT
 
 
165
 
166
+ conda create -n babelfish python=3.12 -y
167
+ conda activate babelfish
168
+
169
+ # 驱动支持 CUDA 13(>= 580)
170
+ pip install vllm==0.28.0
171
+ # 显卡驱动只支持到 CUDA 12.x(例如 535 / 550)时,改用下面这行:
172
+ # pip install "vllm==0.28.0+cu129" "torch==2.13.0+cu129" \
173
+ # --extra-index-url https://download.pytorch.org/whl/cu129 \
174
+ # --extra-index-url https://wheels.vllm.ai/0.28.0/cu129
175
+
176
+ pip install -e .
177
+ ```
178
 
179
+ 激活 `babelfish` 环境后启动服务(传入模型 ID 会自动下载模型;看到 `Ready: http://127.0.0.1:8080/` 后即可使用,按 Ctrl+C 停止):
180
 
181
  ```bash
182
+ # 从 Hugging Face 下载并启动(FP16 原版)
183
+ bash scripts/deploy.sh --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
 
 
184
  # FP8 版
185
+ bash scripts/deploy.sh --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B-FP8
186
+ # 本地权重,指定单卡或两卡张量并行
187
+ bash scripts/deploy.sh --model /path/to/Babelfish-30B-A3B --gpus 0
188
+ bash scripts/deploy.sh --model /path/to/Babelfish-30B-A3B --gpus 0,1
189
+ ```
190
+
191
+ 也可以给脚本加 `--install`,自动创建并配置名为 `babelfish` 的 conda 环境(驱动只到 CUDA 12.x 时加 `--cu129`):
192
+
193
+ ```bash
194
+ bash scripts/deploy.sh --install --model timekettle/Babelfish-SimulMT/Babelfish-30B-A3B
195
  ```
196
 
197
+ 或不用脚本,在 `babelfish` conda 环境里直接启动服务:
198
 
199
  ```bash
 
200
  python -m simulst.server --model /path/to/Babelfish-30B-A3B --port 8080
201
  ```
202