sgl-project/sglang · error · ValueError
Found static activation scheme for checkpoint that was not s
Error message
Found static activation scheme for checkpoint that was not serialized fp8.
What it means
When an FP8 MoE quant config declares activation_scheme="static", the loader expects per-expert input scales (w13/w2 input_scale tensors) which only exist in FP8-serialized checkpoints. If the checkpoint was not FP8-serialized, those scales cannot exist, so create_fp8_moe_weight_ raises this contradiction.
Source
Thrown at python/sglang/srt/layers/quantization/fp8.py:1384
# If loading fp8 checkpoint, pass the weight loaders.
# If loading an fp16 checkpoint, do not (we will quantize in
# process_weights_after_loading()
if quant_config.is_checkpoint_fp8_serialized:
set_weight_attrs(w13_weight_scale, extra_weight_attrs)
set_weight_attrs(w2_weight_scale, extra_weight_attrs)
if _is_hip and _use_hip_int4:
extra_weight_attrs.update(
{"quant_method": FusedMoeWeightScaleSupported.CHANNEL.value}
)
set_weight_attrs(w13_weight_scale1, extra_weight_attrs)
set_weight_attrs(w2_weight_scale1, extra_weight_attrs)
# INPUT_SCALES
if quant_config.activation_scheme == "static":
if not quant_config.is_checkpoint_fp8_serialized:
raise ValueError(
"Found static activation scheme for checkpoint that "
"was not serialized fp8."
)
w13_input_scale = torch.nn.Parameter(
torch.ones(num_experts, dtype=torch.float32), requires_grad=False
)
layer.register_parameter("w13_input_scale", w13_input_scale)
set_weight_attrs(w13_input_scale, extra_weight_attrs)
w2_input_scale = torch.nn.Parameter(
torch.ones(num_experts, dtype=torch.float32), requires_grad=False
)
layer.register_parameter("w2_input_scale", w2_input_scale)
set_weight_attrs(w2_input_scale, extra_weight_attrs)
else:
layer.w13_input_scale = NoneView on GitHub (pinned to 0132848349)
Solutions
- Use a checkpoint that actually ships FP8 weights and static input scales
- Change activation_scheme to "dynamic" (works with on-the-fly quantization)
- Remove/fix the quantization_config if the model is not quantized
Example fix
// before
{"quant_method":"fp8","activation_scheme":"static"} // on BF16 weights
// after
{"quant_method":"fp8","activation_scheme":"dynamic"} Defensive patterns
Strategy: validation
Validate before calling
qcfg = model_config.quantization_config
if qcfg.get("activation_scheme") == "static" and not qcfg.get("is_checkpoint_fp8_serialized", False):
raise SystemExit("static activation scheme requires an FP8-serialized checkpoint") Type guard
def static_scheme_consistent(qcfg: dict) -> bool:
return qcfg.get("activation_scheme") != "static" or bool(qcfg.get("is_checkpoint_fp8_serialized")) Prevention
- Validate static-scheme configs against checkpoint format before load
- Prefer dynamic scheme for on-the-fly quantization
When it happens
Trigger: Creating MoE weights with quant_config.activation_scheme == "static" and quant_config.is_checkpoint_fp8_serialized == False — a config claiming static FP8 activation quantization over a non-FP8 checkpoint.
Common situations: Hand-written quantization_configs copied from FP8 models onto BF16 weights; configs produced by tools that always emit "static" regardless of serialization; misconverted checkpoints.
Related errors
- QuantConfig has static quantization, but found activation sc
- The hpc_ops MoE runner backend requires static activation sc
- The hpc_ops MoE runner backend only supports FP8-quantized M
- For FP8 Fused MoE layer, we require either per tensor or cha
- The output_size of gate's and up's weight = {intermediate_si
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/3ed5a48a68a8c574.
Report an issue: GitHub.