#38574·sglang

[错误] 压缩张量检查点 + NEXTN/MTP 头在构建时出现问题,出现"未找到兼容的压缩张量方案",除非 mtp.* 位于 `ignore` 中(模块未在错误中命名)

作者: rnxrx创建于 2026年9月8日更新于 2026年9月17日
  1. LLM-compressor-style checkpoints use config_groups: {group_0: {targets: ["Linear"], weights: int4/group, input_activations: fp8 dynamic}} plus a long ignore list of everything that was not quantized.
  2. The MTP head is not part of the HF model graph that the quantizer traces, so it is neither quantized nor listed in ignore. Its weights in the checkpoint are plain bf16 (typically re-attached from the base model after quantization).
  3. SGLang's NEXTN path constructs the draft model's Linear layers through the same CompressedTensorsConfig. They match the Linear target by module type, so get_scheme_dict returns the W4A8 args, and _get_scheme_from_parts raises because there is no dense Linear scheme for int4-weight + fp8-activation in SGLang (that combination is MoE-only via CompressedTensorsW4AFP8MoE).
  4. get_linear_scheme only falls back to UnquantizedLinearMethod when weight_quant is None, i.e. when the layer matched nothing or is in ignore. A layer that matches by type but has no quantized tensors in the checkpoint is not considered. For comparison, NVIDIA ModelOpt exports of the same model put mtp.* and model.mtp.* in ignore, so those checkpoints work; LLM-compressor cannot emit that entry because it never sees the MTP weights.
  5. Name the module in the NotImplementedError (the layer_name/prefix is available in get_linear_scheme) and hint at the ignore fix. Today the message gives no way to know which layer failed.
  6. For the draft-model / NEXTN path, treat modules whose checkpoint tensors are unquantized (no weight_packed / weight_scale present) as unquantized instead of raising — or auto-ignore the draft module prefix when the checkpoint carries no quantized tensors for it.
  7. Document the re:mtp\..* (or mtp.*) ignore requirement for NEXTN on compressed-tensors checkpoints.

内容来源: sgl-project/sglang