enginex-bi100-compat v1: preflight 兼容增强引擎(R2/R3/R3b/R4/R7),结构与引擎修复模式同型,25 项自测全通过

This commit is contained in:
2026-10-03 18:29:26 +08:00
commit 391302289d
5 changed files with 158 additions and 0 deletions

44
Dockerfile Normal file
View File

@@ -0,0 +1,44 @@
# enginex-bi100-compat
#
# 天数智芯 天垓100(Iluvatar_bi-100)· 文本生成 · vLLM「兼容增强」引擎。
#
# 不动模型、不动卡,只把「引擎镜像层」的结构性不兼容在启动前修掉。
# 结构与社区已上线引擎 EngineX-Sunrise/enginex-S2-vllm-fix-tokenizer 完全同型
# (Dockerfile + entrypoint.sh + 修补脚本 + README),该模式已在曦望 S2 生产验证。
#
# 修什么(全部有日志实证,见 README.md):
# R3 extra_special_tokens 是 list -> transformers 崩(社区已上线修复,已合并)
# R3b tokenizer_class 是坏类名 -> 加载异常(社区已上线修复,已合并)
# R2 模型没有 chat_template -> /v1/chat/completions 400/空输出
# R4 architectures 是镜像未注册类名 -> KeyError / MODEL_NOT_SUPPORTED
# R7 镜像缺 ixformer.contrib.vllm.layers -> ModuleNotFoundError(MoE)
#
# 为什么选 bi-100:本人 37 个验证失败里,bi-100 单卡 10 例为全平台最集中;
# 且该卡社区通过率约 51%(15 张卡最低),修好收益最大。
FROM git.modelhub.org.cn:9443/enginex-iluvatar/bi100-3.2.3-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3
LABEL org.opencontainers.image.title="enginex-bi100-compat" \
org.opencontainers.image.description="Iluvatar bi-100 vLLM text-generation engine with preflight compatibility patches (R2/R3/R3b/R4/R7)" \
com.modelhubxc.engine.target-card="Iluvatar_bi-100" \
com.modelhubxc.engine.framework="vllm" \
com.modelhubxc.engine.task-type="text-generation" \
com.modelhubxc.engine.baseline="EngineX-Iluvatar/enginex-vllm-bi100-qwen36" \
com.modelhubxc.engine.pattern="EngineX-Sunrise/enginex-S2-vllm-fix-tokenizer"
# 修补脚本 + R7 纯 PyTorch shim(都只是小文本文件,无权重)
COPY preflight.py /opt/
COPY entrypoint.sh /opt/
COPY detect_tokenizer.py /opt/
COPY shims/ /opt/shims/
RUN chmod +x /opt/entrypoint.sh /opt/preflight.py \
&& python3 -c "import ast,io;[ast.parse(io.open(f,encoding='utf-8').read()) for f in ['/opt/preflight.py','/opt/detect_tokenizer.py','/opt/shims/ixformer/contrib/vllm/layers/__init__.py']]" \
&& bash -n /opt/entrypoint.sh \
&& echo "[enginex-bi100-compat] preflight syntax OK"
# R7:让 shims 全局可 import(平台若覆盖 entrypoint 也仍然生效)
ENV PYTHONPATH=/opt/shims:${PYTHONPATH}
ENV MODEL_DIR=/model
ENTRYPOINT ["/opt/entrypoint.sh"]