00000637
| 项目 |
值 |
| SDK/Driver版本 |
4.5.0(社区版) |
| GPU型号 |
Iluvatar MR-V100 |
| 模型所需最低GPU数量 |
1张(推荐2张) |
| CPU架构 |
x86_64 |
| 模型类别 |
LLM(Gemma4 Unified) |
| 量化方式 |
BF16(原生权重) |
| vLLM版本 |
v0.23.0 + vllm_iluvatar 0.23.0 plugin |
拉取命令:
docker pull registry.iluvatar.com.cn:10443/vllm_plugin/corex_vllm_plugin:0.23.0-corex-4.5.0.20260619-ubuntu24.04-py3.12-x86_64-v1
docker run -dit -v /usr/src:/usr/src -v /lib/modules:/lib/modules -v /dev:/dev -v /data:/data -v /home:/home --network=host --name=gemma-4-12B-it --ipc=host --privileged --cap-add=ALL --pid=host registry.iluvatar.com.cn:10443/vllm_plugin/corex_vllm_plugin:0.23.0-corex-4.5.0.20260619-ubuntu24.04-py3.12-x86_64-v1 /bin/bash
docker exec -it gemma-4-12B-it /bin/bash
推荐使用 ModelScope:
pip install modelscope
modelscope download --model google/gemma-4-12B-it --local_dir /data/models/gemma-4-12B-it
容器内执行:
curl -s http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
"model": "/data/models/gemma-4-12B-it",
"messages": [
{"role": "user", "content": "你好!请简单介绍一下自己。"}
],
"max_tokens": 128,
"temperature": 0
}'
或只要一个答案的请求:
curl -s http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"/data/models/gemma-4-12B-it","messages":[{"role":"user","content":"1+1等于几?"}],"max_tokens":32,"temperature":0}' | python3 -c "import sys,json;print(json.load(sys.stdin)['choices'][0]['message']['content'])"
1. 社区版部署前必须先安装 SDK ≥ 4.5.0,不能使用 4.4.0 SDK
2. 模型 config.json 中 model_type 为 gemma4_unified,使用 Gemma4UnifiedForConditionalGeneration 架构
3. GPU 显存占用约 22.73 GiB(TP=1, BF16),建议单卡 32GB 以上
4. 首次启动 vLLM 会进行 torch.compile 编译和 CUDA Graph 捕获,耗时约 3-5 分钟
5. CUDA KV Cache 容量约 31,764 tokens(4.67 GiB),支持约 3.88x 并发(max-model-len=8192)
6. VLLM_ENFORCE_CUDA_GRAPH 在 vLLM 0.23.0 中已弃用,vLLM 会自动启用 CUDA Graph
7. 模型权重 ~23GB,下载前确保剩余磁盘空间 ≥ 50GB
8. 双卡 TP=2 可支持更大的 max-model-len 或更高并发