Open
Conversation
…ONS, pad_token_id Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three API changes in transformers 5.x break qwen-asr with transformers >=5.0.
1. check_model_inputs removed
The decorator @check_model_inputs() was removed in transformers 5.x. The import raises ImportError at module load time, so qwen_asr cannot be imported at all with transformers 5.x.
Fix: guard the import with try/except and fall back to a transparent no-op decorator.
2. ROPE_INIT_FUNCTIONS default key removed
The default key was removed from ROPE_INIT_FUNCTIONS in transformers 5.x. Qwen3ASRThinkerTextRotaryEmbedding.init indexes into it with self.rope_type which defaults to default, raising KeyError at model load time.
Fix: fall back to a self-contained RoPE parameter function when the key is missing. Also adds _compute_default_rope_parameters as a method, since the @dynamic_rope_update decorator in transformers 5.x calls it.
3. pad_token_id missing on Qwen3ASRThinkerConfig
GenerationMixin in transformers 5.x requires pad_token_id to be explicitly present on the config object. The attribute is not declared as a class-level default on Qwen3ASRThinkerConfig, causing AttributeError during generation.
Fix: declare pad_token_id = None as a class-level default.