chua commited on
Commit
b812eff
·
verified ·
1 Parent(s): 7f5c183

fix: restore audio attention output layout

Browse files

Restore the [batch, time, heads, head_dim] layout before flattening multi-head attention output. Local standalone eval10: 11/11 stop, 0/11 max-token hits, 4.73% rough CER. Also remove the temporary README warning.

Files changed (2) hide show
  1. README.md +0 -13
  2. qwen3_asr_audio_model.py +2 -1
README.md CHANGED
@@ -31,19 +31,6 @@ repository: https://github.com/AutoArk/open-audio-opd
31
 
32
  </div>
33
 
34
- ## IMPORTANT: Temporary Transformers Release Warning
35
-
36
- **Do not use the current Transformers artifact for evaluation, benchmarking,
37
- or production.** We confirmed a tensor-layout bug in the published remote-code
38
- audio attention implementation that can produce incorrect or repetitive
39
- transcriptions. The affected artifact includes model-code revision
40
- `25ae981173eb8c9eb2d672716d10fd960dd882e6`.
41
-
42
- The model weights have been verified intact, and a corrected Transformers
43
- revision is being prepared. This README-only warning does not contain the fix.
44
- The ONNX Runtime and iOS ANE packages use separate inference implementations
45
- and are being audited independently; this notice does not state their status.
46
-
47
  `Audio8-ASR-0.1B` is a compact autoregressive ASR model whose language-model
48
  component has only 0.1B parameters. It supports multilingual speech recognition
49
  for languages including Chinese, English, French, Japanese, and Cantonese. We
 
31
 
32
  </div>
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  `Audio8-ASR-0.1B` is a compact autoregressive ASR model whose language-model
35
  component has only 0.1B parameters. It supports multilingual speech recognition
36
  for languages including Chinese, English, French, Japanese, and Cantonese. We
qwen3_asr_audio_model.py CHANGED
@@ -71,7 +71,8 @@ class Qwen3ASRAudioAttention(nn.Module):
71
  attn_weights = F.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
72
  attn_weights = F.dropout(attn_weights, p=self.attention_dropout, training=self.training)
73
  attn_output = torch.matmul(attn_weights, value)
74
- attn_output = attn_output.reshape(seq_length, self.embed_dim).contiguous()
 
75
  return self.out_proj(attn_output)
76
 
77
 
 
71
  attn_weights = F.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
72
  attn_weights = F.dropout(attn_weights, p=self.attention_dropout, training=self.training)
73
  attn_output = torch.matmul(attn_weights, value)
74
+ attn_output = attn_output.transpose(1, 2).contiguous()
75
+ attn_output = attn_output.reshape(seq_length, self.embed_dim)
76
  return self.out_proj(attn_output)
77
 
78