Skip to content

Commit f8c0b98

Browse files
committed
fix typing
1 parent 51c7968 commit f8c0b98

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/llmcompressor/modeling/deepseek_v3.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import torch
2+
from transformers.models.deepseek_v3.modeling_deepseek_v3 import (
3+
DeepseekV3MoE as OriginalDeepseekV3MoE,
4+
)
25

36

47
class DeepseekV3MoE(torch.nn.Module):
@@ -45,7 +48,7 @@ def forward(self, hidden_states):
4548
return hidden_states
4649

4750

48-
def replace(module: "DeepseekV3MoE") -> DeepseekV3MoE:
51+
def replace(module: OriginalDeepseekV3MoE) -> DeepseekV3MoE:
4952
return DeepseekV3MoE(
5053
module.config, module.experts, module.gate, module.shared_experts
5154
)

src/llmcompressor/modeling/prepare.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def update_qwen3_moe(model, stack):
3030
for module in model.modules():
3131
cls_name = module.__class__.__name__
3232
if cls_name == "Qwen3MoeDecoderLayer":
33+
# Optionally update the model.config to pass in other arguments
3334
stack.enter_context(
3435
patch_attr(module, "mlp", replace_Qwen3MoE(model.config, module.mlp))
3536
)

0 commit comments

Comments
 (0)