x
This commit is contained in:
@@ -61,20 +61,21 @@
|
||||
- `api_key`:接口访问密钥(同时用于 8000 与 8001)
|
||||
- `tensor_parallel_size`:张量并行数,双卡建议 `2`
|
||||
- `dtype`:推理精度,默认 `bfloat16`
|
||||
- `selected_model`:当前生效模型,留空时回退到 `default_model`
|
||||
- `models.selected`:当前生效模型,留空时回退到 `models.default`
|
||||
|
||||
## config.json 说明
|
||||
|
||||
`config.json` 采用以下结构:
|
||||
|
||||
- 顶层 `default_model`:默认模型名
|
||||
- 顶层其他键:每个模型的配置档位
|
||||
- `models.default`:默认模型名
|
||||
- `models.selected`:当前生效模型名
|
||||
- `models.profiles`:模型配置集合
|
||||
- 每个模型至少建议包含:`hf_model_id`、`ctx`、`max_num_seqs`、`max_tokens`、`gpu_util`、`valid_tp`
|
||||
|
||||
启动时会按以下优先级选模型:
|
||||
|
||||
1. `config.json` 中 `selected_model`
|
||||
2. `config.json` 中 `default_model`
|
||||
1. `config.json` 中 `models.selected`
|
||||
2. `config.json` 中 `models.default`
|
||||
|
||||
模型被选中后,会自动覆盖运行参数,包括:
|
||||
|
||||
@@ -88,7 +89,7 @@
|
||||
|
||||
## 部署步骤
|
||||
|
||||
1. 修改 `config.json` 中的 `selected_model` 与服务参数。
|
||||
1. 修改 `config.json` 中的 `models.selected` 与服务参数。
|
||||
|
||||
2. 构建并启动容器:
|
||||
|
||||
@@ -129,8 +130,9 @@ curl -X POST "http://localhost:8001/v1/chat/completions" \
|
||||
|
||||
- Base URL 使用 `http://<服务器IP>:8001/v1`
|
||||
- API Key 使用 `config.json` 中 `api_key`
|
||||
- 模型名使用 `config.json` 中 `served_model_name`
|
||||
- 模型名使用 `config.json` 中 `models.profiles.<模型名>.served_model_name`
|
||||
- 若使用工具调用,`config.json` 中应配置 `tool_call_parser` 与 `enable_auto_tool_choice`
|
||||
- 所有路径按 Ubuntu 规范填写,本地模型建议使用 `/opt/model/<模型目录>`
|
||||
|
||||
## 双 AMD R9700 调优建议
|
||||
|
||||
@@ -138,4 +140,3 @@ curl -X POST "http://localhost:8001/v1/chat/completions" \
|
||||
- 首次部署建议设置 `GPU_MEMORY_UTILIZATION=0.90`,稳定后再调高
|
||||
- 若模型较大且吞吐压力高,可逐步调低 `MAX_MODEL_LEN` 或 `MAX_NUM_SEQS`
|
||||
- 确保宿主机已正确安装 ROCm 驱动并暴露 `/dev/kfd` 与 `/dev/dri`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user