fix tokenizer
All checks were successful
Docker Build and Push / docker (push) Successful in 5m42s

This commit is contained in:
4paradigm
2026-07-17 18:43:42 +08:00
commit ee96443df8
6 changed files with 312 additions and 0 deletions

18
vllm_wrapper.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -e
# 只拦截 "serve <model_dir>" 子命令,其他子命令直接透传
# 适配 Biren 166m / vLLM 0.11.0 环境
if [ "$1" = "serve" ] && [ -n "$2" ]; then
MODEL_DIR="$2"
shift 2
FIXED_DIR=$(python3 /opt/fix_tokenizer.py "$MODEL_DIR")
if [ -n "$FIXED_DIR" ]; then
exec /usr/local/bin/vllm_real serve "$MODEL_DIR" --tokenizer "$FIXED_DIR" "$@"
else
exec /usr/local/bin/vllm_real serve "$MODEL_DIR" "$@"
fi
fi
exec /usr/local/bin/vllm_real "$@"