sgl-project/sglang · critical · RuntimeError
Failed to load MiniMax H3 Qwen3-VL weight {name!r}: checkpoi
Error message
Failed to load MiniMax H3 Qwen3-VL weight {name!r}: checkpoint={tuple(loaded_weight.shape)}, parameter={tuple(param.shape)} What it means
A wrapper around per-weight loading failures: either keeping the checkpoint tensor directly or invoking the weight_loader raised. The message records both checkpoint and parameter shapes to disambiguate sharding/shape problems from dtype/device issues; the original exception is chained via `from exc`.
Source
Thrown at python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py:426
"Unexpected MiniMax H3 Qwen3-VL checkpoint weight: "
f"{name} (mapped to {param_name})"
)
weight_loader = getattr(param, "weight_loader", default_weight_loader)
try:
can_keep_checkpoint_tensor = bool(
getattr(self, "_keep_checkpoint_mapping", False)
and weight_loader is default_weight_loader
and param.device.type == "cpu"
and loaded_weight.device.type == "cpu"
and loaded_weight.dtype == param.dtype
and tuple(loaded_weight.shape) == tuple(param.shape)
)
if can_keep_checkpoint_tensor:
param.data = loaded_weight
else:
weight_loader(param, loaded_weight.to(param.dtype))
except Exception as exc:
raise RuntimeError(
"Failed to load MiniMax H3 Qwen3-VL weight "
f"{name!r}: checkpoint={tuple(loaded_weight.shape)}, "
f"parameter={tuple(param.shape)}"
) from exc
loaded.add(param_name)
return loaded
EntryClass = MiniMaxH3Qwen3VLEncoder
__all__ = ["MiniMaxH3Qwen3VLEncoder"]
View on GitHub (pinned to 0132848349)
Solutions
- Compare the reported checkpoint vs parameter shapes; if they differ by a TP factor, re-shard the checkpoint or fix --tp-size
- Inspect the chained exception (raise ... from exc) for the root cause before this wrapper
- Re-download/verify the checkpoint files (checksums) if shapes look arbitrary
Defensive patterns
Strategy: try-catch
Validate before calling
for n, t in weights:
p = dict(model.named_parameters()).get(_map_checkpoint_name(n))
if p is not None and tuple(t.shape) != tuple(p.shape):
logger.warning("shape mismatch %s: ckpt %s vs param %s", n, tuple(t.shape), tuple(p.shape)) Try / catch
try:
model.load_weights(weights)
except RuntimeError as e:
cause = e.__cause__
logger.error("weight load failed: %s (root: %s)", e, cause)
raise Prevention
- Match --tp-size to checkpoint shard layout
- Inspect chained root-cause exceptions, not just the wrapper message
- Verify checkpoint checksums after download
When it happens
Trigger: load_weights where param.data assignment or weight_loader(param, loaded_weight.to(param.dtype)) throws — shape mismatch between loaded_weight and param, unsupported dtype conversions, or column/row-parallel weight loaders rejecting the shard.
Common situations: Tensor-parallel sharding where the checkpoint shard count doesn't match the TP degree; quantized params whose weight_loader can't accept the raw tensor; corrupted safetensors slices.
Related errors
- Rank-local TP shard produced for DTensor parameter {target_p
- MiniMax H3 attention heads must be divisible by TP size: {ar
- TP size must be positive.
- MiniMax H3 {name}={value} must be divisible by TP size {tp_s
- TP-local heads {local_heads} not divisible by Ulysses world
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/8eda834bc0602107.
Report an issue: GitHub.