[Misc][Model][Refactor] Pass the prefix into Linear layers (#31669)

Signed-off-by: Wang Kunpeng <1289706727@qq.com>
This commit is contained in:
Wang Kunpeng
2026-01-05 20:03:18 +00:00
committed by GitHub
parent 02dbb933cb
commit 5708297e4e
17 changed files with 181 additions and 40 deletions
+5 -1
View File
@@ -86,7 +86,11 @@ class OlmoeMoE(nn.Module):
# Gate always runs at half / full precision for now.
self.gate = ReplicatedLinear(
hidden_size, num_experts, bias=False, quant_config=None
hidden_size,
num_experts,
bias=False,
quant_config=None,
prefix=f"{prefix}.gate",
)
self.experts = FusedMoE(