Defuser 0.0.22__tar.gz → 0.0.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {defuser-0.0.22 → defuser-0.0.23}/Defuser.egg-info/PKG-INFO +1 -1
- {defuser-0.0.22 → defuser-0.0.23}/PKG-INFO +1 -1
- {defuser-0.0.22 → defuser-0.0.23}/defuser/model_registry.py +28 -3
- {defuser-0.0.22 → defuser-0.0.23}/pyproject.toml +1 -1
- {defuser-0.0.22 → defuser-0.0.23}/Defuser.egg-info/SOURCES.txt +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/Defuser.egg-info/dependency_links.txt +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/Defuser.egg-info/requires.txt +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/Defuser.egg-info/top_level.txt +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/LICENSE +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/README.md +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/__init__.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/checkpoint_ops.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/defuser.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/__init__.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/glm4v.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/model_patches.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/moe_experts_interface.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/replace_modules.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/runtime_defusion.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/__init__.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/common.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/glm4_moe.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/glm4_moe_lite.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/mixtral.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/qwen2_moe.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/qwen3_moe.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/qwen3_next.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/unfused_moe/qwen3_omni_moe.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/modeling/update_module.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/utils/__init__.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/utils/common.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/utils/device.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/utils/hf.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/defuser/utils/model.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/setup.cfg +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/setup.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_candidate_coverage.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_convert_model.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_device_utils.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_filter_rules.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_meta_model_defusion.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_moe_experts_interface.py +0 -0
- {defuser-0.0.22 → defuser-0.0.23}/tests/test_replace_modules_tracker.py +0 -0
|
@@ -16,6 +16,9 @@ class PATCH(str, Enum):
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
MODEL_CONFIG = {
|
|
19
|
+
"cohere2_moe": {
|
|
20
|
+
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
21
|
+
},
|
|
19
22
|
"dbrx": {
|
|
20
23
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
21
24
|
},
|
|
@@ -62,8 +65,12 @@ MODEL_CONFIG = {
|
|
|
62
65
|
],
|
|
63
66
|
"checkpoint_mapping": [
|
|
64
67
|
WeightRenaming(".block_sparse_moe.", ".mlp."),
|
|
65
|
-
WeightRenaming(
|
|
66
|
-
|
|
68
|
+
WeightRenaming(
|
|
69
|
+
r".experts.(\d+).w1.weight", r".experts.\1.gate_proj.weight"
|
|
70
|
+
),
|
|
71
|
+
WeightRenaming(
|
|
72
|
+
r".experts.(\d+).w2.weight", r".experts.\1.down_proj.weight"
|
|
73
|
+
),
|
|
67
74
|
WeightRenaming(r".experts.(\d+).w3.weight", r".experts.\1.up_proj.weight"),
|
|
68
75
|
WeightConverter(
|
|
69
76
|
source_patterns=".experts.gate_up_proj",
|
|
@@ -124,7 +131,7 @@ MODEL_CONFIG = {
|
|
|
124
131
|
(
|
|
125
132
|
"transformers.models.qwen3_omni_moe.modeling_qwen3_omni_moe.Qwen3OmniMoeTalkerTextSparseMoeBlock",
|
|
126
133
|
"defuser.modeling.unfused_moe.qwen3_omni_moe.LinearQwen3OmniMoeTalkerTextSparseMoeBlock",
|
|
127
|
-
)
|
|
134
|
+
),
|
|
128
135
|
],
|
|
129
136
|
},
|
|
130
137
|
"glm4_moe": {
|
|
@@ -168,6 +175,9 @@ MODEL_CONFIG = {
|
|
|
168
175
|
"glm4v_moe": {
|
|
169
176
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
170
177
|
},
|
|
178
|
+
"glm4v_moe_text": {
|
|
179
|
+
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
180
|
+
},
|
|
171
181
|
"glm_image": {
|
|
172
182
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
173
183
|
},
|
|
@@ -192,6 +202,9 @@ MODEL_CONFIG = {
|
|
|
192
202
|
"hunyuan_v1_moe": {
|
|
193
203
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
194
204
|
},
|
|
205
|
+
"hy_v3": {
|
|
206
|
+
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
207
|
+
},
|
|
195
208
|
"jamba": {
|
|
196
209
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
197
210
|
},
|
|
@@ -210,6 +223,15 @@ MODEL_CONFIG = {
|
|
|
210
223
|
}
|
|
211
224
|
],
|
|
212
225
|
},
|
|
226
|
+
"llama4_text": {
|
|
227
|
+
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
228
|
+
PATCH.EXPERTS_DEFUSE: [
|
|
229
|
+
{
|
|
230
|
+
"module_class": "transformers.models.llama4.modeling_llama4.Llama4TextExperts",
|
|
231
|
+
"forward_impl": "batched_input",
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
},
|
|
213
235
|
"lfm2_moe": {
|
|
214
236
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
215
237
|
},
|
|
@@ -222,6 +244,9 @@ MODEL_CONFIG = {
|
|
|
222
244
|
"minimax_m2": {
|
|
223
245
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
224
246
|
},
|
|
247
|
+
"minimax_m3_vl": {
|
|
248
|
+
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
249
|
+
},
|
|
225
250
|
"nemotron_h": {
|
|
226
251
|
"min_transformers_version": MIN_SUPPORTED_TRANSFORMERS_VERSION,
|
|
227
252
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|