Skip to content

Transformers v5#1589

Open
echarlaix wants to merge 189 commits intomainfrom
transformers-v5
Open

Transformers v5#1589
echarlaix wants to merge 189 commits intomainfrom
transformers-v5

Conversation

@echarlaix
Copy link
Collaborator

@echarlaix echarlaix commented Jan 19, 2026

with huggingface/optimum#2408

List of architectures for which are deprecating support for transformers < v5
(remote code modeling incompatible with v5)

  • codegen2
  • exaone
  • decilm
  • internlm2
  • orion
  • aquila2
  • jais
  • baichuan2
  • internvl_chat
  • minicpmv
    (remote code models)
  • aquila
  • xverse
  • internlm
  • exaone4

List of architectures for which we removed support for transformers < v5 for which support can be added later on

  • xlm
  • data2vec-text
  • flaubert
  • marian
  • granitemoe
  • zamba2
  • phimoe
  • drbx
  • eagle3
  • mt5
  • llava
  • idefics3
  • gemma3
  • smolvlm
  • got_ocr2
  • llava_next_video
  • llama4
  • bitnet
  • qwen3_next

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Comment on lines -262 to -269
TasksManager._CUSTOM_CLASSES[("pt", "idefics3", "image-text-to-text")] = (
"transformers",
"AutoModelForImageTextToText",
)
TasksManager._CUSTOM_CLASSES[("pt", "smolvlm", "image-text-to-text")] = (
"transformers",
"AutoModelForImageTextToText",
)
Copy link
Collaborator Author

@echarlaix echarlaix Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"__module.layers.27.mlp.up_proj/aten::linear/MatMul",
"__module.layers.27.mlp.gate_proj/aten::linear/MatMul",
],
"validate": False,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed as for models exported with transformers >= v5 https://huggingface.co/Qwen/Qwen3-Embedding-0.6B/blob/main/config.json#L25 will be loaded in bfloat16 and patched https://github.com/openvinotoolkit/openvino/blob/2026.0.1/src/bindings/python/src/openvino/frontend/pytorch/patch_model.py, for these models we need to use a different default ignored scope config (aten -> ov_ext) depending on what tranformers version was used during the export phase, otherwise quantization is failing at https://github.com/openvinotoolkit/nncf/blob/2f40a6dbc451c6ed025e012dfe65b2d577fde47f/src/nncf/scopes.py#L249. For now one option is to set validate to False as it only concerns Qwen/Qwen3-Embedding-0.6B @rkazants let me know if this works

@echarlaix echarlaix added the openvino-slow Runs OpenVINO slow tests with different versions of transformers label Mar 20, 2026
@echarlaix echarlaix removed the openvino-slow Runs OpenVINO slow tests with different versions of transformers label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants