Your current environment
Docker image: vllm/vllm-openai:latest
vLLM: 0.27.0
Transformers: 5.15.0
Model: yasu-oh/gemma-4-31B-it-qat-NVFP4
Tensor parallel size: 2
KV cache dtype: fp8
The Transformers version in the image can be confirmed with:
docker run --rm \
--entrypoint python3 \
vllm/vllm-openai:latest \
-c 'import vllm, transformers; print("vLLM:", vllm.__version__); print("Transformers:", transformers.__version__)'
Output:
vLLM: 0.27.0
Transformers: 5.15.0
🐛 Describe the bug
The current official release image vllm/vllm-openai:latest contains:
vLLM: 0.27.0
Transformers: 5.15.0
When serving:
yasu-oh/gemma-4-31B-it-qat-NVFP4
vLLM fails during startup with:
transformers.integrations.heterogeneity.configuration_utils.AmbiguousGlobalPerLayerAttributeError:
'head_dim' is a per-layer attribute and may vary across layers.
Access it via config.per_layer_config[i].head_dim.
The exception occurs in:
vllm/transformers_utils/model_arch_config_convertor.py
while accessing the Gemma4 head_dim.
Workaround
Downgrading only Transformers to 5.14.1 while keeping the same vllm/vllm-openai:latest base image and serving configuration resolves the issue.
FROM vllm/vllm-openai:latest
RUN /usr/bin/python3 -m pip install --no-cache-dir 'transformers==5.14.1'
With Transformers 5.14.1:
- the same model loads successfully,
- the vLLM engine initializes successfully,
- the API server starts successfully,
/v1/chat/completions returns HTTP 200,
- 32 concurrent requests run successfully.
Related PRs
Before submitting a new issue...
Your current environment
The Transformers version in the image can be confirmed with:
docker run --rm \ --entrypoint python3 \ vllm/vllm-openai:latest \ -c 'import vllm, transformers; print("vLLM:", vllm.__version__); print("Transformers:", transformers.__version__)'Output:
🐛 Describe the bug
The current official release image
vllm/vllm-openai:latestcontains:When serving:
vLLM fails during startup with:
The exception occurs in:
while accessing the Gemma4
head_dim.Workaround
Downgrading only Transformers to 5.14.1 while keeping the same
vllm/vllm-openai:latestbase image and serving configuration resolves the issue.With Transformers 5.14.1:
/v1/chat/completionsreturns HTTP 200,Related PRs
Before submitting a new issue...