Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

decoding

游雁5079d5459560
diff --git a/funasr/models/llm_asr/model.py b/funasr/models/llm_asr/model.py
index 14837b936..2eea19b2e 100644
--- a/funasr/models/llm_asr/model.py
+++ b/funasr/models/llm_asr/model.py
@@ -526,7 +526,7 @@ class LLMASR2(nn.Module):
]
labels_ids[labels_ids == -1] = -100
-
+ attention_mask[attention_mask < 0] = 0
model_outputs = self.llm(
inputs_embeds=inputs_embeds, attention_mask=attention_mask, labels=labels_ids
)