Skip to content

[Bug]: vllm/vllm-openai:latest fails to start Gemma4 with Transformers 5.15.0 #51744

Description

@yasu-oh

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...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions