Unverified Commit c7a104c1 authored by Bowen Bao's avatar Bowen Bao Committed by GitHub
Browse files

[quantization] Fix scale remapping for mllama4 (#10042)


Co-authored-by: default avatarHAI <hixiao@gmail.com>
parent 97d966a7
...@@ -700,7 +700,7 @@ class Llama4ForConditionalGeneration(nn.Module): ...@@ -700,7 +700,7 @@ class Llama4ForConditionalGeneration(nn.Module):
"""Handle scale parameter remapping. Returns True if handled.""" """Handle scale parameter remapping. Returns True if handled."""
if "scale" in name and "expert" not in name: if "scale" in name and "expert" not in name:
remapped_name = maybe_remap_kv_scale_name(name, params_dict) remapped_name = maybe_remap_kv_scale_name(name, params_dict)
return remapped_name is None return remapped_name is not None and remapped_name != name
return False return False
def _handle_stacked_params( def _handle_stacked_params(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment