[CPU][Zen] Add DA8W4 (W4A8) int4 support for dense and MoE layers (#54024)

Signed-off-by: R <Ganesh.R@amd.com>
Signed-off-by: Ganesh R <Ganesh.R@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ganesh R
2026-10-01 15:18:25 +08:00
committed by GitHub
co-authored by Cursor mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 4d6874d137
commit e12291d733
9 changed files with 1184 additions and 15 deletions
+4 -1
View File
@@ -76,6 +76,8 @@ _GPT_OSS_STREAMED_EXPERT_SUFFIX_TO_SHARD = {
"w2_bias": "gpt_oss_w2",
"w13_weight_scale": "gpt_oss_w13",
"w2_weight_scale": "gpt_oss_w2",
"w13_weight_packed": "gpt_oss_w13",
"w2_weight_packed": "gpt_oss_w2",
}
@@ -263,7 +265,7 @@ class GptOssRoutedExperts(RoutedExperts):
) -> None:
tp_rank = self.moe_config.moe_parallel_config.tp_rank
is_w13 = shard_id == "gpt_oss_w13"
is_weight = weight_name.endswith("_weight")
is_weight = weight_name.endswith(("_weight", "_weight_packed"))
is_partitioned_scale = weight_name.endswith("_weight_scale")
if is_weight:
@@ -347,6 +349,7 @@ class GptOssRoutedExperts(RoutedExperts):
) or quant_method_name in (
"CompressedTensorsW4A4Nvfp4MoEMethod",
"Nvfp4OnlineMoEMethod",
"CompressedTensorsWNA16MoEMethod",
):
self._load_packed_expert(expert_data, loaded_weight, weight_name, shard_id)
else: