hybrid-cache-checkpoints
Skill39k starsChanged 6 days agoApache-2.0View on GitHub
Choose, explain and verify --hybrid-cache-checkpoints-level for hybrid (Mamba / GDN / KDA) models -- where the prefix cache keeps recurrent-state checkpoints, what each level costs, how it interacts with HiCache, the linker and PD, and how to prove a level change on real traffic. Use when a user asks which level to run, why a prefix stopped hitting on a hybrid model, why host or L3 writes are high, or when reviewing a change to Mamba checkpoint placement.
Trending
More talk lately.about the whole repository
Who's talking about sgl-project/sglang
- Vuk Rosić“SGLang Step by Step Beginner Tutorial”YouTube · Sep 4, 2025 · 4.9k views
- NVIDIA Developer“Inference Office Hours with SGLang: Performance Optimizations for LLM Serving”YouTube · Feb 6, 2026 · 3k views
- Fahd Mirza“How-To Use Any Transformers Model with SGLang Easily”YouTube · Jun 25, 2025 · 2.2k views
- Fahd Mirza“Control LLM Output with SGL - SGLang with GPT”YouTube · May 26, 2024 · 1.9k views
- Solopreneurs hub“SGLang: High-Performance LLM Serving for Low Latency AI Infra (GPU/Memory Optimized)”YouTube · Aug 14, 2026 · 1.1k views
The biggest 5 of 71 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 71
Talked about on GitHub, YouTube, Bluesky, Hacker News and Stack Overflow (71 times).
On GitHub · 44
- Sep 23, 2025Feature Request: support qwen3-vl series — ggml-org/llama.cpp153 reactions · 151 comments
- Jun 21, 2025[sglang] Tracking sglang compatibility in slime — THUDM/slime25 reactions · 1 comment
- Feb 18, 2026[Roadmap] Blackwell MXFP8 and NVFP4 RL training — radixark/miles19 reactions · 1 comment
- Nov 22, 2024[Roadmap] veRL Development Roadmap — verl-project/verl17 reactions · 7 comments
- Aug 16, 2025[Feature]: Add provider Sglang — BerriAI/litellm16 reactions · 8 comments
39 more on GitHub
- Apr 23, 2025Support for the Qwen3 models in engine-flow — NVIDIA/TensorRT-LLM16 reactions · 2 comments
- Apr 9, 2025[Feature]: Support structured output and tool call together — vllm-project/vllm14 reactions · 9 comments
- Jan 12, 2026[WIP][Spec Decode] DFlash — vllm-project/vllm13 reactions · 3 comments
- Jul 15, 2026[tml] Inkling model support — radixark/miles11 reactions · 6 comments
- Mar 24, 2026[Feature]: Implement `TRITON_MLA_SPARSE` backend for sm80/120/121 support of Sparse MLA — vllm-project/vllm10 reactions · 15 comments
- Nov 13, 2025Support rollout routing replay — THUDM/slime10 reactions
- Jun 23, 2025Support for Flash Attention 3 — huggingface/transformers10 reactions · 17 comments
- Mar 27, 2025veRL-SGLang Roadmap — zhaochenyang20/Awesome-ML-SYS-Tutorial10 reactions · 32 comments
- Jan 23, 2024Radix Attention support — vllm-project/vllm10 reactions · 2 comments
- Dec 23, 2025Development Roadmap - miles LoRA training support Q1 — radixark/miles8 reactions · 9 comments
- Jan 3, 2026[SGLANG]: 2026 H1 backend roadmap/improvements — ai-dynamo/dynamo7 reactions · 13 comments
- May 30, 2025Add DeepSeek 671B GRPO example — verl-project/verl7 reactions · 2 comments
- Jun 4, 2026DEP: Runtime-Free Router and Gateway On-Ramp — ai-dynamo/dynamo6 reactions · 16 comments
- May 18, 2026DeepSeek V4 kernel support status tracker — flashinfer-ai/flashinfer6 reactions · 9 comments
- Jan 28, 2026[Feature] Update Transformers to v5 — verl-project/verl6 reactions · 2 comments
- Jan 20, 2026Any plan to release flash-attn-cute package? — Dao-AILab/flash-attention6 reactions
- Nov 22, 2025[Kernel] Add NVFP4 MoE CUTLASS support for SM120 — vllm-project/vllm6 reactions · 9 comments
- Sep 22, 2025[Bugfix] Qwen3-next generate ! always — vllm-project/vllm6 reactions · 7 comments
- Aug 22, 2025Project Limit Request: sgl-kernel - 40 GB — pypi/support6 reactions · 6 comments
- Jun 6, 2025hotfix: fix the blackwell fmha stream — flashinfer-ai/flashinfer6 reactions · 1 comment
- May 19, 2025[RoadMap] Mooncake Store V2 — kvcache-ai/Mooncake6 reactions · 17 comments
- Mar 29, 2025[Model] Deepseek-v3 support — mlc-ai/mlc-llm6 reactions
- Feb 10, 2024Add instructions on running llava-v1.6-mistral-7b — haotian-liu/LLaVA6 reactions · 9 comments
- Aug 18, 2026[RFC] Moore Threads MUSA Support Roadmap — sgl-project/sglang-omni5 reactions
- Jun 17, 2026[refactor] weight update refactor — radixark/miles5 reactions · 2 comments
- Feb 28, 2026[Feature]: Eliminate redundant multimodal preprocessing for gRPC backends — smg-project/smg5 reactions · 2 comments
- Jan 4, 2026KTransformers Roadmap (2026 Q1) — kvcache-ai/ktransformers5 reactions · 11 comments
- Sep 20, 2025[FEAT] Deterministic rollout — THUDM/slime5 reactions · 1 comment
- Apr 18, 2025The tests presented in this repository are incorrect due to errors in launching sglang. — simon-mo/vLLM-Benchmark5 reactions · 3 comments
- Feb 27, 2025[Model] [Quantization] Support deepseek v3/r1 w8a8 int8 block-wise quantization — vllm-project/vllm5 reactions · 12 comments
- Nov 23, 2024[Usage] Batch evaluation using sqlang doesn't support llava-v1.5 model — haotian-liu/LLaVA5 reactions
- Nov 5, 2023Batch evaluation — haotian-liu/LLaVA5 reactions · 28 comments
- Aug 21, 2026Helion KDA backend port from sglang https://github.com/sgl-project/sg… — vllm-project/vllm4 reactions · 2 comments
- Mar 5, 2026feat(sglang): introduces SGLang provider support to OpenClaw — openclaw/openclaw4 reactions · 2 comments
- Jan 31, 2026Fix argument type error in _cudnn_gemm_fp4_requirement — flashinfer-ai/flashinfer4 reactions · 6 comments
- Sep 2, 2025[Feat] Single Batch Overlap (SBO): Overlaping of Down GEMM with Combine Send — deepseek-ai/DeepEP4 reactions · 2 comments
- Aug 1, 2025Qwen2.5-VL-7B egale3 train — sgl-project/SpecForge4 reactions · 36 comments
- Jul 25, 2025feat: masked layout fp4 gemm using cute-dsl — flashinfer-ai/flashinfer4 reactions · 2 comments
- Jul 8, 2025[sglang, megatron, perf] feat: speed up megatron sglang weight update by 10x — verl-project/verl4 reactions · 7 comments
On YouTube · 21
- Sep 4, 2025SGLang Step by Step Beginner Tutorial — Vuk Rosić4.9k views · 4 comments
- Feb 6, 2026Inference Office Hours with SGLang: Performance Optimizations for LLM Serving — NVIDIA Developer3k views · 1 comment
- Jun 25, 2025How-To Use Any Transformers Model with SGLang Easily — Fahd Mirza2.2k views · 7 comments
- May 26, 2024Control LLM Output with SGL - SGLang with GPT — Fahd Mirza1.9k views · 6 comments
- Aug 14, 2026SGLang: High-Performance LLM Serving for Low Latency AI Infra (GPU/Memory Optimized) — Solopreneurs hub1.1k views
16 more on YouTube
- Oct 13, 2026Supercharge LLM Inference Speed with SGLang & RadixAttention! 💻⚡ (Open Source) — AI Skill Vault144 views
- May 2, 2026⭐ sglang — 26,936 GitHub Stars — Observe AI93 views
- Nov 7, 2026llama.cpp vs vLLM vs SGLang: Which Is Fastest on One GPU? — Tensor Garage67 views
- Sep 13, 2026Sglang — Everything For AI42 views
- Nov 4, 2026Temperature 0 gave 7 different answers #determinism — Agentic Ajrak37 views
- Oct 25, 2026SGLang's 16 MiB All-Reduce Bug Returned the Wrong Sum — Ankit Kaushal37 views
- Feb 8, 2025GitHub - sgl-project/sglang: SGLang is a fast serving framework for large language models and vis... — GitHub Daily Trend AI Podcast34 views
- Oct 27, 2026SGLang & AKV: 10X Faster AI Agents Explained — The Employee Factorysays it tested it33 views
- Nov 6, 2026⚡ Serve LLMs and Vision Models with SGLang 🚀 — GitGemVault32 views
- Oct 27, 2026SGLang Atomic Uploads: Keep the Good Image When Writing Fails | Request Survival 02 — Ankit Kaushal27 views
- Oct 27, 2026SGLang: Why 6 Tokens Crashed a 3-Slot Request | Request Survival 01 — Ankit Kaushal25 views
- Nov 14, 2026SGLang: 30x faster on a 16 GB GPU — Agentic Ajraksays it tested it19 views
- Oct 8, 2026Sglang — Everything For AI16 views
- Sep 12, 2026739 PRs in one week isn't a project — it's a sprint to own LLM inference. — thezakulo14 views
- Jun 29, 2026Sglang — Everything For AI8 views
- Nov 15, 2026SGLang: Fast Inference Serving for LLMs and Multimodal Models | OpenViST Listing — OpenViST1 view
On Bluesky · 4
- Feb 7, 2025🔥 Hot Repo! 🔥 (100+ new stars) 📦 sgl-project / sglang ⭐ 8,749 (+130) 🗒 Python SGLang is a fast serving framework for large language… — @github-trending.bsky.social4 likes and reposts
- Sep 15, 2026did you have a look to SGlang (github.com/sgl-project/...)? It's more focused on large models, but they integrate all major optimizations… — @aminesaboni.bsky.social1 likes and repost · 1 reply
- Jan 19, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 sgl-project / sglang ⭐ 442 (+134) 🗒 Python SGLang is a structured generation language designed for… — @github-trending.bsky.social1 likes and repost · 1 reply
- Sep 13, 2025you don't want to run models in prod directly with pytorch, it's a fuck ton of work to do properly. Use vLLM or sglang… — @timkellogg.me0 likes and reposts · 1 reply
On Hacker News · 1
- Oct 15, 2026SGLang – High-performance serving framework for LLM's and multimodal models1 point
On Stack Overflow · 1
In this repository32 other files it gives its agents.
- sglang-docs-mintlifyAGENTS.md
- add-jit-kernelSkill
- add-sgl-kernelSkill
- babysit-pr-to-pass-ciSkill
- ci-test-auditSkill
- ci-workflow-guideSkill
- clean-startup-logSkill
- code-cleanupSkill
- compute-mamba-ratioSkill
- cookbook-add-modelSkill
- cookbook-migrate-modelSkill
- cookbook-review-prSkill
- debug-cuda-crashSkill
- debug-distributed-hangSkill
- env-var-conventionsSkill
- generate-profileSkill
- kernel-organizationSkill
- kl-consistency-testSkill
- large-class-styleSkill
- llm-torch-profiler-analysisSkill
- mechanical-refactor-verifySkill
- processor-mm-paritySkill
- processor-model-paritySkill
- rerun-testSkill
- scripted-runtime-notesSkill
- sglang-bisect-ci-regressionSkill
- sglang-cherrypickSkill
- sglang-multi-graph-checkSkill
- sglang-prod-incident-triageSkill
- sglang-runtime-contextSkill
- speculative-namingSkill
- write-sglang-testSkill
The file
Files
Hybrid cache checkpoint levels (--hybrid-cache-checkpoints-level)
A hybrid model can resume a prefix only from a position where the tree holds a recurrent-state checkpoint; KV alone is not enough. The level decides where those checkpoints are taken.
| Level | Checkpoints taken | Per-path cap |
3 | Every prefill chunk and every --mamba-track-interval decode boundary, plus fork points and request ends. | Unlimited (or --mamba-max-states-per-path N). |
2 (default) | Fork points (mamba_branching_seqlen) and request ends. A PD prefill worker treats the complete prompt as the request end. | Soft cap of 1 (or --mamba-max-states-per-path N). |
--mamba-max-states-per-path is deprecated; an explicit value still sets the soft cap at either level (-1 = unlimited). Its old meaning is the cap only; level 2 additionally skips intermediate checkpoints except on the paths described below. The cap is a pruning target, not a hard bound: tail, fork, locked, and device-leaf states can be preserved. Budget and measure retained checkpoints as well as running states; do not assume one state slot per session. With a HiCache host tier in cache mode the cap counts host copies too, and a pruned checkpoint loses its host copy unless that copy is host-locked or has a backup or load-back in flight (MambaComponent._evict_excess_path_states, enabled at HiCache init by UnifiedRadixCache._init_mamba_path_cap_counts_host).
Where it lives
MambaComponent._defers_checkpoint/prepare_for_caching_req(mem_cache/unified_cache/components/mamba.py): below level 3 a running request's checkpoint donates nothing and inserts nothing, except at its fork point or a PD prefill worker's complete prompt.InsertParams.mamba_checkpoint_deferredtellscleanup_after_caching_reqto keepmamba_last_track_seqlen, so the finished insert still lands the prompt-end state.exec.mamba.mamba_path_state_cap(derived,arg_groups/overrides.py::mamba_path_state_cap_of) feeds the cap to both tree cores.- A tree with sliding-window slots keeps checkpointing every chunk at level 2: prefill frees window rows only behind a checkpoint the tree takes.
Choosing a level
- Level 2 when reuse is continuation: multi-turn chat, agents, tool loops, where the next request extends the previous request's full context. Level 2 preserves request-end checkpointing for this reuse pattern. Actual hits depend on checkpoint placement, KV and state capacity, eviction, and usable host backups. Host and L3 receive published checkpoints, including fork and request-end states; skipping intermediate checkpoints can reduce write traffic and pressure on other sessions' tails, but does not guarantee equal hit rates or higher throughput.
- Level 3 when reuse forks from the middle of an earlier prompt that has not forked before: a shared system prompt or few-shot block whose first user arrives alone, regenerating from an earlier turn, exact re-sends of a finished prompt. If level 2 has no usable checkpoint at the shared-prefix boundary, the late arrival recomputes from the nearest usable earlier state (possibly the root), even if more KV is cached. An eligible fork checkpoint can help later siblings while it and its KV remain available. Level 3 provides more intermediate restore positions, not a checkpoint at every possible split.
- At level 2 ordinary requests defer intermediate tree insertion until request finish, except at eligible fork points, the PD prefill prompt end, and the sliding-window path. This limits sharing with concurrent requests during prefill; the tree only inserts KV up to a published state.
Measured (B300)
Historical observations from #49886, specific to the listed traffic and cache configurations. Do not generalize them into guaranteed equal continuation hits, write reductions, or throughput gains. Evaluate the benefit against late-fork recomputation on the target workload.
| Model / setting | Continuation hit | Late-fork hit | Mamba states written to host | Throughput |
| GLM-5.3-Flash, AgentX, HiCache, level 3 + cap 1 | 0.943 | 42,741 out tok/min/GPU | ||
| GLM-5.3-Flash, AgentX, HiCache, level 2 | 0.961 | 45,442 | ||
GLM-5.3-Flash, AgentX, device, extra_buffer_lazy + cap 1 vs level 2 | 0.886 vs 0.888 | 34,814 vs 36,406 | ||
| Qwen3.8-27B probe, HiCache, level 3 vs level 2 | 0.993 vs 0.993 | 1.0 vs 0.0 | 304 vs 87 | host write bytes 66.7 GB vs 33.4 GB |
| Qwen3.8-Flash-Next, AgentX (cookbook B300 TP1 MTP, conc 24), level 3 vs level 2 | 0.961 vs 0.960 | 59,480 vs 60,525 |
Verifying a level on a deployment
Prefix-cache claims need path evidence, not just a hit rate.
- Launch with
--enable-metrics --enable-cache-report(and HiCache / the linker as deployed), once per level, same flags otherwise. - Drive multi-turn sessions where each turn extends the previous turn's prompt plus output, with filler traffic between turns when you want the device copy gone. Then send a late fork: half of an earlier first prompt plus a new suffix.
- Report per-turn
cached_tokens, the late-forkcached_tokens, and the/metricsdeltas:sglang:hicache_backup_tokens_total{pool=...},sglang:load_back_tokens_total{pool=...},sglang:hicache_host_mamba_used_states,sglang:storage_prefetch_hit_tokens_total. - Compare rather than require equal continuation hit rates. If they differ, inspect checkpoint placement, residency, eviction, and host restore coverage. Where level 2 skips intermediate checkpoints, check whether Mamba backup counts decrease; late forks without a matching checkpoint should resume from the nearest usable earlier state. Neither write reduction nor throughput improvement is guaranteed.
- Size the host pool from the boot line
Allocating kv hierarchical KV host pool: N tokens: a--hicache-sizethat leaves the host pool smaller than the probe's working set can cause eviction before reuse and zero host hits at both levels. Check occupancy and eviction before attributing zero hits to checkpoint placement.
Pitfalls
--mamba-max-states-per-path -1is an explicit "unlimited", not "unset"; it overrides level 2's soft cap of 1.- The PD prefill exception keys on
len(origin_input_ids): the insert that covers the whole prompt keeps its state. - Pool splits tuned on AgentX (see the
compute-mamba-ratioskill) depend on the workload and checkpoint configuration. Recheck both state and KV residency when changing levels; do not copy a tuned split without validation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

