[Fix] mamba: Skip zero-length Mamba checkpoint reads by jongukc · Pull Request #45604 · sgl-project/sglang · GitHub
Skip to content

[Fix] mamba: Skip zero-length Mamba checkpoint reads - #45604

Open
jongukc wants to merge 2 commits into
sgl-project:mainfrom
jongukc:fix/mamba-skip-zero-length-checkpoint
Open

jongukc wants to merge 2 commits into
sgl-project:mainfrom
jongukc:fix/mamba-skip-zero-length-checkpoint

Conversation

@jongukc

@jongukc jongukc commented Oct 21, 2026 •

Copy link
Copy Markdown

Assisted-by: OpenAI Codex

Motivation

When a request finishes before its first Mamba tracking interval, the int8-checkpoint path reads an unwritten ping-pong state slot, then discards the zero-length checkpoint. The read is unnecessary; no output corruption was observed. Related PR #44718 and PR #39209 address different checkpoint cases.

Modifications

Skip the state read when tracked length is zero; nonempty checkpoints are unchanged. No user-facing documentation changes are needed.

Accuracy Tests

  • Historical Qwen3.5-0.8B-Base HTTP warmup: the unwritten-state read disappeared after the fix.
  • On main 2e7c9d851c, the focused checkpoint suite passed 2/2 with CPU-device and datasets stubs. On the fix branch, Qwen3.5-0.8B-Base served 21/21 HTTP requests on an RTX A6000 with int8 Mamba checkpoints enabled. This was a functional smoke test, not a KVGuard-instrumented read check; the local kernel-version guard was bypassed because sglang-kernel 0.4.5 is older than main requires.

Speed Tests and Profiling

RTX A6000, Qwen3.5-0.8B-Base, int8 checkpoints: two warmed baseline/fix pairs of 80-request rounds at concurrency 8. Output throughput ranges (baseline vs. fix) overlapped for short requests (571–650 vs. 616–647 tok/s) and longer requests (492–526 vs. 454–524 tok/s); no consistent change was observed. An unrelated GPU job overlapped later rounds, so small differences need an exclusive-GPU rerun.

Checklist

Review and Merge Process

  1. Ping Merge Oncalls to start the process. See the PR Merge Process.
  2. Get approvals from CODEOWNERS and other reviewers.
  3. Trigger CI tests with comments or contact authorized users to do so.
    • Common commands include /tag-and-rerun-ci, /tag-run-ci-label, /rerun-failed-ci
  4. After green CI and required approvals, ask Merge Oncalls or people with Write permission to merge the PR.

CI States

Latest PR Test (Base): ❌ Run #39608468704
Latest PR Test (Extra): ❌ Run #39608468354
Latest PR Test (AMD ROCm 10): ❌ Run #39608468413

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant