Skip to content

Gemma 4 support requires transformers >= 5.5.0 (currently pinned <= 4.57.6) #2562

@2imi9

Description

@2imi9

Summary

Gemma 4 (model_type: gemma4) was introduced in transformers >= 5.5.0, but llm-compressor currently pins transformers>=4.56.1,<=4.57.6 in setup.py. This means Gemma 4 models cannot be loaded or quantized without manually overriding the transformers version.

Steps to reproduce

from transformers import AutoModelForImageTextToText

model = AutoModelForImageTextToText.from_pretrained("google/gemma-4-E4B-it", dtype="auto")

With the pinned transformers version, this fails because gemma4 is not a recognized model type.

Current workaround

Install llm-compressor with --no-deps and force-install transformers from git main. A Dockerfile demonstrating this workaround is included in PR #2561.

Suggested fix

Bump the transformers upper bound in setup.py to include >= 5.5.0 once compatibility is verified across the codebase.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions