{"record":{"id":"e61e9c6f4edc56d8","repo":"sgl-project/sglang","slug":"hicache-host-memory-mode-buffer-only-does-not-su","errorCode":null,"errorMessage":"--hicache-host-memory-mode buffer_only does not support sidecar storage pools (DeepSeek-V4 compressed regions).","messagePattern":"--hicache-host-memory-mode buffer_only does not support sidecar storage pools \\(DeepSeek-V4 compressed regions\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/mem_cache/buffer_mode/pipeline.py","lineNumber":159,"sourceCode":"    \"\"\"Drop one content ref per page hash (at storage-ack).\"\"\"\n    for h in hash_values:\n        n = refs.get(h, 0) - 1\n        if n <= 0:\n            refs.pop(h, None)\n        else:\n            refs[h] = n\n\n\ndef validate_buffer_only_stack(\n    sidecar_pool_specs: list, swa_component: Optional[SWAComponent]\n) -> None:\n    \"\"\"Post-assembly buffer-mode fences.\n\n    Sidecar pools (DSv4 compressed regions) and unified_kv SWA (device-only\n    ring, never offloaded) have no per-pool staging path yet.\n    \"\"\"\n    if sidecar_pool_specs:\n        raise ValueError(\n            \"--hicache-host-memory-mode buffer_only does not support \"\n            \"sidecar storage pools (DeepSeek-V4 compressed regions).\"\n        )\n    swa = swa_component\n    if swa is not None and swa._swa_kv_pool_host is None:\n        # Only reachable on SWA models with the unified_kv layout (SWA as\n        # a device-only ring): without a host pool the window can neither\n        # stage for writes nor fetch for load-backs.\n        raise ValueError(\n            \"--hicache-host-memory-mode buffer_only on SWA models \"\n            \"requires an SWA host staging pool; the unified_kv layout \"\n            \"keeps SWA as a device-only ring.\"\n        )\n    if swa is not None and swa._swa_kv_pool_host is not None:\n        # Below two windows the pool cannot hold a staging write AND the\n        # loads-priority reserve (_aux_loads_margin floors at one\n        # window), so every window-carrying intent would be dropped as\n        # oversize and SWA storage coverage would silently be zero.","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/mem_cache/buffer_mode/pipeline.py#L141-L177","documentation":"Raised during HiCache initialization when --hicache-host-memory-mode buffer_only is combined with a model that uses sidecar storage pools (DeepSeek-V4 compressed regions). Buffer-only mode has no per-pool staging path for sidecar pools, so the configuration is rejected upfront rather than silently misbehaving at runtime.","triggerScenarios":"Launching a server with --hicache-host-memory-mode buffer_only on a DeepSeek-V4 model whose memory pool specs include sidecar pools (compressed regions); init_hicache calls validate_buffer_only_stack with non-empty sidecar_pool_specs.","commonSituations":"Enabling buffer_only host memory mode to cut host RAM usage on a DSv4 compressed-KV model; upgrading to a model with sidecar pools without changing the hicache flags.","solutions":["Remove --hicache-host-memory-mode buffer_only (or drop the flag) for DeepSeek-V4 models with compressed sidecar regions","Switch to a supported hicache host memory mode (e.g. the default/preload mode) that supports sidecar pools","If you don't need DSv4 compressed regions, load a model without sidecar pools before using buffer_only"],"exampleFix":"# before\npython -m sglang.launch_server --model deepseek-ai/DeepSeek-V4 --hicache-host-memory-mode buffer_only\n# after\npython -m sglang.launch_server --model deepseek-ai/DeepSeek-V4","handlingStrategy":"validation","validationCode":"sidecar = getattr(model_config_memory_specs, \"sidecar_pool_specs\", None)\nif server_args.hicache_host_memory_mode == \"buffer_only\" and sidecar:\n    raise SystemExit(\"buffer_only unsupported with sidecar pools; drop the flag\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check hicache mode compatibility flags in a launch wrapper script for new model families","Read release notes when enabling DSv4 compressed regions","Fail fast at startup with explicit arg validation rather than relying on init_hicache"],"tags":["hicache","buffer-only","deepseek-v4","sidecar-pool","configuration"],"backgroundTag":"unsupported-feature-configuration","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}