🚨 Transformers v5.23.0 removes `ProcessingKwargs._defaults` which is used by Qwen-Omni / Gemma3

Open Beginner friendly
#10,538 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the referenced code in swift/template/templates/qwen.py lines 884–896 and swift/template/templates/gemma.py line 123. Check how these processors read or write ProcessingKwargs._defaults and compare with the processor defaults described in the issue. Update the affected usage for the Transformers change, then verify Qwen-Omni and Gemma3 processor behavior.

Written by the indexing model from the issue text.

Description

question
Checklist / 检查清单
  • I have searched existing issues, and this is a new question or discussion topic. / 我已经搜索过现有的 issues,确认这是一个新的问题与讨论。
Question Description / 问题描述

Hi, just wanted to give you a heads up that we'll be removing ProcessingKwargs._defaults from transformers v5.23.0 on (https://github.com/huggingface/transformers/pull/49089).

Transformers processor kwargs will no longer have defaults defined in _defaults, so reading from or writing to the defaults will no longer work. Instead the defaults are now defined directly on the processor class instead.

The following lines in ms-swift might be impacted:

Sorry for the inconvenience, as mentioned above the defaults can now be read from the processor directly. The default['audio_kwargs']['truncation'] = False should also not be necessary any more as this default has been updated in transformers since a while.

Dominant language
Python
Stars
16.1k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
70

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelscope/ms-swift

All issues in modelscope/ms-swift

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.