Skip to content

[Won't Merge]Qwen fp8 #2196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: r1-woq
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions neural_compressor/torch/algorithms/fp8_quant/_core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ def convert_scales_to_tensors_dict(scales_obj, scales_file_format, hp_dtype, dev
"VllmMixtureOfExpertsOpFP8": ModuleInfo("dynamic_moe", PatchedVllmMixtureOfExpertsOpFP8),
# FIXME (Yi) revert change
"FusedMoE": ModuleInfo("linear", PatchedMixtralMoE, False),
# "GaudiMixtralSparseMoeBlock": ModuleInfo("dynamic_moe", PatchedGaudiMixtralSparseMoeBlock),
# "VllmMixtureOfExpertsOp": (
# ModuleInfo("dynamic_moe", PatchedVllmMixtureOfExpertsOpV2)
# if os.getenv("LOW_CPU_MEM", "0") == "1"
# else ModuleInfo("dynamic_moe", PatchedVllmMixtureOfExpertsOpV1)
# ),
"GaudiMixtralSparseMoeBlock": ModuleInfo("dynamic_moe", PatchedGaudiMixtralSparseMoeBlock),
"VllmMixtureOfExpertsOp": (
ModuleInfo("dynamic_moe", PatchedVllmMixtureOfExpertsOpV2)
if os.getenv("LOW_CPU_MEM", "0") == "1"
else ModuleInfo("dynamic_moe", PatchedVllmMixtureOfExpertsOpV1)
),
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ def forward_quant(self,
hidden_states,
expert_routing_table,
router_weights,
layer=None,
permuted_weights=True,
activation="silu"):
experts_range = range(self.num_experts)
Expand Down Expand Up @@ -810,6 +811,7 @@ def forward_measure(self,
hidden_states,
expert_routing_table,
router_weights,
layer=None,
permuted_weights=True,
activation="silu"):
experts_range = range(self.num_experts)
Expand Down