File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# Contact: qubitium@modelcloud.ai, x.com/qubitium
55import torch
66
7- from defuser .modeling .fused_moe .replace_modules import materialize_model_
7+ from defuser .modeling .fused_moe .replace_modules import materialize_model
88from transformers import AutoModelForCausalLM , AutoModelForImageTextToText
99
1010from defuser import convert_hf_model
@@ -45,7 +45,7 @@ def test_qwen3_5_moe():
4545 moe_block = model .model .language_model .layers [0 ].mlp
4646 assert isinstance (moe_block , LinearQwen3_5MoeSparseMoeBlock )
4747
48- materialize_model_ (model .model .language_model .layers [0 ])
48+ materialize_model (model .model .language_model .layers [0 ])
4949
5050 torch .testing .assert_close (moe_block .experts [0 ].gate_proj .weight , expected_gate )
5151 torch .testing .assert_close (moe_block .experts [0 ].up_proj .weight , expected_up )
You can’t perform that action at this time.
0 commit comments