fix(loader): pass model_type to TasksManager for CTC ASR model class resolution#1164
Closed
codykk wants to merge 1 commit into
Closed
fix(loader): pass model_type to TasksManager for CTC ASR model class resolution#1164codykk wants to merge 1 commit into
codykk wants to merge 1 commit into
Conversation
…lass resolution Add regression recipe for jonatasgrosman/wav2vec2-large-xlsr-53-russian (cpu/fp32 and cpu/fp16).
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.
Fix incorrect model class resolution for CTC-based ASR models (Wav2Vec2, Hubert, Data2Vec-Audio). When
automatic-speech-recognitionmaps to multiple candidate classes, Optimum defaults toAutoModelForSpeechSeq2Seqwithout model_type context, causing all*ForCTCmodels to fail. Passingmodel_typeenables correct per-family resolution.Add verified CPU recipes for
jonatasgrosman/wav2vec2-large-xlsr-53-russian(fp32 + fp16).Model metadata
Wav2Vec2ForCTC(wav2vec2) — CNN feature encoder → transformer encoder → CTC linear headautomatic-speech-recognitionValidation and support evidence
Baseline (main, 4daf0f1): FAIL —
Unrecognized configuration class Wav2Vec2Config for AutoModelForSpeechSeq2SeqFix: Pass
model_type=model_type_normtoTasksManager.get_model_class_for_task()(1-line change)Generalization confirmed: HubertForCTC, Data2VecAudioForCTC also resolve correctly. WhisperForConditionalGeneration (Seq2Seq) unaffected.
Reproduce: