Skip to content

v0.2.6: Qwen3.8 with the MTP draft stops with "MTP window: a step after rows whose hidden rows the step's own arena held" on the second ~29.6K-token request (RTX 5090, WSL2) #3

Closed

Description

@avlp12

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 /shutdown and a POST /shutdown/now route in api.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-GGUF UD-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 18081

What 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)

  1. 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 width chose its widths by cost (e about 2.3 to 2.5).
  2. 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
  3. 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=off on 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

  1. avlp12 commented on Oct 8, 2026

    @avlp12
    ContributorAuthor

    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 40960

    prompt decode tok/s (v0.2.5 → v0.2.6) prefill tok/s (v0.2.5 → v0.2.6) time to first token (v0.2.5 → v0.2.6)
    short (~76 tokens) 46.1 → 58.2 132 → 143 0.57 s → 0.53 s
    ~3.8K tokens 45.7 → 48.3 433 → 1,537 8.7 s → 2.5 s
    ~29.6K tokens 46.2 → 41.6 416 → 1,982 71.5 s → 15.0 s

    n = 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)

    v0.2.5 v0.2.6
    aggregate end-to-end throughput (including prefill), tok/s 43.6 55.5
    per-stream decode, median tok/s 25.4 32.9
    draft acceptance, median 0.46 0.43

    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.

  2. avlp12 commented on Oct 8, 2026

    @avlp12
    ContributorAuthor

    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.

    arm setting result
    D0a defaults completed all 16 requests
    D0b defaults (second fresh server) engine error on the 3rd ~3.8K-token prompt: 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)
    D1 BLOOMERY_MTP_WIDTH=fixed completed all 16
    D2 BLOOMERY_XSTREAM=off completed all 16

    So 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. fixed width and xstream=off each completed once, which is consistent with either path being involved but, with one run each, does not show which one. In D0b the last mtp width lines before the error were widths=[0,1,120,8] e=1.992 and widths=[66,27,58,5] e=2.100.

    Speeds from the completed arms (client-clock medians, 256 generated tokens, temperature 0):

    arm decode tok/s (short / ~3.8K / ~29.6K) prefill tok/s (~3.8K / ~29.6K) draft acceptance
    D0a defaults 69.1 / 49.1 / 39.0 1,473 / 1,875 0.55
    D1 MTP_WIDTH=fixed 68.7 / 44.8 / 40.8 1,479 / 1,853 0.44
    D2 XSTREAM=off 61.1 / 69.0 / 64.8 401 / 390 0.48

    One thing I noticed: with xstream=off, decode after a long prompt stays at about 65 tok/s, while with the default split it drops to about 39 tok/s after a ~29.6K-token prompt (prefill is about 4.8x faster with split). 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.

  3. midagedev commented on Oct 8, 2026

    @midagedev
    Owner

    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=fixed avoids 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=fixed is a safe workaround. The cache skip line before the error is expected and harmless.

    Two requests, if you have time:

    1. Your request script. Our release check now replays a stream like yours on the release binary, but your exact script would make it match.
    2. The slower decode after the 29.6K prompts: we could not reproduce it on Linux with an A6000 budgeted to your card's expert pool. Decode records were the same with the default BLOOMERY_XSTREAM and with off. 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 and CUDA_DEVICE_MAX_CONNECTIONS=32, and say if decode moves toward the off number?
  4. avlp12 commented on Oct 8, 2026

    @avlp12
    ContributorAuthor

    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=fixed completing the same stream.

    I am happy to help with both requests:

    1. I will attach the replay script here with local paths removed. It sends a fixed stream: the "Say hello." probe (max_tokens 8), then 16 requests with max_tokens 256 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.
    2. I plan to rerun one ~29.6K request on 0.2.6 with the default BLOOMERY_XSTREAM and CUDA_DEVICE_MAX_CONNECTIONS=32 and compare its decode with the off number. 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.

  5. avlp12 commented on Oct 8, 2026

    @avlp12
    ContributorAuthor

    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-run rebuilds 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)
    #!/usr/bin/env python3
    """Replay a fixed request stream against a bloomery-serve OpenAI-compatible endpoint.
    
    The stream: one non-streaming "Say hello." probe (max_tokens 8), then 16 streaming chat completions
    (max_tokens 256, temperature 0, top_k 1, thinking disabled): two warm-ups (short, about 3.8K tokens),
    8 short prompts, 3 prompts of about 3.8K tokens and 3 of about 29.6K tokens. Each prompt starts with a seeded
    nonce; the long prompts add seeded filler words before a fixed question. The request bytes are
    identical on every run (random.Random(20261006), Python 3 standard library only).
    
    Per request it prints the prompt sha256 prefix, prompt_tokens, completion_tokens, finish_reason and
    client-clock speeds:
      decode  = (completion_tokens - 1) / (t_total - ttft)
      prefill = prompt_tokens / ttft
    It stops at the first HTTP error, SSE error payload, missing [DONE] or reply without usage.
    
    Usage:
      python3 bloomery_replay_stream.py [--base-url http://127.0.0.1:18081] [--model NAME]
      python3 bloomery_replay_stream.py --dry-run     # build the bodies and check them against the pinned shas
    Passing --model adds a "model" field, so the bodies then differ from the pinned shas (the original
    run sent no "model" field).
    """
    import argparse, hashlib, json, random, sys, time, urllib.error, urllib.request
    
    FILLER_SEED = 20261006
    WORDS = ("alpha beta gamma delta epsilon kernel tensor expert router cache layer token stream offload memory "
             "bandwidth latency throughput graph scheduler queue batch window draft verify accept "
             "서울 부산 데이터 모델 추론 속도 메모리 그래픽 카드 전문가 라우터 캐시 토큰").split()
    LONG_ASK = ("Write a detailed, multi-paragraph technical essay (at least 600 words) on how mixture-of-experts "
                "language models are served on a single consumer GPU with experts offloaded to system RAM.")
    GEN, WORDS_4K, WORDS_32K = 256, 2900, 23500
    # (tag, prompt sha256[:16], body sha256[:16] of json.dumps(body, sort_keys=True)) from the original run
    PINNED = [
        ("warm-short", "bffc415eee15b3a7", "c1c352100ca843d7"), ("warm-4k", "de44c222a6fed7c3", "131ea6651f476768"),
        ("short-0", "8a832f6c8d5835e4", "06dcb2ee3aaa9b56"), ("short-1", "53361da45b94a339", "2793799d7b7c4d27"),
        ("short-2", "41a56f48e12838fb", "af3313a26fc7f754"), ("short-3", "1c574cad5c4935d4", "4b9bfa117a8efead"),
        ("short-4", "bbd88a08b1bbd1bf", "444934937774fdb1"), ("short-5", "a59d2cd25c521ab0", "426d229ce9c4d824"),
        ("short-6", "d36f1ae4709a2660", "6508bbefac8a304d"), ("short-7", "cf64f2d5bec05c71", "18dcf3b50459ae6a"),
        ("4k-0", "ef7a7ff0e388c86e", "6a696cbde264afc1"), ("4k-1", "4c15381b86cbacf4", "8c3121544c756405"),
        ("4k-2", "f1081ff525d06c21", "667413725e113bcd"), ("32k-0", "52098b78015d1854", "8a19db1940826535"),
        ("32k-1", "3a167ea5aae2d288", "fcbb2df64111702f"), ("32k-2", "4351128044b4d410", "78b3a45ed57ef41b"),
    ]
    
    
    def sha16(b):
        return hashlib.sha256(b).hexdigest()[:16]
    
    
    def body(content, max_tokens, stream, model=None):
        # key order matters for the wire bytes: keep it as in the original run
        b = dict(messages=[{"role": "user", "content": content}], max_tokens=max_tokens, temperature=0, top_k=1,
                 stream=stream, chat_template_kwargs={"enable_thinking": False})
        if stream:
            b["stream_options"] = {"include_usage": True}
        if model:
            b["model"] = model
        return b
    
    
    def build_stream(model=None):
        """[(tag, prompt, body)] for the probe and the 16 requests, in order."""
        rng = random.Random(FILLER_SEED)
        plan = [("warm-short", 0), ("warm-4k", WORDS_4K)]
        plan += [("short-%d" % i, 0) for i in range(8)]
        plan += [("4k-%d" % i, WORDS_4K) for i in range(3)] + [("32k-%d" % i, WORDS_32K) for i in range(3)]
        out = [("probe", "Say hello.", body("Say hello.", 8, False, model))]
        for tag, words in plan:
            nonce = f"[run {tag} nonce {rng.getrandbits(64):016x}]"
            filler = ("Background notes:\n" + " ".join(rng.choice(WORDS) for _ in range(words)) + "\n\n") if words else ""
            prompt = nonce + "\n" + filler + LONG_ASK
            out.append((tag, prompt, body(prompt, GEN, True, model)))
        return out
    
    
    def check_pinned(stream):
        bad = 0
        for (tag, prompt, b), (ptag, psha, bsha) in zip(stream[1:], PINNED):
            ok = (tag, sha16(prompt.encode()), sha16(json.dumps(b, sort_keys=True).encode())) == (ptag, psha, bsha)
            bad += not ok
            print("%-10s prompt %s body %s %s" % (tag, sha16(prompt.encode()), sha16(json.dumps(b, sort_keys=True).encode()),
                                                  "OK" if ok else "MISMATCH"))
        print("pinned check: %d/%d match" % (len(PINNED) - bad, len(PINNED)))
        return bad == 0 and len(stream) == len(PINNED) + 1
    
    
    class ReplayError(Exception):
        pass
    
    
    class _NoRedirect(urllib.request.HTTPRedirectHandler):
        def redirect_request(self, *args, **kwargs):  # never follow a redirect to another URL
            return None
    
    
    # no environment proxies, no redirects: requests go only to --base-url
    OPENER = urllib.request.build_opener(urllib.request.ProxyHandler({}), _NoRedirect)
    
    
    def send(url, b, timeout):
        data = json.dumps(b).encode()
        req = urllib.request.Request(url, data=data, headers={"Content-Type": "application/json"})
        t0 = time.perf_counter()
        try:
            r = OPENER.open(req, timeout=timeout)
        except urllib.error.HTTPError as e:
            raise ReplayError("HTTP %s: %s" % (e.code, e.read()[:500].decode("utf-8", "replace")))
        if not b["stream"]:
            d = json.loads(r.read())
            if isinstance(d, dict) and d.get("error"):
                raise ReplayError("error payload: %s" % json.dumps(d["error"])[:500])
            ch = (d.get("choices") or [{}])[0]
            return dict(t_total=time.perf_counter() - t0, ttft=None, usage=d.get("usage") or {},
                        finish=ch.get("finish_reason"), text=(ch.get("message") or {}).get("content") or "")
        ttft, text, usage, finish, done = None, [], {}, None, False
        for raw in r:
            line = raw.decode("utf-8", "replace").strip()
            if not line.startswith("data:"):
                continue
            payload = line[5:].strip()
            if payload == "[DONE]":
                done = True
                break
            d = json.loads(payload)
            if isinstance(d, dict) and d.get("error"):
                raise ReplayError("SSE error payload: %s" % json.dumps(d["error"])[:500])
            usage = d.get("usage") or usage
            for ch in d.get("choices") or []:
                finish = ch.get("finish_reason") or finish
                c = (ch.get("delta") or {}).get("content") or ""
                if c:
                    text.append(c)
                    if ttft is None:
                        ttft = time.perf_counter() - t0
        if not done:
            raise ReplayError("stream ended without [DONE]")
        return dict(t_total=time.perf_counter() - t0, ttft=ttft, usage=usage, finish=finish, text="".join(text))
    
    
    def fmt(x, nd=1):
        return "-" if x is None else ("%.*f" % (nd, x))
    
    
    def main():
        ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
        ap.add_argument("--base-url", default="http://127.0.0.1:18081")
        ap.add_argument("--model", default=None, help="adds a 'model' field (bodies then differ from the pinned shas)")
        ap.add_argument("--timeout", type=float, default=900, help="per socket read, seconds")
        ap.add_argument("--wait", type=float, default=1200, help="seconds to retry the probe while the server loads")
        ap.add_argument("--dry-run", action="store_true", help="only build the bodies and check the pinned shas")
        a = ap.parse_args()
    
        stream = build_stream(a.model)
        if a.dry_run:
            sys.exit(0 if check_pinned(stream) else 1)
        url = a.base_url.rstrip("/") + "/v1/chat/completions"
        print("%-10s %-16s %-16s %7s %6s %-8s %8s %9s %9s" % ("tag", "prompt_sha256", "body_sha256", "prompt", "compl",
                                                              "finish", "ttft_s", "prefill/s", "decode/s"))
        t_end = time.time() + a.wait
        for i, (tag, prompt, b) in enumerate(stream):
            while True:
                try:
                    res = send(url, b, a.timeout)
                    break
                except ReplayError as e:
                    print("STOP at %s (request %d of %d): %s" % (tag, i, len(stream) - 1, e))
                    sys.exit(1)
                except (urllib.error.URLError, OSError, ValueError) as e:
                    refused = isinstance(getattr(e, "reason", e), ConnectionRefusedError)
                    if i == 0 and refused and time.time() < t_end:
                        time.sleep(2)
                        continue
                    print("STOP at %s (request %d of %d): %r" % (tag, i, len(stream) - 1, e))
                    sys.exit(1)
            u = res["usage"]
            n, pn = u.get("completion_tokens"), u.get("prompt_tokens")
            if not isinstance(n, int) or n <= 0 or (not res["text"] and not res["finish"]):
                print("STOP at %s (request %d of %d): reply without usage.completion_tokens > 0 or content" % (tag, i, len(stream) - 1))
                sys.exit(1)
            ttft, tot = res["ttft"], res["t_total"]
            dec = (n - 1) / (tot - ttft) if ttft is not None and tot > ttft and n > 1 else None
            pre = pn / ttft if pn and ttft else None
            print("%-10s %-16s %-16s %7s %6s %-8s %8s %9s %9s" % (
                tag, sha16(prompt.encode()), sha16(json.dumps(b, sort_keys=True).encode()), pn, n, res["finish"],
                fmt(ttft, 2), fmt(pre), fmt(dec)), flush=True)
        print("completed: probe + %d requests" % (len(stream) - 1))
    
    
    if __name__ == "__main__":
        main()
  6. avlp12 commented on Oct 8, 2026

    @avlp12
    ContributorAuthor

    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 to XSTREAM=off:

    arm decode after ~29.6K prompt (tok/s) prefill (tok/s)
    MTP off, defaults (split) 38.9 2,025
    MTP off, defaults + CUDA_DEVICE_MAX_CONNECTIONS=32 40.2 1,974
    MTP off, BLOOMERY_XSTREAM=off 60.4 403
    MTP on (BLOOMERY_MTP_WIDTH=fixed), defaults 37.4 1,848
    MTP on (fixed), defaults + CUDA_DEVICE_MAX_CONNECTIONS=32 36.7 1,846
    MTP on (fixed), BLOOMERY_XSTREAM=off 66.2 389

    So the gap between split and off after 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.

  7. midagedev commented on Oct 9, 2026

    @midagedev
    Owner

    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.

  8. avlp12 commented on Oct 9, 2026

    @avlp12
    ContributorAuthor

    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

    Setting Decode (tok/s) Prefill (tok/s) Time to first token (s)
    F1: MTP off, default XSTREAM 60.64 1719.25 17.21
    F0: MTP off, XSTREAM off 58.80 415.39 71.32
    F1m: MTP on, default XSTREAM 66.88 1694.63 17.57
    F0m: MTP on, XSTREAM off 64.69 399.15 74.22

    The default/off decode ratios were 1.031 (MTP off) and 1.034 (MTP on). Prefill was 4.14x and 4.25x the corresponding off result. 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

    • Official bloomery-0.2.8-linux-x86_64-cuda-sm86.tar.gz release binary, commit 6579c4f06d07, with no local server patch.
    • Same Qwen3.8-Flash-Next UD-Q4_K_XL model at revision 38bb39e and shared Q8_0 MTP draft. --place a --parallel 1 --ctx-size 40960 --host 127.0.0.1 --port 18081.
    • BLOOMERY_DRAFT=off for F1/F0 and BLOOMERY_DRAFT=mtp for F1m/F0m. BLOOMERY_XSTREAM unset for F1/F1m and off for F0/F0m. BLOOMERY_RESIDENCY, BLOOMERY_MTP_WIDTH, and CUDA_DEVICE_MAX_CONNECTIONS unset throughout; MTP used the default adaptive width.
    • The same fixed request construction as the replay script above: a non-streaming “Say hello.” probe (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.
    • Decode = (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.
    • All four servers returned HTTP 200 for native POST /shutdown and 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
    Arm Input n Decode (tok/s) Prefill (tok/s) TTFT (s) Decode CV
    F1 short (73–77 tokens) 8 57.36 137.73 0.556 4.54%
    F1 about 3.8K 3 57.81 1138.71 3.317 1.63%
    F0 short (73–77 tokens) 8 53.29 134.39 0.562 13.31%
    F0 about 3.8K 3 58.31 419.08 8.898 2.92%
    F1m short (73–77 tokens) 8 61.64 120.48 0.635 13.67%
    F1m about 3.8K 3 63.70 1114.12 3.390 4.86%
    F0m short (73–77 tokens) 8 65.20 131.55 0.578 8.83%
    F0m about 3.8K 3 53.80 395.88 9.541 13.60%

    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.

    arm,request,prompt_tokens,completion_tokens,decode_tok_s,prefill_tok_s,ttft_s
    F1,32k-0,29454,256,60.639385,1709.439555,17.230209
    F1,32k-1,29590,256,60.660578,1719.253261,17.210961
    F1,32k-2,29767,256,59.002379,1731.163531,17.194794
    F0,32k-0,29454,256,58.676537,415.388766,70.907069
    F0,32k-1,29590,256,60.696333,412.046038,71.812364
    F0,32k-2,29767,256,58.795360,417.378914,71.318888
    F1m,32k-0,29454,256,60.795134,1676.348958,17.570327
    F1m,32k-1,29590,256,66.880442,1712.999985,17.273789
    F1m,32k-2,29767,256,67.874060,1694.631420,17.565472
    F0m,32k-0,29454,256,64.687427,399.145646,73.792612
    F0m,32k-1,29590,256,59.576634,394.829576,74.943727
    F0m,32k-2,29767,256,65.311204,401.040454,74.224432
    bloomery-serve SHA256:
    efc7ab5c8b84b6f8b83f7afb3ab2cdf7f3cb5d6d4f6f5fcfdf08c7114a5606b0
    

    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.

  9. midagedev commented on Oct 9, 2026

    @midagedev
    Owner

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions