{"record":{"id":"10d160e2eecd27f3","repo":"microsoft/VibeVoice","slug":"missing-acoustic-semantic-tokenizer-config-in-mode","errorCode":null,"errorMessage":"Missing acoustic/semantic tokenizer config in model config","messagePattern":"Missing acoustic/semantic tokenizer config in model config","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"vllm_plugin/model.py","lineNumber":218,"sourceCode":"            target_hidden_size = get_cfg(decoder_config, \"hidden_size\")\n\n        if target_hidden_size is None and text_config is not None:\n            target_hidden_size = get_cfg(text_config, \"hidden_size\")\n\n        if target_hidden_size is None:\n            target_hidden_size = get_cfg(config, \"hidden_size\")\n\n        if target_hidden_size is None:\n            print(\"[VibeVoice] WARN: Could not find hidden_size in config! Defaulting to 3584 (7B).\", file=sys.stderr)\n            self.hidden_size = 3584\n        else:\n            self.hidden_size = target_hidden_size\n\n        ac_cfg = get_cfg(config, \"acoustic_tokenizer_config\")\n        sc_cfg = get_cfg(config, \"semantic_tokenizer_config\")\n        \n        if ac_cfg is None or sc_cfg is None:\n            raise ValueError(\"Missing acoustic/semantic tokenizer config in model config\")\n\n        # Handle both dict and already-constructed config objects\n        if isinstance(ac_cfg, VibeVoiceAcousticTokenizerConfig):\n            acoustic_config = ac_cfg\n        elif isinstance(ac_cfg, dict):\n            acoustic_config = VibeVoiceAcousticTokenizerConfig(**ac_cfg)\n        else:\n            raise TypeError(f\"acoustic_tokenizer_config has unexpected type: {type(ac_cfg)}\")\n        \n        if isinstance(sc_cfg, VibeVoiceSemanticTokenizerConfig):\n            semantic_config = sc_cfg\n        elif isinstance(sc_cfg, dict):\n            semantic_config = VibeVoiceSemanticTokenizerConfig(**sc_cfg)\n        else:\n            raise TypeError(f\"semantic_tokenizer_config has unexpected type: {type(sc_cfg)}\")\n        \n        # Tokenizers use float32 for numerical precision\n        self.acoustic_tokenizer = VibeVoiceAcousticTokenizerModel(acoustic_config)","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/microsoft/VibeVoice/blob/94da20d98b2fa7688e9cbfaf7692ddb4954f7600/vllm_plugin/model.py#L200-L236","documentation":"Thrown while constructing the VibeVoice vLLM model: the HF model config must contain both `acoustic_tokenizer_config` and `semantic_tokenizer_config` sections (fetched via get_cfg on the model config). These describe the two tokenizer heads the model instantiates (VibeVoiceAcousticTokenizerModel / VibeVoiceSemanticTokenizerModel). If either is absent (get_cfg returns None), the model refuses to build because there is no sane default for tokenizer hyperparameters.","triggerScenarios":"Loading a fine-tune or converted checkpoint whose config.json was stripped down to LLM-only keys; pointing --model at a base Qwen2.5 repo instead of the VibeVoice repo; a config.json saved from a dataclass that dropped nested config sections; using a VibeVoice checkpoint older than the plugin's expected config schema.","commonSituations":"Merging/quantizing checkpoints (mergekit, AWQ, GGUF round-trips) where nested config dicts were flattened or lost; users copying only safetensors weights into a new repo without the full config.json; plugin version newer than the checkpoint's config format.","solutions":["Verify the target repo's config.json contains top-level `acoustic_tokenizer_config` and `semantic_tokenizer_config` objects; if missing, copy those sections from the official VibeVoice model repo of the matching version.","Confirm you are loading the actual VibeVoice model ID, not the underlying Qwen2.5 base model.","Re-save the config from a working checkout: load the official model, model.config.save_pretrained(...), then merge your weight changes.","If the keys exist under different names (e.g. nested in `decoder_config`), normalize them to the top level expected by get_cfg."],"exampleFix":"# before (config.json)\n{\"architectures\": [\"Qwen2ForCausalLM\"], \"hidden_size\": 3584, ...}\n\n# after (config.json)\n{\n  \"architectures\": [\"VibeVoiceForConditionalGeneration\"],\n  \"hidden_size\": 3584,\n  \"acoustic_tokenizer_config\": {\"hidden_size\": 1024, \"vocab_size\": 8194, ...},\n  \"semantic_tokenizer_config\": {\"hidden_size\": 1024, \"vocab_size\": 8194, ...},\n  ...\n}","handlingStrategy":"validation","validationCode":"import json, urllib.request\n\ndef validate_model_config(repo_id_or_path: str) -> bool:\n    if \"/\" in repo_id_or_path and not repo_id_or_path.startswith((\"/\", \".\")):\n        cfg = json.load(urllib.request.urlopen(\n            f\"https://huggingface.co/{repo_id_or_path}/raw/main/config.json\"))\n    else:\n        cfg = json.load(open(f\"{repo_id_or_path}/config.json\"))\n    missing = [k for k in (\"acoustic_tokenizer_config\", \"semantic_tokenizer_config\")\n               if not isinstance(cfg.get(k), dict)]\n    if missing:\n        print(f\"config.json missing/invalid sections: {missing}\")\n        return False\n    return True","typeGuard":null,"tryCatchPattern":"try:\n    llm = LLM(model=model_id, ...)\nexcept ValueError as e:\n    if \"Missing acoustic/semantic tokenizer config\" in str(e):\n        raise SystemExit(\n            f\"{model_id} is not a full VibeVoice checkpoint; \"\n            \"use the official repo or merge tokenizer config sections into config.json\")\n    raise","preventionTips":["Pin the official VibeVoice model repo ID in deployment configs; never point at the base Qwen repo.","After any checkpoint merge/quantization, diff config.json against the official release's config.json before serving.","Add a startup smoke test that constructs the engine once in CI."],"tags":["model-config","checkpoint","huggingface","initialization","vllm"],"backgroundTag":null,"analyzedSha":"94da20d98b2fa7688e9cbfaf7692ddb4954f7600","analyzedAt":"2026-08-15T04:12:07.418Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}