Repository navigation
Description
Thank you for v0.2.6. The prompt path is much faster on my machine: with the MTP draft off, prefill on the 29.6K-token prompts went from about 416 to 1,982 tok/s, and decode went from 46.1 to 58.2 tok/s on short prompts (45.7 → 48.3 tok/s at ~3.8K tokens, 46.2 → 41.6 tok/s at ~29.6K tokens; client-clock medians, full table in the comment below). While re-running my benchmark with the MTP draft on, I hit an engine error that I did not see on v0.2.5. I would like to report it, with the log, in case it is useful.
Environment
- bloomery 0.2.6, built locally from the v0.2.6 tag (537f719). The only local change is a
POST /shutdownand aPOST /shutdown/nowroute inapi.rs, because I stop the server over HTTP on this WSL2 box. - RTX 5090 32 GB, driver 610.88, Core Ultra 9 285K, 196 GB RAM, WSL2.
unsloth/Qwen3.8-Flash-Next-GGUFUD-Q4_K_XL at revision 38bb39e, with the shared Q8_0 MTP draft.
Command (I explicitly unset BLOOMERY_RESIDENCY, BLOOMERY_XSTREAM and BLOOMERY_MTP_WIDTH, so their defaults apply)
BLOOMERY_DRAFT=mtp bloomery-serve --place a -m Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf \
--parallel 1 --ctx-size 40960 --host 127.0.0.1 --port 18081What I sent (chat completions, streaming, temperature 0, top_k 1, thinking disabled; the performance requests use max_tokens 256 and a fresh random nonce at the start of every prompt so there is no prefix reuse)
- A "Say hello." load probe (15 prompt tokens), one short prompt of 76 tokens, one 3.7K-token prompt, 8 short prompts, and 3 prompts of about 3.8K tokens. All were answered, and
mtp widthchose its widths by cost (e about 2.3 to 2.5). - A 29,454-token prompt (random filler words and a fixed question). It was answered with 256 tokens. Its log line shows that the chooser had mostly stopped drafting:
mtp width windows=22 kept=[9,6,4,3] widths=[210,9,4,9] e=2.045
Right before it, the server printed a snapshot refusal that mentions the draft store holding one position more than the state:
bloomery-serve-qwen38: cache skip positions=29709 why=the engine took no snapshot: snapshot at position 29709: qwen4exp snapshot: a state at 29709 of a draft store that holds 29710 positions - The next request, a different 29,590-token prompt (common prefix 10 tokens with the held state), stopped the engine near the end of its prompt:
cache reuse common=10 ask=10 kept=0 held=29709 reason=no-checkpoint: the recurrent state stands at 29709 and no checkpoint lies at or below 10
bloomery-serve: the engine failed; the server stops instead of serving it
engine: card=GeForce_RTX_5090 position=29591
error: engine: pass at position 29590: MTP window: a step after rows whose hidden rows the step's own arena held (a prompt fed by steps): the step overwrote them
After that the server returned 503 and exited (exit code 70).
What I compared
- The same request stream with
BLOOMERY_DRAFT=offon v0.2.6 completed all of it, including three 29.6K-token prompts, and a separate 30-prompt quality set. - v0.2.5 with the MTP draft completed three 29.4K to 29.8K-token prompts. That run took fewer short repetitions, which shifted the random filler, so this is not a byte-identical comparison.
- I have only this one observation of the failure so far.
Where I looked (reading only, I may be wrong)
The message comes from Draft::stepped in crates/app/src/mtp.rs, and Draft::held (the path of a pass the width chooser held back) is the other place that touches the step arena. The log above makes me wonder whether, after a long stretch of chooser-held plain steps, the draft store is one position ahead of the target state, and the next prompt call that continues the held sequence then trips the check. I did not test this beyond the log.
Next I plan to run a few short diagnostics on the same request stream (the defaults again on two fresh servers, BLOOMERY_MTP_WIDTH=fixed, and BLOOMERY_XSTREAM=off), and I will add the results here.
I can attach the full server log with local paths removed (about 1,800 lines, mostly residency pass records) and the request script, and I am happy to test a patch or run with extra logging (for example BLOOMERY_MTP_WINDOWS=1) on this machine.
Thank you again for the work on this, and for the quick turnaround on #1.
Activity
avlp12 commentedon Oct 8, 2026
For context, here are the speeds I measured on v0.2.6 in the same session, on the same box and model (RTX 5090 32 GB, driver 610.88, WSL2, Qwen3.8-Flash-Next UD-Q4_K_XL rev 38bb39e, default residency,
--place a). Throughput and latency are client-clock medians (streaming, 256 generated tokens, temperature 0, fresh random nonce per prompt); draft acceptance is the median per-stream accepted/proposed ratio from the server timings. Each is compared with v0.2.5 under the same settings.MTP draft off,
--parallel 1,--ctx-size 40960n = 3 per row on v0.2.5. On v0.2.6, n = 8 for the short row and 3 for the others. Quality on my 30-prompt set was 24/25 scored items with no garbled output, and 22 of 30 greedy answers were byte-identical to v0.2.5.
MTP draft on,
--parallel 2,--ctx-size 81920(two concurrent short prompts of 75–79 tokens, 3 rounds)MTP draft on,
--parallel 1,--ctx-size 40960. This is the configuration that hit the error above, so I have no v0.2.6 numbers for it yet. For reference, v0.2.5 gave decode 48.8 / 53.0 / 47.4 tok/s and prefill 121 / 407 / 390 tok/s on the short / ~3.8K / ~29.6K prompts.On v0.2.6 with the MTP draft off, peak VRAM was 31.1 GiB and peak host RSS 109.8 GiB (100.4 GiB on v0.2.5).
With the MTP draft off, the time to first token on a ~29.6K-token prompt went from about 72 s to 15 s on v0.2.6. Thank you for the update.
avlp12 commentedon Oct 8, 2026
I ran a short diagnostic on the same box (v0.2.6, the same build, model and flags as above, MTP draft on,
--parallel 1,--ctx-size 40960). I replayed the same request stream on a fresh server for each arm: the "Say hello." probe, followed by 16 requests (two warm-ups of 76 and 3,728 tokens, 8 short prompts, 3 prompts of about 3.8K tokens, and 3 of about 29.6K tokens), with the same request bytes across arms. The completion counts below exclude the initial probe. Each arm stopped at its first error.engine: pass at position 3776: MTP window: a step after rows whose hidden rows the step's own arena held (a prompt fed by steps): the step overwrote them(12 requests completed before it)BLOOMERY_MTP_WIDTH=fixedBLOOMERY_XSTREAM=offSo with the defaults the failure is intermittent rather than tied to one prompt. Across three fresh servers on the same request bytes, I saw it twice, at different places (position 29590 on the second ~29.6K prompt in the original run, and position 3776 on a ~3.8K prompt here), and one run was clean.
fixedwidth andxstream=offeach completed once, which is consistent with either path being involved but, with one run each, does not show which one. In D0b the lastmtp widthlines before the error werewidths=[0,1,120,8] e=1.992andwidths=[66,27,58,5] e=2.100.Speeds from the completed arms (client-clock medians, 256 generated tokens, temperature 0):
MTP_WIDTH=fixedXSTREAM=offOne thing I noticed: with
xstream=off, decode after a long prompt stays at about 65 tok/s, while with the defaultsplitit drops to about 39 tok/s after a ~29.6K-token prompt (prefill is about 4.8x faster withsplit). I have not looked into why.I can attach the four server logs (paths removed) and the replay script. I am also happy to run more repeats or a patched build.
README: 0.2.6's known MTP window refusal (#3) and its workaround unti…
app: MtpDraft::stepped store-walks the step-arena refresh it records …
gate_qwen4exp_mtp: (i) the width chooser's held pass right after the …
app: the MTP window's decisions move into mtp/policy.rs (Policy over …
release: 0.2.7 — README status 0.2.7 (#3 fixed; the A6000 Qwen3.8 tab…
midagedev commentedon Oct 8, 2026
Thank you for the detailed report and the diagnostics. They led straight to the cause.
Cause: the server feeds the last prompt id as one plain step. That step left the MTP draft's anchor row unstored. When the width chooser held back the next pass (its gate was closed after the long low-acceptance request), the held pass overwrote that row first. The chooser decides from measured costs, so the failure is intermittent.
BLOOMERY_MTP_WIDTH=fixedavoids it, because the fixed mode never holds a pass.Fix: before a held-back pass steps, the draft now stores the waiting row. A gate clause fails on v0.2.6 with your error text and passes on 0.2.7. The fix is in v0.2.7. On 0.2.6,
BLOOMERY_MTP_WIDTH=fixedis a safe workaround. Thecache skipline before the error is expected and harmless.Two requests, if you have time:
BLOOMERY_XSTREAMand withoff. We suspect WSL2 runs all CUDA streams on one hardware queue, so the expert copies wait in front of every decode launch. Could you rerun one 29.6K request with the default setting andCUDA_DEVICE_MAX_CONNECTIONS=32, and say if decode moves toward theoffnumber?avlp12 commentedon Oct 8, 2026
Thank you for the quick fix and the clear explanation. It matches what I saw: a long, low-acceptance ~29.6K request right before the failure, and
BLOOMERY_MTP_WIDTH=fixedcompleting the same stream.I am happy to help with both requests:
max_tokens8), then 16 requests withmax_tokens256 and distinct seeded nonces, with the same request bytes on every run: two warm-ups, 8 short prompts, 3 of about 3.8K tokens and 3 of about 29.6K tokens. Decoding is greedy and the replay stops at the first error.BLOOMERY_XSTREAMandCUDA_DEVICE_MAX_CONNECTIONS=32and compare its decode with theoffnumber. I also plan to replay the same stream on 0.2.7 with the MTP draft on, to check whether the error recurs on this machine. I will post what I observe once I can schedule these runs.Thank you again.
avlp12 commentedon Oct 8, 2026
Here is the replay script I mentioned. It is standard-library Python and rebuilds the same 17 request bodies that the diagnostic run sent: the "Say hello." probe plus the 16 seeded requests.
--dry-runrebuilds the bodies and checks them against the prompt and body sha256 prefixes recorded from that run. It sends requests only to--base-url, with no environment proxies and no redirects. I extracted it from my harness and checked the bodies byte for byte against what the harness sends. So far I have run the extracted version only against a local test server, not yet against bloomery-serve.bloomery_replay_stream.py (188 lines)
avlp12 commentedon Oct 8, 2026
Here are the results of the two reruns, on the same box (RTX 5090, WSL2) with the replay stream I posted above. Each arm ran on a fresh server; numbers are client-clock medians over the three ~29.6K-token prompts.
1.
CUDA_DEVICE_MAX_CONNECTIONS=32(v0.2.6): in my runs it did not materially close the gap toXSTREAM=off:split)CUDA_DEVICE_MAX_CONNECTIONS=32BLOOMERY_XSTREAM=offBLOOMERY_MTP_WIDTH=fixed), defaultsCUDA_DEVICE_MAX_CONNECTIONS=32BLOOMERY_XSTREAM=offSo the gap between
splitandoffafter a long prompt stays at roughly 20–30 tok/s with the variable set. I set it through the server's launch environment; I have not checked whether WSL2's CUDA honours it.2. v0.2.7 release binary, MTP draft on with defaults: two fresh servers each completed the whole 16-request stream with no engine error (on v0.2.6 the same stream failed on 2 of 3 fresh servers). Decode after the ~29.6K prompts was 39.9 and 40.6 tok/s, prefill 2,023 and 2,036 tok/s.
Thank you again for the fix.
gpu-gates, placement, serve, runtime: the serving seats' rules run on…
gpu, runtime: on Qwen3.8 a prompt call that arrives once the decode h…
cards: the 0.2.8 release pass — rel028-ab (0.2.7 against the candidat…
midagedev commentedon Oct 9, 2026
bloomery 0.2.8 is out: https://github.com/midagedev/bloomery/releases/tag/v0.2.8
It targets the gap in your reruns: decode after the ~29.6K prompts was 37–40 tok/s with the defaults and 60–66 tok/s with
BLOOMERY_XSTREAM=off.Cause: a long prompt moved the GPU's experts to that prompt's hottest set and left them there. The reply then decoded from the wrong set. Now the server puts the set back at the end of each prompt.
On our A6000, at your card's expert budget, MTP off, with the stream from your replay script: decode after the ~29.6K prompts went from 56.6 to 62.9 tok/s (
BLOOMERY_XSTREAM=off: 63.6). The cost is time to first token: +0.3 s at ~3.8K and +0.7 s at ~29.6K.We have not run your machine. If you rerun the replay on 0.2.8, decode after ~29.6K with the defaults is the number we most want to see.
gpu, gpu-gates: a prompt call's return to its start set pipelines its…
avlp12 commentedon Oct 9, 2026
Thank you for v0.2.8. I reran the fixed replay on my RTX 5090 / WSL2 machine. In this run, the slower decode after the roughly 29.6K-token prompts did not recur: the default XSTREAM path gave 60.64 tok/s with MTP off and 66.88 tok/s with MTP on, alongside much faster prefill than
BLOOMERY_XSTREAM=off.All four fresh servers completed the initial probe plus all 16 replay requests without a request/engine failure. I did not reproduce the MTP error from this issue in these runs.
About 29.6K input tokens — client-clock medians, n=3 per row
The default/off decode ratios were 1.031 (MTP off) and 1.034 (MTP on). Prefill was 4.14x and 4.25x the corresponding
offresult. This is a same-session v0.2.8 comparison, with one fresh server per setting, run in the table's order. I did not rerun v0.2.7 in this session, so I am not reporting a matched version-to-version gain or a statistical equivalence result.Setup and timing definition
bloomery-0.2.8-linux-x86_64-cuda-sm86.tar.gzrelease binary, commit6579c4f06d07, with no local server patch.38bb39eand shared Q8_0 MTP draft.--place a --parallel 1 --ctx-size 40960 --host 127.0.0.1 --port 18081.BLOOMERY_DRAFT=offfor F1/F0 andBLOOMERY_DRAFT=mtpfor F1m/F0m.BLOOMERY_XSTREAMunset for F1/F1m andofffor F0/F0m.BLOOMERY_RESIDENCY,BLOOMERY_MTP_WIDTH, andCUDA_DEVICE_MAX_CONNECTIONSunset throughout; MTP used the default adaptive width.max_tokens=8), then 16 streaming requests (max_tokens=256): two warm-ups, eight short prompts, three about 3.8K and three about 29.6K. Greedy (temperature=0,top_k=1), thinking disabled, seeded distinct nonces for replay requests. No retries or additional arms. The long prompts were exactly 29,454 / 29,590 / 29,767 tokens across all four settings, with 256 output tokens each.(completion_tokens - 1) / (total_time - TTFT). Prefill =prompt_tokens / TTFT, so it includes time-to-first-token overhead and is not a pure kernel prefill measurement. Warm-ups and the initial probe are excluded from the tables. Each server used a separate CUDA cache directory; these are post-warm-up request measurements, not cold-load latency.POST /shutdownand exited with code 0 in about 1.00 s. I verified that no model compute process or held workload lock remained afterward.Short and approximately 3.8K input results
The short F0/F1m rows and the 3.8K F0m row had decode CV above 10%; I would treat those as descriptive only. The client and server prefill figures also differed by more than 10% on the short requests; the table consistently uses client-clock values. For the long inputs, decode CV was 1.29% / 1.56% / 4.80% / 4.07% in F1/F0/F1m/F0m order. This replay did not include an answer-quality evaluation.
Per-request long-input timing receipts and binary identity
These are the timing fields from the completed requests, rounded to six decimals; medians above were calculated before rounding. No local paths or generated text are included.
All arms: 16/16 replay requests completed, plus one initial probe; native shutdown HTTP 200; engine exit 0. Total: 64 replay requests + 4 probes. Run date: 2026-10-09 UTC (2026-10-10 KST).
Thank you again for investigating this and for the quick updates.
midagedev commentedon Oct 9, 2026
Thank you for the rerun and the receipts. Decode after the ~29.6K prompts now matches
BLOOMERY_XSTREAM=off(60.64 vs 58.80 tok/s with MTP off), and the default path keeps its 4.1× prefill. Neither the slowdown nor the MTP error came back, so I am closing this issue. Please reopen it if either returns.