{"record":{"id":"fc397b243f6d69b2","repo":"sgl-project/sglang","slug":"invalid-expert-pack-configuration-n-details","errorCode":null,"errorMessage":"Invalid expert_pack configuration:\\n{details}","messagePattern":"Invalid expert_pack configuration:\\\\n(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/arg_groups/expert_pack_hook.py","lineNumber":186,"sourceCode":"    if model_kind == DEEPSEEK_V4_MODEL_TYPE:\n        required = (\n            \"source_path\",\n            \"source_sha256\",\n            \"model_identity_sha256\",\n            \"config_sha256\",\n        )\n        for name in required:\n            if not loader_config.get(name):\n                errors.append(f\"deepseek-v4-flash loader config requires {name}\")\n        source_path = parse_path(\"source_path\", loader_config.get(\"source_path\"))\n        if source_path is not None and not source_path.is_file():\n            errors.append(\n                f\"deepseek-v4-flash source GGUF does not exist: {source_path}\"\n            )\n\n    if errors:\n        details = \"\\n\".join(f\"- {error}\" for error in errors)\n        raise ValueError(f\"Invalid expert_pack configuration:\\n{details}\")\n\n    declare_resolution(\n        server_args,\n        \"handle_expert_pack\",\n        disable_cuda_graph=True,\n        disable_shared_experts_fusion=True,\n    )\n    if model_kind == DEEPSEEK_V4_MODEL_TYPE:\n        envs.SGLANG_OPT_FP8_WO_A_GEMM.set(False)\n    logger.info(\n        \"expert_pack selected: CUDA graph and shared-experts fusion are \"\n        \"disabled for correctness.\"\n    )\n","sourceCodeStart":168,"sourceCodeEnd":200,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/arg_groups/expert_pack_hook.py#L168-L200","documentation":"The expert_pack hook (GGUF expert packing, e.g. deepseek-v4-flash) accumulates all configuration problems (missing source GGUF, bad paths, etc.) and raises a single ValueError listing every error found. The message enumerates each specific problem with a dash bullet.","triggerScenarios":"Enabling expert_pack configuration where the referenced source GGUF file(s) do not exist at the given paths, or other invalid expert_pack fields, validated in handle_expert_pack during arg resolution.","commonSituations":"Wrong/relative GGUF path in the server args, moving or renaming the GGUF file, running from a different working directory so a relative path no longer resolves.","solutions":["Read each bulleted '- ...' line in the error; fix every listed problem","Verify source GGUF paths exist: ls <path> from the launch directory; use absolute paths","Re-run; the error is raised before server start so nothing to clean up"],"exampleFix":"# before\n--expert-pack-source relative/path/model.gguf\n# after\n--expert-pack-source /abs/path/to/model.gguf  # verified with ls","handlingStrategy":"validation","validationCode":"import os\nfor p in expert_pack_source_paths:\n    assert os.path.isfile(os.path.expanduser(p)), f\"missing GGUF: {p}\"","typeGuard":null,"tryCatchPattern":"except ValueError as e:\n    if 'expert_pack configuration' in str(e):\n        for line in str(e).splitlines(): print(line)  # each '- ' bullet\n    raise","preventionTips":["Use absolute paths for GGUF sources","Add a pre-launch os.path.isfile check in launch wrappers"],"tags":["gguf","expert-pack","sglang","path-validation"],"backgroundTag":"file-not-found-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}