From 8c6d1642f5fbf1d55edb324e35e9fa6e89da25a1 Mon Sep 17 00:00:00 2001
From: Xuning Tan <me@xuning.eu.org>
Date: 星期三, 01 十月 2025 14:45:45 +0800
Subject: [PATCH] fix: correct the deepspeed_config path reference in the finetuning script (#2680)
---
funasr/models/transformer/positionwise_feed_forward.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/funasr/models/transformer/positionwise_feed_forward.py b/funasr/models/transformer/positionwise_feed_forward.py
index 7ca55cb..7cfa5f9 100644
--- a/funasr/models/transformer/positionwise_feed_forward.py
+++ b/funasr/models/transformer/positionwise_feed_forward.py
@@ -34,3 +34,15 @@
return self.w_2(self.dropout(self.activation(self.w_1(x))))
+class PositionwiseFeedForwardDecoderSANMExport(torch.nn.Module):
+ def __init__(self, model):
+ super().__init__()
+ self.w_1 = model.w_1
+ self.w_2 = model.w_2
+ self.activation = model.activation
+ self.norm = model.norm
+
+ def forward(self, x):
+ x = self.activation(self.w_1(x))
+ x = self.w_2(self.norm(x))
+ return x
--
Gitblit v1.9.1