Skip to content

patches: recoverssm-exact-commit, bit-identical RecoverSSM GDN commit (vllm#58863 514102a) - #7

Closed
Alssndr0 wants to merge 1 commit into
myllmbox:mainfrom
Alssndr0:recoverssm-exact-commit
Closed

Alssndr0 wants to merge 1 commit into
myllmbox:mainfrom
Alssndr0:recoverssm-exact-commit

Conversation

@Alssndr0

@Alssndr0 Alssndr0 commented Oct 11, 2026 •

Copy link
Copy Markdown

Optional patch, off by default, in the same style as qsa-logits-workspace: backport of commit 514102a of vllm-project/vllm#58863 (by Juergen Schmied, suggested by @ArtyomITA; the PR is still open upstream).

What it changes

One file, model_executor/layers/mamba/gdn/recoverssm_gdn.py:

  • the verify kernel records the decay it multiplied by, exp(g), instead of g;
  • the commit replays the accepted tokens forward with the same update, h = fma(c, k, h * decay), instead of the closed form s0 * decay + corr.

The committed GDN state is then the per-token state bit for bit. The cost is the same: n loads of c, k and the decay.

The v5.2 image has the closed form (the file in sha256:76eda2f6... is the pre-514102a version). On a GB10 the closed form fails the PR's bit-identity checks in tests/kernels/mamba/test_recoverssm_gdn.py. With this change, 62 of 63 of those tests pass; the remaining one is XPU-only.

Tested

  • run.sh's patch step against myllmbox/qwen38-flash-next-vllm:v5.2 (digest 76eda2f6...): the file is copied out of the image, the dry run passes, the patch applies, and the result compiles inside the image.
  • The patched file is byte-identical to the one I have served since 2026-10-08 on one DGX Spark (hibrid48, and INT4-AutoRound in tests), built into a local image on top of v5.2. Output-quality checks there stayed at each checkpoint's run-to-run KL floor. In that image it ran together with other changes; I'll describe those in a separate issue.

To try it:

server:
  patches: recoverssm-exact-commit

… (vllm#58863 commit 514102a)

Optional patch, off by default. The GDN state commit replays the accepted tokens forward with the verify step's own
decay instead of the closed form, so the committed state matches per-token decoding bit for bit. Same cost.
Applies cleanly to the v5.2 image (sha256:76eda2f6...) through run.sh's patch step.
@bilikaz

bilikaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks. Our 0.32 image carries #58863 at a head that already includes 514102a, so the exact commit comes in by default there. For the current v5.2 kit, merging this as an opt-in patch.

@bilikaz bilikaz closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants