Skip to content

Commit 9ec6e9d

Browse files
JordanNanosclaude
andcommitted
Add transformers patch layer for GLM-5/Qwen3.5 model type support
SGLang v0.5.10 pins an older transformers that doesn't have glm_moe_dsa or qwen3_5_moe in its AutoConfig registry. Add a thin Dockerfile layer that upgrades transformers to the commit with these model types and verifies registration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 13be2f6 commit 9ec6e9d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docker/build-sglang-bnxt-mi325x.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ docker build \
7979
-f "${BUILD_CONTEXT}/rocm.Dockerfile" \
8080
"${BUILD_CONTEXT}/"
8181

82+
# ---------- Patch transformers for GLM-5/Qwen3.5 model type support ----------
83+
PATCH_DOCKERFILE="$(dirname "$0")/patch-transformers.Dockerfile"
84+
if [[ -f "${PATCH_DOCKERFILE}" ]]; then
85+
echo "[build] Patching transformers for glm_moe_dsa/qwen3_5_moe support"
86+
docker build \
87+
--build-arg BASE_IMAGE="${IMAGE_TAG}" \
88+
-t "${IMAGE_TAG}" \
89+
-f "${PATCH_DOCKERFILE}" \
90+
"$(dirname "$0")/"
91+
fi
92+
8293
# ---------- Push ----------
8394
echo "[build] Pushing ${IMAGE_TAG}"
8495
docker push "${IMAGE_TAG}"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ARG BASE_IMAGE
2+
FROM ${BASE_IMAGE}
3+
4+
# Upgrade transformers to get glm_moe_dsa and qwen3_5_moe model type support.
5+
# The SGLang v0.5.10 base image pins an older transformers that doesn't have these.
6+
RUN pip install --no-cache-dir -U \
7+
"git+https://github.com/huggingface/transformers.git@6ed9ee36f608fd145168377345bfc4a5de12e1e2" \
8+
&& python3 -c "import transformers; print(f'transformers {transformers.__version__}')" \
9+
&& python3 -c "from transformers import AutoConfig; AutoConfig.for_model('glm_moe_dsa')" \
10+
&& echo "glm_moe_dsa model type verified"

0 commit comments

Comments
 (0)