From e42c693f0b43648c65bc67908bdb2824cb24ff80 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 13 六月 2024 14:26:38 +0800
Subject: [PATCH] decoding
---
funasr/models/llm_asr/model.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/funasr/models/llm_asr/model.py b/funasr/models/llm_asr/model.py
index 14837b9..3c2bff8 100644
--- a/funasr/models/llm_asr/model.py
+++ b/funasr/models/llm_asr/model.py
@@ -420,6 +420,8 @@
layer_id = int(name[beg + 1 : end - 1])
if layer_id in freeze_layer_num:
param.requires_grad = False
+ else:
+ param.requires_grad = False
else:
param.requires_grad = False
@@ -526,7 +528,7 @@
]
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
)
--
Gitblit v1.9.1