[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:
@@ -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,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user