Back Home

GitHub Repo

Transformers Proposes Qwen3-ASR Masking Fix to Keep Audio Padding from Affecting Valid Features

On Nov. 7, the Transformers community proposed zeroing masked regions in Qwen3-ASR audio features before convolution. The pull request remains open; current evidence comes from a small encoder reproduction, and any effect on real-world transcription accuracy remains unverified.

Marcus Qwertyus · Public domain · Image source
zh-Hant

The Transformers community submitted a proposed Qwen3-ASR fix on Nov. 7 to address an issue in which padded audio regions can still affect valid features. At the time of review, PR #50454 was still open and had not received a review, so the fix should not be considered part of the released package. The change is in the audio encoder: it zeros invalid positions according to the feature mask before chunking and convolution. Proposed fix

The issue concerns when the mask is applied. The reporter noted that padded portions of a waveform can become nonzero after log-Mel feature extraction, while the existing encoder runs the CNN before removing masked positions. Because convolution reads neighboring frames, padding values can propagate into the boundaries of valid regions; removing invalid outputs afterward cannot undo that effect. The report also notes that the processor’s default padding=True path is affected. Issue report

The author’s minimal CPU reproduction uses a randomly initialized small encoder, keeps tensor shapes and the first 85 valid frames fixed, and changes only the remaining masked positions from zero to negative one. The maximum absolute difference between the two outputs is about 6.26×10⁻⁷, though they are expected to be identical. This shows that, in this test, the output depends on invalid inputs. It does not establish the word error rate of a production model, nor does it prove an observable degradation in transcription. Reproduction code

The proposed fix adds masked_fill to the modular source and updates the generated model file. The diff currently covers only those two files, with no new test file. The official documentation lists support for Chinese and Cantonese transcription and defines audio feature masks separately from text attention masks, making the audio front end’s mask semantics a detail worth checking in Chinese speech services. Code diff, model documentation

Engineering teams can next compare outputs using actual weights for single-item inputs and batches of different lengths, checking whether boundary features and transcriptions remain consistent. This is a validation suggestion based on the issue’s mechanism. Maintainer review, model testing, and inclusion in a release still need to be tracked before deciding whether deployment should be updated.

Sources

  1. Fix Qwen3-ASR masking before audio convolutions — PR #50454
  2. Qwen3-ASR: masked mel frames affect valid CNN outputs — Issue #50453
  3. Qwen3-ASR 修補程式差異
  4. Qwen3 ASR — Transformers 官方文件