Files
K100-vllm/README.md
2026-04-24 14:41:28 +08:00

55 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# K100-vLLM Patched 镜像
## 背景
在海光 K100-AI GPU 上跑大批量模型 benchmark 时,部分模型因 tokenizer 配置问题导致 vLLM 启动失败。本仓库通过在基础镜像上打 patch修复已知的兼容性问题无需逐个修改模型文件。
## 镜像信息
### 海光 K100-AI
| 项目 | 值 |
|------|----|
| 基础镜像 | `git.modelhub.org.cn:9443/enginex-hygon/vllm:0.9.2` |
| Patched 镜像 | `git.modelhub.org.cn:9443/enginex-hygon/vllm:0.9.2-patched` |
### Nvidia A100
| 项目 | 值 |
|------|----|
| 基础镜像 | `harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0` |
| Patched 镜像 | `harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0-patched` |
## 已修复问题
### Patch 1extra_special_tokens 类型兼容
**问题:** 部分模型的 `tokenizer_config.json``extra_special_tokens` 字段为 `list` 类型,而 transformers 库要求其为 `dict`,导致 vLLM 启动时报错崩溃。
**修复文件:** `transformers/tokenization_utils_base.py`
**修复方式:**`_set_model_specific_special_tokens` 方法入口处,检测到 `list` 类型时自动转换为 `dict`
**已验证模型:**
- beyoru/Luna-Ethos ✅
- boqiny/Qwen3-8B-FengGe-SFT ✅
## 构建方法
**海光K100-AI**
在仓库根目录执行:
`docker build -t git.modelhub.org.cn:9443/enginex-hygon/vllm:0.9.2-patched .`
**Nvidia A100**
在仓库根目录执行:
`docker build -t harbor.4pd.io/dooke/vllm/vllm/vllm-openai:v0.11.0-patched .`
## 文件说明
- `Dockerfile` — 镜像构建文件
- `patch.py` — 执行实际文件修改的脚本