sgl-project/sglang · critical · ValueError
InklingMultimodalProcessor: required config field {where}.{n
Error message
InklingMultimodalProcessor: required config field {where}.{name!r} is missing. It must be set in the model config so preprocessing matches the model. Add it to config.json. What it means
The Inkling multimodal processor requires that the model config (config.json) carries specific fields (e.g. the dmel audio grid parameters) because preprocessing must exactly match what the model was trained with. _raise_if_missing/_require raises when a required attribute is absent or None on the HF config object instead of silently guessing a default, since a mismatched grid yields garbage audio embeddings with no error.
Source
Thrown at python/sglang/srt/multimodal/processors/inkling.py:101
return base64.b64decode(payload) if ";base64" in header else payload.encode()
if url.startswith(("http://", "https://")):
return download_remote_media(url, timeout=30)
return url # plain path / file:// -> handled by the per-modality byte loader
_MISSING = object()
def _require(obj, name, *, where):
"""Read a config field that MUST be present — no silent default.
A wrong-but-silent fallback here corrupts model inputs (e.g. encoding with a
different dmel grid than the model de-bins with yields garbage audio embeddings
and no error), so fail loudly instead.
"""
val = getattr(obj, name, _MISSING) if obj is not None else _MISSING
if val is _MISSING or val is None:
raise ValueError(
f"InklingMultimodalProcessor: required config field {where}.{name!r} is "
f"missing. It must be set in the model config so preprocessing matches "
f"the model. Add it to config.json."
)
return val
class InklingMultimodalProcessor(SGLangBaseProcessor):
# import_processors() registers this for the Inkling arch. Text-only checkpoints leave
# both towers disabled (gated on *_config.decoder_dmodel), so it is a no-op there.
models: List[Type] = [InklingForConditionalGeneration]
def __init__(self, hf_config, server_args, _processor, *args, **kwargs):
super().__init__(hf_config, server_args, _processor, *args, **kwargs)
vision_config = _cfg(hf_config, "vision_config")
audio_config = _cfg(hf_config, "audio_config")
# InklingMMConfig always builds default vision/audio sub-configs (decoder_dmodel=None)View on GitHub (pinned to 0132848349)
Solutions
- Inspect the model's config.json and add the missing field with the value the base checkpoint used (compare against the original repo on the Hub)
- If using a local finetune/export pipeline, ensure custom config keys are preserved on save
- Verify you are loading the correct revision of the checkpoint (git checkout of the HF revision)
Example fix
// before (config.json)
{ "architectures": ["InklingForConditionalGeneration"] }
// after
{
"architectures": ["InklingForConditionalGeneration"],
"audio_config": { "dmel": { "n_mels": 128, "sampling_rate": 24000 } }
} Defensive patterns
Strategy: validation
Validate before calling
REQUIRED = ['audio_config'] # per processor docs
cfg = AutoConfig.from_pretrained(model_id).to_dict()
missing = [k for k in REQUIRED if cfg.get(k) is None]
if missing:
raise RuntimeError(f'config.json missing {missing}; fix checkpoint before serving') Type guard
def has_required_config(cfg: dict, keys: list[str]) -> bool:
return all(cfg.get(k) is not None for k in keys) Prevention
- Validate checkpoints right after download/export
- Diff config.json against the base model repo before serving finetunes
- Pin HF revision IDs
When it happens
Trigger: Loading an Inkling model whose config.json is missing one of the required fields (deleted during quantization/export, hand-edited, or from an older checkpoint); passing a config where the field is explicitly null.
Common situations: Community-uploaded checkpoints with stripped config fields; converting/merging models and dropping extra keys; finetuned saves that didn't persist custom fields.
Related errors
- InklingMultimodalProcessor: {n_img_ph} image placeholder tok
- InklingMultimodalProcessor: {n_aud_ph} audio placeholder tok
- InklingMultimodalProcessor v1 requires pre-rendered input_id
- Helion KDA decode requires power-of-two key and value head d
- `A_log` must have {HV} elements (got {A_log.numel()}).
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/62b0115c6cccc56f.
Report an issue: GitHub.