Repository navigation
test(qwen4_exp): pin chained snapshot restores to the cold partition - #2975
Merged
Merged
Conversation
On Qwen3.8-Flash-Next a chained multi-turn prompt-cache hit gave a different greedy completion than a cold run of the same request. A tiny-fixture test now drives the server's chain (restore, prefill, snapshot, keep running, restore again, prefill) and requires bit-for-bit equality with a cold run that forwards the same pieces, so the restore chain loses no state. The real-model gap is the partition effect: switching a cold prefill between chunk 2048 and 512, with no snapshot at all, flips the first token, and every measured difference is one to three bfloat16 units in the last place of the logits. CONTINUOUS_BATCHING.md records the table and why exact chained hits would need a fixed adoption grid, which is not done. Closes #2974
4 tasks
4 tasks done
inureyes
added a commit
that referenced
this pull request
Nov 18, 2026
Bumps every version-tracking workspace crate (mlxcel, mlxcel-core, mlxcel-mlx-pin, mlxcel-surgery, mlxcel-xla) to 0.9.0-beta.1 through `make bump-version` and syncs Cargo.lock. `make verify-versions` passes. Renames the Unreleased changelog section to v0.9.0-beta.1 and records the 190 commits since v0.8.1. The existing entries covered the MLA, prefill-memory and OpenXLA decode work; the section gains grouped bullets for background Responses, the qwen4_exp prompt-cache snapshots and the opt-in checkpoints, MiMo-V2.6, IndicOCR, YOLO11, compressed-tensors FP8, the OpenXLA CUDA GEMV and 31 fixes, plus Performance, Dependencies, CI/CD and Docs sections and the v0.8.1...v0.9.0-beta.1 compare link. The stale Known Issues entry that said DeepSeek V2 keeps the decompressed cache on CUDA and ROCm is removed, since #3149 and #3152 made the latent the default there, and the open issues (#3142, #3144, #2817, the qwen4_exp chained-hit rounding from #2975, and the fp16 fallback for quantized KV on MLA latents) are listed. Regenerates `recipes/registry/` with the 0.9.0-beta.1 snapshot and repoints CURRENT. The snapshot came from `mlxcel arch --json` on a debug build of this tree instead of the release build `make recipes-registry` runs; its output matches a release binary built from the same code apart from the version field. The only family delta from 0.8.1 is the new `mimo_v2_vlm` entry. Updates the release pointers: the README main-branch line with highlights for the DeepSeek V2 latent default and background Responses, the bug report placeholder, CITATION.cff, and the cluster note in `docs/distributed.md` and `cluster_handshake.rs`, since v0.8.1 and v0.9.0-beta.1 cannot share a cluster. SECURITY.md is unchanged because 0.8.x remains the supported stable line.
inureyes
added a commit
that referenced
this pull request
Nov 28, 2026
Bumps every version-tracking workspace crate (mlxcel, mlxcel-core, mlxcel-mlx-pin, mlxcel-surgery, mlxcel-xla) to 0.9.0-beta.3 through `make bump-version` and syncs Cargo.lock. `make verify-versions` passes. Renames the Unreleased changelog section to v0.9.0-beta.3 and covers the 58 commits since v0.9.0-beta.2. The existing entries are kept, and the commits that had none gain entries: the OpenXLA hybrids (Falcon-H1, Jamba, PLaMo 2, Mamba1, Falcon-Mamba) and sigmoid MoE routing, the speculative exactness work, the vision resize and parser parity fixes, ERNIE-4.5 and Nemotron 3 Nano loading, and the CLI and Responses validation fixes. Dependencies, CI/CD, Docs and Known Issues sections and the compare link are added. The chrono to jiff entry that #3462 wrote into the beta.2 section moves here. Known Issues drop #2975 and #3407, which are closed, and add the open Raon-1 mini follow-ups. Regenerates `recipes/registry/` from a release build and repoints CURRENT. It adds `raon1_mini` and the `llava_onevision2` model type on Mage-VL, and removes nothing. Updates the release pointers: the README main-branch line and a Raon-1 mini highlight, CITATION.cff, the bug report placeholder, the cluster note in `docs/distributed.md` and `cluster_handshake.rs`, and the version example in `TECHNICAL_REPORTS/README.md`. The reports index is unchanged because 0.9 is still the line under development; `make verify-reports-index` passes.
inureyes
added a commit
that referenced
this pull request
Nov 30, 2026
Bumps every version-tracking workspace crate (mlxcel, mlxcel-core, mlxcel-mlx-pin, mlxcel-surgery, mlxcel-xla) and the Helm chart's `version` and `appVersion` to 0.9.0 through `make bump-version`, and syncs Cargo.lock. `make verify-versions` passes. Consolidates the Unreleased section and the v0.9.0-beta.1, beta.2 and beta.3 sections into one v0.9.0 section that follows v0.8.1, with a compare link from v0.8.1. Adds entries for the commits since beta.3 that had none: Spark-X2.5, PLaMo 3, Talkie, Nanbeige4.2, Lille 130M, the Laya and d1-omni decision models, the CUDA container images and Helm chart, graceful shutdown, the Linux ROCm release target and runtime bundle, the WebUI redesign, the DeepSeek-VL2 and DeepSeek-OCR prompt fixes, the server and cache fixes, and the CI and docs changes. Known Issues are rebuilt from the current state: #3474 and #3467 move to Fixed, and the entries for closed #2975, #3142, #3144 and #3158 are dropped. Two en dashes are rewritten. Regenerates `recipes/registry/` from a release build and repoints CURRENT. It adds 14 model types (depth_pro_2, flint, gptj, lfm3, lille-130m and lille_130m, minicpm_ocr, nanbeige, nemotron_parse_v3_5, oxr, plamo3, raon1_nano, spark2_5, talkie) and removes none. Updates the release pointers: the README main-branch line plus highlights for the container images and Helm chart and the WebUI redesign, SECURITY.md's supported line (0.9.x), CITATION.cff, the bug report placeholder, the cluster note in `docs/distributed.md` and `cluster_handshake.rs`, the first-image and first-chart release in the Docker and Kubernetes guides (en and ko), and the version example in `TECHNICAL_REPORTS/README.md`. 0.9 stays the current report line, so the reports index is unchanged; `make verify-reports-index` passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2974 reported that chained multi-turn prompt-cache hits on
qwen4_expgave greedy completions different from a cold run, and called the gap much larger than last-bit noise. Investigation shows the restore chain is exact and the gap comes from the prefill partition, at rounding size.Findings
a_chained_restore_matches_a_cold_run_of_the_same_partition, runs the server's chain: prefill, snapshot, restore, prefill more, snapshot, keep running (suffix plus decode), restore again, prefill. It matches a cold run that forwards the same pieces bit for bit, at mid-block and whole-block boundaries in the sparse QSA regime.The-0.125 (Not-2.25)The-0.25 (Not-1.875)Not-0.625 (The-1.0)The-0.5 (Not-1.625)docs/CONTINUOUS_BATCHING.mdalready describes. The issue's "materially larger" reading was wrong.Decision
No code change. Making chained hits match cold exactly would require adopting and splitting only on a fixed grid: periodic checkpoints at a small interval, with history-boundary snapshots no longer adopted. That re-prefills up to one interval per turn, about 1 to 2 s at 2048 tokens on this model, against a 2.8 s turn today. The doc records this table and the trade-off.
Validation
qwen4_expsnapshot tests (17) pass, and clippy-D warningsand fmt are clean. The real-model rows come from freshmlxcel-serverprocesses on M3 Ultra withtemperature 0andlogprobs.Closes #2974