[Quantization] Support config.json quantization_config format, fix exclude_modules matching, and fix KV cache scale loading for Nemotron (#18546)

Signed-off-by: root <dafrimi@nvidia.com>
This commit is contained in:
danielafrimi
2026-02-21 16:14:29 +08:00
committed by GitHub
parent e239f8aa85
commit 33c33a7de9
3 changed files with 100 additions and 71 deletions
+7
View File
@@ -61,6 +61,7 @@ from sglang.srt.model_loader.weight_utils import (
replace_prefix,
replace_substrings,
)
from sglang.srt.models.utils import WeightsMapper
from sglang.srt.server_args import get_global_server_args
from sglang.srt.utils import (
add_prefix,
@@ -640,6 +641,12 @@ class NemotronHForCausalLM(nn.Module):
"v_proj.v_scale": "attn.v_scale",
}
hf_to_sglang_mapper = WeightsMapper(
orig_to_new_prefix={
"backbone.": "model.",
}
)
def __init__(
self,
*,