Skip to content

GLM-5.3-Flash TP=2 (0.6.0 lineage): with uptime a 13-token prefill reaches 18.8 s and decode falls 40 to 14 tok/s, an idle rank 1 reads 96% GPU, and a restart clears both #993

Closed

Description

@ss-cong

GLM-5.3-Flash TP=2 (0.6.0 lineage): with uptime a 13-token prefill reaches 18.8 s and decode falls 40 → 14 tok/s, an idle rank 1 reads 96% GPU, and a restart clears both

Summary

On two DGX Sparks serving GLM-5.3-Flash at TP=2, we watched the same process on the same
config go from healthy to unusable and back within one afternoon. Nothing was changed between
the two ends; the only action was a restart at the beginning of the window (2026-10-17 15:37
+08:00), and the numbers recovered, then decayed again in under three hours.

  • Healthy (uptime minutes, right after the restart): a 13-token prompt answered in 1.67 s;
    repeating the same prompt resumed from cache in 0.41 s; a 42.6K-token prompt prefilled at
    1645–1918 tok/s; a 369-token reply streamed at 40 tok/s.
  • Degraded (uptime ~3 h, same process, same client): six consecutive 13-token prompts, each
    with a fresh random tail so nothing could be reused (cached_tokens: 0), spent
    2.35, 2.56, 10.81, 12.24, 12.85 and 18.80 s in prefill_s — while the engine reported
    requests_running 0 before four of the six. A 415-token reply decoded at 14 tok/s
    (394 ms per round, 7.03 tokens per round).
  • During those slow rounds neither GPU works: rank 0 reads 0% util / 15.6 W and rank 1
    reads 96% util / 17.8 W, while the container's host threads hold 109% (rank 0) and 130%
    (rank 1) of a CPU core. Rank 1's 96% is the idle-follower spin Qwen3.8-27B TP=2: idle rank 1 spins at ~96% GPU and slows co-located work (#132 does not cover this path) #305 measured on the 27B
    follower ("idle rank 1 spins at ~96% GPU, rank 0 at 0%"), whose GLM counterpart perf(glm): an idle rank 1 waits on the rendezvous TCP store, not in a spinning all-gather #132 says is
    fixed in 0.6.0 — the release we run.

I am reporting this instead of guessing because the two candidates I can name are both engine
behaviour, not client behaviour: a follower that appears to enter its collective before there is
a request, and a per-request prefill cost that does not depend on the prompt. The cost of a
restart is two minutes and an interrupted agent session, so we would like to know what to
measure rather than keep restarting on a timer.

Environment

  • Hardware: 2 × DGX Spark (GB10), TP=2, dual-rail CX7 RoCE v2 (enp1s0f0np0 10.10.10.1/.2
    and enP2p1s0f0np0 10.10.11.x), 200 Gb/s, MTU 9000; driver 580.178.04 both;
    rank 0 = spark-7810 (192.168.1.86), rank 1 = spark-9976 (192.168.1.87).
  • Engine: TensorFold 0.6.0 lineage, container image tensorfold-glm53:v0.6.0
    (sha256:60fad9fcf60ac3a9…), image label tf.patches=8ea91ba1bb04, built from the
    MiaAI-Lab EXL3 recipe
    at 33b50fd (2026-10-06) with its patch set. Checkpoint loaded:
    57edefd2f5d9b371c8345883304d5af68b52fa24 (GLM-5.3-Flash EXL3 4bpw), DFlash2 drafter, EXL3
    support enabled as the startup banner announces.
  • Serve settings: --context 524288 --parallel 8 --max-tokens 32768 --no-thinking --vision;
    KV=fp8, DENSE=q4, DRAFT_POLICY fnc7:0.3. Startup: native 1048576, allocated prompt/reply window 524288, cache slots 524304; rank 1 ready in 120.4 s, rank 0
    loaded in 120.3 s.
  • Recipe knobs in the container: TF_GLM_CACHE_GIB=12.5, TF_GLM_CACHE_ENTRIES=32,
    TF_GLM_MULTI_PREFILL=1, TF_GLM_PREFILL_OVERLAP=2, TF_GLM_MULTI_WINDOW=64,
    TF_GLM_MULTI_LONE=0, TF_GLM_FILL_DRAFTS=1, TF_GLM_FILL_BUDGET_MS=200,
    TF_GLM_SHARED_PREFIX=1, TF_GLM_STREAM_SMOOTH=1, TF_GLM_STREAM_SMOOTH_MS=400,
    TF_GLM_COMM=roce, TF_ROCE_WAIT_S=300, TF_GLM_HC_SPLIT=1, TF_GLM_WIDE_GRAPHS=16.
    I list them so they can be discounted; the ones named TF_GLM_* are recipe features rather
    than core.
  • Client: a long-lived agent session (Claude Code) at 100K–241K tokens through the
    Anthropic-compatible endpoint on rank 0, hours long, plus our probes. Every measurement below
    was issued on rank 0 itself, against 127.0.0.1:8000, so no Mac, proxy or LAN path is
    involved.
  • Restart command (keeps the window, does not change config):
    env CONTEXT=524288 ./start.sh restart — a bare ./start.sh restart would come back at the
    1M native window.

The three states

1. Uptime ~minutes (healthy, baseline for everything below)

probe result
13-token prompt 1.67 s
same prompt again (prefix reuse) 0.41 s
42.6K-token prompt, cold prefill 1645 tok/s, then 1918 tok/s on the next call
100-token reply 1.5 s (p50 14 ms, max 217 ms per round)
369-token reply 40 tok/s
400-token reply, warm 33 tok/s

(The first cold prefill after a restart reads ~149 tok/s; it is Triton JIT, and the second call
is the real number. We are not reporting that as a fault.)

2. Uptime ~3 h (degraded, no config change)

Six 13-token prompts with unique tails, one second apart, non-streaming, max_tokens 8:

# wall prefill_s decode_s rounds tok/round cached_tokens requests_running before
1 12.03 s 10.81 0.97 2 3.0 0 0
2 14.57 s 12.24 1.49 3 2.33 0 0
3 3.18 s 2.56 0.48 2 3.5 0 0
4 21.18 s 18.80 1.23 3 2.33 0 0
5 14.79 s 12.85 1.44 2 3.5 0 1
6 5.26 s 2.35 0.16 2 3.5 0 1

An honest prefill for 13 tokens is ~0.3 s on this engine: one second after the pair above, the
same 13-token prompt re-sent cost prefill_s 0.3201, wall 0.59 s. So the slow column is
8–60× the fixed cost of admission + prefill, on prompts with cached_tokens: 0, with
requests_running 0 — the queue is empty and the GPU is at 0%.

Long replies degrade with it: 415 output tokens took 29.7 s solo (14 tok/s), prefill_s 7.3,
decode_s 23.3, rounds 59 → 394 ms per round, 7.03 tokens per round.

Zero tail also on the reuse path: the same prefix that resumed in 0.41 s after a restart
resumed in 14.1 s three hours later.

3. /metrics at both ends of the same process

counter 2026-10-17 18:40 2026-10-17 19:16
pool_tokens 1,757,184 1,757,184
pool_free_tokens 655,360 (63% held) 395,264 (77% held)
kept_prompts 32 32 (the CACHE_ENTRIES cap)
requests_running 0 1
cached_tokens_total / prompt_tokens_total 67,860,480 / 68,666,082 (98.8%) 91,360,640 / 92,245,401 (99.0%)
request_latency_seconds count 550, sum 4642.6 → 8.44 s avg count 762, sum 8618.06 → 11.31 s avg
mtp_accepted_total / mtp_drafted_total 20,219 / 34,810 (58%) 34,182 / 57,632 (59%)

The lifetime average is the interesting one: over the last 212 requests it is
(8618.06 − 4642.6) / 212 = 18.75 s, against 8.44 s earlier in the same process. Cache hit
rate stays at 99%, so requests are not re-prefilling their prefixes — they are paying a cost
that is not in the tokens.

4. What the ranks themselves report at 19:20 (idle except one agent stream)

rank 0: tensorfold PID 172013, %CPU 109.1, CPU time 210:15 over 4 h uptime
        nvidia-smi: util 0 %, power 15.56 W, temp 55 °C
rank 1: tensorfold PID 1691539, %CPU 130.0, CPU time 201:30 over 4 h uptime
        nvidia-smi: util 96 %, power 17.84 W, temp 56 °C
rank 1 `docker logs` since start: 37 lines, zero `waitForInput`

Both host threads are busy for the whole uptime and rank 1 holds its GPU at 96% while power
stays at idle (17.8 W). That is the #305 signature, and #132's rendezvous fix is supposed to be
in 0.6.0 for GLM.

What we ruled out

  • Not the network path. All probes run inside rank 0 against localhost. The same client and
    the same code path produce 0.59 s and 18.8 s within seconds of each other.
  • Not thermal or clock throttling. nvidia-smi -q throttle reasons 0x0, 55–57 °C, no
    Xid/NVRM lines in either journal, no swap in use.
  • Not the RoCE fabric. Link up at 200 Gb/s, 0% loss, RTT 0.089 ms during the slow window;
    rank 1's health is only its util/power signature, not errors.
  • Not client aborts alone. In the day's first episode the process had been up 45 h and 13
    mid-stream client aborts were logged (all from one LAN address). After the restart there were
    zero new aborts, and the slowdown returned in 2 h 48 min anyway. Whatever the aborts do,
    they are not required.
  • Not memory pressure. pool_free_tokens was still 655,360 when the 10–18 s prefills
    started; the ranks hold 84–86 GiB of a 96 GiB estimate at load.

Related reports

Questions

  1. Does perf(glm): an idle rank 1 waits on the rendezvous TCP store, not in a spinning all-gather #132's blocking rendezvous cover the side-stream collectives used by
    TF_GLM_MULTI_PREFILL / TF_GLM_PREFILL_OVERLAP (overlap 2, window 64)? If the follower
    enters one of those before a request arrives, the 96% / 0% split and the CPU spin would be
    the same bug through a different door — and it would explain why 0.6.0 still shows it for us.
  2. Should a 13-token prefill ever cost more than ~0.3 s on an idle engine? The same request one
    second later costs 0.3201 s, so I would like to know what can legitimately put 18.8 s on the
    prefill path (kept_prompts at the 32-entry cap, 77% of pool rows held).
  3. Is the kept-prompt ledger on the request path? We are at the entry cap, and the healthy
    state was not — so if an eviction/walk pass runs inside admission, it would show up exactly
    as this: no cost in the tokens, growing cost with residency.

What we can do to help

We have not changed anything while collecting this and will not without a reason. Available on
request:

  • a two-restart A/B (healthy → degraded → healthy) with the same probe set, timestamped;
  • kept_prompts rows, pool ledger and per-request trace dumped from the running process;
  • rank 1's GPU utilisation sampled every 100 ms across a request, to see whether it is spinning
    before, during, or only after the request;
  • the recipe's patch set bisected, or a build of a 1M-context main, if that is the faster path;
  • the raw probe script (below) and the full logs from both ranks.
# rank 0, 127.0.0.1:8000 — six probes, unique tails so nothing is reused
import json, time, urllib.request, uuid
def go():
    p = "Probe %s. Reply with one word." % uuid.uuid4().hex[:8]
    b = json.dumps({"model": "glm-5.3-flash", "messages": [{"role": "user", "content": p}],
                    "max_tokens": 8, "temperature": 0,
                    "chat_template_kwargs": {"enable_thinking": False, "thinking": False}}).encode()
    t0 = time.time()
    with urllib.request.urlopen(urllib.request.Request(
            "http://127.0.0.1:8000/v1/chat/completions", data=b,
            headers={"Content-Type": "application/json"}), timeout=600) as r:
        d = json.load(r)
    print("%.2f s %s" % (time.time() - t0, d["tensorfold"]))
for _ in range(6):
    go(); time.sleep(1)

Activity

  1. ss-cong commented on Oct 17, 2026

    @ss-cong
    Author

    Restart A/B, 2026-10-17 19:20 +08:00 — and a correction to the "with uptime" framing

    We restarted the server (same config, CONTEXT=524288 preserved, loaded in 117.7 s) and measured both sides. Two results change the picture in the report above.

    1. The slow state is intermittent, not monotone. Two minutes before the restart, with the pool still 78% held (kept_prompts 32, pool_free_tokens 380,928), the very probes that had cost 2.35–18.80 s in prefill_s came back at 0.1301 s and 0.1249 s, and the agent session's own status line read 37.6 tok/s. So pool occupancy and kept entries are not sufficient by themselves. I should have called this intermittent in the summary instead of a decay with uptime.

    2. rank 1 has two high-utilisation states, and power tells them apart. Sampling utilization.gpu,power.draw once a second on rank 1 in the healthy window:

    state samples util power
    decoding 95 94–96% 75–78 W
    spinning follower 7 96% 15–20 W

    In the slow window we only ever caught rank 1 in the second state (96%, 17.8 W). The 4 s run at 15.2–15.7 W at 19:23:36 began right after a request, which is the shape #132 and #305 describe. Utilisation alone was not enough to tell work from spin, so anyone sampling this should read power too.

    3. After the restart: kept_prompts 32 → 0, free pool rows 380,928 → 1,501,184 (85.5%), a 400-token reply decoded at 26.3 tok/s over 51 rounds (7.82 tokens/round, drafter 348/352 accepted, 98.8%). With the agent session decoding concurrently a 13-token prefill now costs 1.34–1.38 s; on an idle engine it cost 0.12 s, so concurrent-load prefill is worth separating in any comparison.

    The question becomes narrower. Not "why does it decay", but what switches the server between the two states, and whether the low-power 96% sample is the cause or the consequence. We are leaving the server up, sampling util/power at 1 s and running a timestamped probe every few minutes; the next stalled window will be reported with both series aligned.

  2. cwschroeder commented on Oct 17, 2026

    @cwschroeder
    Contributor

    Source check for the reported v0.6.0 lineage and recipe 33b50fde:

    • The multi-stream scheduler retains the idle doorbell: _flush() rings when self.idle, and follow() awaits it in that state. MFILL uses that control-message path; the later rank-check/TP patches retain it. This gates entry from scheduler idle, not each collective within active work (0030). I do not see evidence that MULTI_PREFILL bypasses the doorbell.
    • HC overlap uses the underlying NCCL communicator even through RoceComm, so TF_GLM_COMM=roce does not put all traffic on the custom RoCE path (0010).
    • With sliced fill, prefill_s includes elapsed wall time through torch.cuda.synchronize(), not just prompt arithmetic (0062). A wait for device/collective work can therefore appear in that counter; this does not identify the cause of your slow window.

    For the next stalled window, the most useful addition to your aligned power/probe series would be simultaneous rank stacks and the scheduler's idle, decoding/filling/paused counts and last control opcode/sequence. That would distinguish store wait, _share wait and fill synchronization. Keep the idle/concurrent label: the earlier running-count snapshot is not a simultaneous scheduler trace, and localhost HTTP plus link/ping checks do not exclude inter-rank collective stalls.

    This is source inspection, not a reproduction or verification of the running patched image. It does not establish an uptime, cache-occupancy or transport cause.

  3. ss-cong commented on Oct 17, 2026

    @ss-cong
    Author

    Following your checklist — what we could get without changing the running image

    1. prefill_s was misleading me, as you said. Over ten consecutive probes, wall - prefill_s - decode_s reached 8.3–13.7 s (for example wall 20.11 s, prefill_s 0.33 s, decode_s 0.29 s). With a streaming request the first SSE byte arrives in 0.02 s while the whole exchange takes 9.66 s. So the cost is neither prompt arithmetic nor first-byte latency; it is engine-side, after the client is connected.

    2. It is the iteration boundary. /health publishes iteration_s (the current iteration's elapsed time), and it explains the wait. Sampled at 0.15 s across a slow probe:

    t+ 0.00 s  run=2  dec=0  pre=0  fill=0  pause=0  iter=7.2   <- request arrives mid-iteration
    t+ 1.32 s  run=2  dec=0  pre=1  fill=1  pause=0  iter=0.1   <- fill admitted at the next boundary
    t+15.71 s  run=2  dec=0  pre=0  fill=0  pause=0  iter=0.1   <- a 14.4 s iteration ended, request served
    

    A 90 s sample of iteration_s at 0.1 s, counting resets as completed iterations: p50 0.50 s, p75 0.70 s, p90 0.90 s. Two iterations out of 100 ran 2 s or longer and held 31% of the wall time (max 20.5 s). Both carried run=2 dec=0 pre=1 fill=1 pause=0: nothing was decoding, one stream was filling. So the long iteration is a fill stall, and every request that arrives inside one inherits its full duration.

    3. The counters you asked for. streams.{decoding,prefilling,filling,paused} and iteration_s are in /health; requests_waiting exists only in /metrics, not /health. We found nothing that publishes the last control opcode/sequence — the opcode table (ADMIT, EVICT, MOVE, GROW, FILL, ROUND, FINISH, IDLE, SLOT) is in the multi.py patch but nothing exposes the last one.

    What we still cannot get, and the cheapest way. Per-thread /proc/1/task/*/{stat,wchan} sampled at 0.2 s on both ranks does not separate fast from slow windows: rank 0 holds 74–76 threads with 1–3 running, rank 1 holds 51 with 1–2, dominated by futex_do_wait and poll_schedule_timeout. As you predicted, kernel wait channels are too coarse.

    patches/0040 arms faulthandler.dump_traceback_later(TF_GLM_MULTI_WATCHDOG_S, repeat=True) with a default of 300 s, and every stall we have seen is shorter than that, so we have never captured a stack. start.sh forwards every TF_GLM_* from the launch environment into the container, so TF_GLM_MULTI_WATCHDOG_S=5 at the next restart would dump every thread's Python stack repeatedly for the life of each slow iteration — the simultaneous stack you asked for, with no change to the image.

    One question. Is 5 s the right threshold, and is dump_traceback_later(..., repeat=True) at that rate acceptable on a serving process (it writes to stderr and holds a thread while dumping)? A stall pattern of 2 long iterations per 90 s at 5 s threshold would produce a handful of dumps each time. If you would rather we arm something narrower, say which and we will. Otherwise we will arm it at the next restart and report the stacks together with the aligned power and probe series.

  4. cwschroeder commented on Oct 17, 2026

    @cwschroeder
    Contributor

    Five seconds is a reasonable threshold for a short diagnostic window at your next planned launch, with TF_GLM_MULTI_WATCHDOG_EXIT=0 explicitly set on both ranks. Patch 0065 changes the 0040 behavior: EXIT=1 terminates the process after the first dump. The pinned launcher forwards both exported TF_GLM_* values; please check the effective settings in both containers.

    The timer is narrower than a periodic process sampler:

    • Rank 0 arms it at iteration entry and cancels it at the end of finish. It repeats while that watched section remains outstanding. Five seconds should cover the reported 14 to 20 s episodes, but will miss 2 to 5 s episodes.
    • Rank 1 arms it after the idle-doorbell wait and cancels it after applying a control message. A rank waiting at that doorbell, or completing shorter message sections, may produce no dump even while rank 0 is slow. The two dumps are not guaranteed simultaneous.
    • Dumping all Python-thread stacks writes to stderr and can perturb timing. Keep this as a bounded capture, check log retention, and record dump times alongside the existing probes/power samples. I have not measured its overhead on your serving image.

    CPython documents the watchdog-thread implementation and that rearming replaces the previous timer. The stacks should locate the Python waiting path; they will not by themselves establish a CUDA or transport cause. Also, first SSE bytes may be headers or an initial event: measure the first generated-content event separately before ruling out first-token delay.

  5. ss-cong commented on Oct 17, 2026

    @ss-cong
    Author

    The stall ends in a SIGSEGV — stacks captured, rank 0 died, rank 1 kept waiting

    We armed TF_GLM_MULTI_WATCHDOG_S=5 at the restart and let real traffic run. At 2026-10-17 20:43:30 +08:00 the server hung and faulthandler fired every 5 s; at 20:44:20, after seven dumps, rank 0 exited 139 (SIGSEGV). Rank 1 stayed up and waited. Both client sessions dropped (that is how we noticed).

    12:43:30.91  Timeout (0:00:05)!   <- first dump
    12:43:39.51  Timeout (0:00:05)!
    12:43:44.51  Timeout (0:00:05)!
    12:44:04.46  Timeout (0:00:05)!
    12:44:09.46  Timeout (0:00:05)!
    12:44:15.72  Timeout (0:00:05)!
    12:44:20.72  Timeout (0:00:05)!   <- log ends mid-dump; process gone
    

    rank 0, the request thread (same stack in three of the seven dumps):

    kept_reasoning.py:80  in signature
    kept_reasoning.py:90  in _keys
    kept_reasoning.py:151 in restore
    glm5_next/cuda/app.py:29 in render
    cuda/server.py:218 in render  <- :236 _prepare <- :329 prepare
    cuda/http.py:134 in do_POST
    

    rank 0, the iteration thread:

    multi.py:1365 in _fill
    multi.py:1151 in _iterate
    multi.py:1087 in round
    multi.py:1964 in _iteration  <- :1949 _loop
    

    and threads in hcsplit.py:323 _post, dflash2_multi.py:319 _launch_taps, triton/backends/nvidia/driver.py:328 __call__.

    rank 1, 65 dumps over the same period. Every one of them carries engine.py:1304 in follow and a multi.py _fill frame — waiting for rank 0, not working:

    engine.py:1304 in follow
    cli.py:280 in _serve_cuda
    

    So the shape is: a request thread sits in kept_reasoning.signature() / _keys / restore() (patch 0120's kept-reasoning restore, on the render/prepare path before any prefill), the iteration thread is in multi._fill, rank 1 is in follow(), and ~50 s later rank 0 segfaults. This is also the same stack family as the earlier slow windows — kept_reasoning appeared in the 18.80 s prefill window too, which would explain why the cost grew with the number of kept states and did not depend on the prompt.

    Two questions for you:

    1. Is kept_reasoning.restore() / _keys() / signature() (patch 0120) expected to run on the request thread ahead of render, and can it block on anything the iteration thread holds? The signature walk is over kept states, so the cost growing with kept_prompts would match what we measured.
    2. A 5 s watchdog on this server dumps while a rank is legitimately idle waiting in follow() — rank 1 produced 65 dumps in 18 minutes mostly that way. What threshold would you like us to use while we keep hunting, and do you want the dump cadence slowed (the repeat=True timer writes every 5 s for the whole stall)?

    We have the complete docker logs from both ranks archived (20261017-204920-rank0.log.gz, 20261017-204953-rank1.log.gz, plus the container logs) and the server is back up on the same image and config (loaded in 121.3 s, context 524288, a 13-token probe answers in 0.38 s).

  6. cwschroeder commented on Oct 17, 2026

    @cwschroeder
    Contributor

    The pinned source supports a CPU history cost here, but does not establish the SIGSEGV cause.

    • Request path: at recipe 33b50fde, 0036 wires restore() before inner.render(). Each eligible assistant tool step builds a signature of its conversation prefix, including when a known server call ID will hit. This reasoning-text memo is separate from GPU kept-prompt state. Signature computation precedes the memo's own mutex; these frames do not demonstrate an engine-lock cycle. My isolated CPU counter recovers every call-ID hit but traverses 64 / 256 / 1024 / 4096 prefix messages for 8 / 16 / 32 / 64 tool turns. Adding 256 unrelated memo entries changes none of those counts. That identifies repeated history work, not a measured serving delay or crash cause.
    • Follower: with 0065, the watchdog is armed after the idle-doorbell wait, around message receipt/application. A follow() frame alone cannot establish healthy idle; the complete innermost frames are needed. I would use 30 seconds with TF_GLM_MULTI_WATCHDOG_EXIT=0 on both ranks, for a bounded capture at the next planned launch. That catches a roughly 50-second stall but misses the earlier 14-to-20-second episodes; keep five seconds only for a short targeted capture. No immediate restart is needed for this suggestion.
    • Crash evidence: timeout dumps show where threads were sampled. CPython's intentional watchdog exit uses status 1, so it does not explain 139. Please confirm fatal-error handling is enabled in the serving Python process as well as the timeout timer. At the next planned capture, PYTHONFAULTHANDLER=1 inside the containers can enable it if absent.

    Please share the Python/native-component versions, effective watchdog settings, installed kept_reasoning.py/multi.py hashes and relevant source, both ranks' full innermost stacks, and the final fatal/native traceback or core backtrace if available. The 0120 attribution differs from the pinned recipe's 0036; matching the installed files comes before proposing a memo optimization.

  7. ss-cong commented on Oct 17, 2026

    @ss-cong
    Author

    Native 1.0.12 on the same two GB10s: ModelOpt NVFP4 serves, but two memory numbers make long-context caching impossible on a 121 GiB node

    Since this thread is about whether the patched 0.6.0 lineage is the right thing to keep running, we took the same pair of Sparks (121 GiB unified memory each) and ran the native CUDA engine (tensorfold-native 1.0.12, aarch64) with nvidia/GLM-5.3-Flash-NVFP4 at TP=2, to see whether 1.0.12 is a viable replacement. It is a working server: the checkpoint is admitted, the two ranks meet, MTP drafts work, and replies are correct. Two numbers were not what we expected.

    1. The preflight budget checks 95.2 GiB of weights, but the model allocates 102.61 GiB.

    Preflight at TF_GLM_WORLD=2:

    tensorfold: the checkpoint's 95.2 GiB of weights do not fit the 0.5 GiB the CUDA memory budget grants (12.6 GiB free less a 12.2 GiB reserve, under TENSORFOLD_CUDA_MEMORY_LIMIT_GB); free device memory or adjust TENSORFOLD_MEMORY_RESERVE_GIB / TENSORFOLD_CUDA_MEMORY_LIMIT_GB
    

    That is 190.43 / 2. Once the lane came up it reported:

    [tensorfold] CUDA sm_121 device 0 (NVIDIA GB10, memory shared with the host): model 102.61 GiB; 1 stream at once, 9.53 GiB each at a 524288-token window, of 0.0 GiB left after a 12.2 GiB reserve; prompts in passes of up to 2048 rows, no prompt cache; own glue kernels
    

    7.4 GiB more per rank than the preflight assumed, which on a 121 GiB node is the whole difference between "fits with headroom" and "budget exhausted". Is that gap expected (embed / lm_head not split, the MTP layer, the vision tower), and should the preflight use the number the loader actually allocates?

    At default settings --parallel 8 cannot start at a 524288-token window:

    tensorfold: --parallel 8 needs 66.70 GiB for its streams at a 524288-token window, and the CUDA memory budget leaves 0.00 GiB: serve --parallel 1, or lower --context
    

    2. A kept prompt state costs one full window, not the tokens it holds.

    With the reserve lowered to 4 GiB and --prompt-cache-gib 4:

    [tensorfold] ... model 102.61 GiB; 1 stream at once, 9.53 GiB each at a 524288-token window, of 6.3 GiB left after a 4.0 GiB reserve; prompts in passes of up to 2048 rows, a 4.0 GiB prompt cache; own glue kernels
    

    The first request that tried to keep anything:

    warning: prompt cache: kept nothing at 34816 tokens: 9756 MiB passes the 4096 MiB budget
    info: prompt cache: 36820 tokens, resumed at 0, kept 0; 0 states, 0 MiB and 0 MiB spare of 4096 MiB (hits 0, misses 2, evicted 0, refused 1, failed 0)
    

    9,756 MiB for a 34,816-token state — essentially the 9.53 GiB stream extent, not proportional to the tokens kept. Three identical 413-token requests also kept nothing (hits 0, misses 6, kept 0), though that may be the shared-prefix keep points rather than the budget.

    The consequence is arithmetic rather than tuning: after 102.61 GiB of model and a 4 GiB reserve, a 121 GiB node has 6.3 GiB left; one kept state wants ~9.7 GiB, and the live stream for a 266K-token prompt wants ~5.2 GiB. The node can cache or serve a long prompt, not both. Without the cache every turn re-prefills — we measured 36,820 prompt tokens at prefill 42.77 s (~861 tok/s), so the ~266K-token context we run in production would cost ≈310 s per turn.

    What does work, for reference

    • Format admission: capabilities --json reports "families": {"glm5_next": ["modelopt-nvfp4"]}, and the checkpoint's config.json carries quant_method: modelopt, quant_algo: NVFP4, and config_groups.group_0.weights = {num_bits: 4, type: float, group_size: 16}.
    • Two ranks over environment only: TF_GLM_RANK, TF_GLM_WORLD=2, NCCL_COMM_ID=10.10.10.1:29521 (serve has no --tp / --rank). The host has no libnccl-net.so for the pip wheel's NCCL 2.30.7, so this ran over socket transport (NCCL_IB_DISABLE=1, NCCL_SOCKET_IFNAME=enp1s0f0np0); the ranks joined and stayed joined.
    • Load 346.2 s cold, 215.2 s with the page cache warm.
    • 256-token generation 18.46 tok/s (prefill 0.234 s); a short request 21.6 tok/s; MTP acceptance 0.69–0.81 with 2.37–3.2 tokens/round; a probe that asked for an exact string returned that string.

    The run above used a local copy of this checkpoint whose only change is BF16 o_proj values (no size difference); the stock snapshot reports the same model 102.61 GiB.

    We reverted production to the 0.6.0 EXL3 recipe with TF_GLM_KEEP_REASONING=0 — that has now held for hours at kept_prompts 32 and a nearly full pool, which supports the kept-state path as the SIGSEGV trigger we reported above. The 1.0.12 tree is still installed on both nodes, so we can run any probe you want. The two questions above decide whether 1.0.12 can replace the patch stack on 121 GiB GB10s at a 524288-token window, or whether it needs EXL3 on CUDA first.

  8. cwschroeder commented on Oct 17, 2026

    @cwschroeder
    Contributor

    @ss-cong, the full-window snapshot cost matches the source. The startup model value already includes the first live sequence. I checked release source 833bbfcb; the eight relevant files are byte-identical at current main 6ee828c2.

    Reported value Source meaning
    95.2 GiB preflight Safetensors file sizes multiplied by the rank's largest axis share
    102.61 GiB model Tracked device-buffer allocations across family open, including weights, workspaces and the first sequence
    9.53 GiB per stream One sequence arena; the first is already included above
    6.3 GiB left Post-load room after reserve/cap and the peer-rank bound

    Family open and admission honour GLM's already allocated first stream (free_streams = 1). Thus eight streams need seven extra arenas, approximately the reported 66.70 GiB. Using your rounded numbers, 102.61 - 9.53 is approximately 93.08 GiB remains for weights and other tracked buffers; it is still not a pure-weight measurement. These lines do not establish a 7.4 GiB weight underestimate. The loader replicates embeddings, shards the head's rows and conditionally loads MTP; this release's native GLM family does not load a vision tower. A stronger preflight would use the loader's per-rank allocation plan, with weights, workspace and first-state costs shown separately.

    For caching, snap_bytes ignores the saved position. stateBytes/keepAs/restoreState size and copy the whole arena on each rank. A 4 GiB cache, or 6.3 GiB of remaining room, cannot hold that roughly 9.53 GiB snapshot. A 266K-token prompt still uses the full arena when the server window remains 524288. The 413-token case also has no positive keep point on the 2048-token grid.

    Source hashes and four passing CPU admission checks. No device/model run was performed. For the existing run, please share the exact checkpoint revision, native source/binary hash, both ranks' startup lines and effective context/cap/reserve settings. Existing logs and file hashes suffice for the next step.

    The hours-stable TF_GLM_KEEP_REASONING=0 result narrows the older Python reproducer, but a faulting trace and matching installed files are still needed to establish the SIGSEGV cause.

  9. ashhart commented on Oct 17, 2026

    @ashhart
    Owner

    Thanks @ss-cong for separating the intermittent Python behavior from native memory, and @cwschroeder for the accounting check. Startup model memory includes workspace and the first sequence; preflight estimates weights. Their difference is not a measured weight underestimate.

    Native GLM CUDA keeps the full configured arena, so the reported 9.53 GiB snapshot cannot fit a 4 GiB cache merely because its prefix is shorter. The 413-token case may not reach the keep grid. Prefix-sized snapshots and clearer allocation estimates remain separate work. The prepared EXL3/index/packing changes do not establish a fix for the older Python crash; that still needs matching installed files and a fatal trace.

    Posted by Ash's AI Assistant Synthena

  10. ss-cong commented on Oct 18, 2026

    @ss-cong
    Author

    Thank you both — the accounting corrections are accepted: the 95.2 → 102.61 GiB gap is the preflight weight estimate vs the tracked family-open allocation (weights + workspaces + the first sequence), not a weight underestimate, and the 9.53 GiB arena / full-window stateBytes copy explains both the 4 GiB refusal and the 413-token keep miss on our run.

    The requested run identifiers, from the same 1.0.12 native run (both ranks, cold and warm loads reported earlier in this thread):

    • Checkpoint: local tree nvidia-GLM-5.3-Flash-NVFP4-ablit — parent stock nvidia/GLM-5.3-Flash-NVFP4 snapshot da920bb0b9f4a06727223a349e55468e38352348; only delta is BF16 o_proj values in layers 15–45 per ABLIT_META.json (altered-dealign-oproj-l15-45-skip44); config.json md5 a5c93afedbb1, quantization_config.quant_algo = NVFP4.

    • Binary: tensorfold-native 1.0.12, md5 390fc80f40ac, 32,637,128 bytes, identical on both ranks (~/tf1012/bin/tensorfold-native, aarch64). Installed via the 1.0.12 pip wheel; NCCL 2.30.7+cuda13.3 (socket transport, no libnccl-net.so on this host).

    • Rank 0 startup (GB10 s/n in earlier post; 10.10.10.1):

      [tf1012] rank=0 world=2 comm=10.10.10.1:29521 model=/home/cloudz-ai/models/nvidia-GLM-5.3-Flash-NVFP4-ablit ctx=524288 cache_gib=4 parallel=1 socket_if=enp1s0f0np0
      [tensorfold] CUDA sm_121 device 0 (NVIDIA GB10, memory shared with the host): model 102.61 GiB; 1 stream at once, 9.53 GiB each at a 524288-token window, of 6.3 GiB left after a 4.0 GiB reserve; prompts in passes of up to 2048 rows, a 4.0 GiB prompt cache; own glue kernels
      [tensorfold] serving glm-5.3-flash at http://0.0.0.0:8000/v1 (sampling: temperature 1.0, top_p 0.95; drafts: on; context: 524288; loaded in 215.2s)
      
    • Rank 1 (10.10.10.2, pid 1865965): [tf1012] rank=1 world=2 comm=10.10.10.1:29521 model=... ctx=524288 cache_gib=4 parallel=1 then NCCL 2.30.7+cuda13.3 join; no model ... line (single-GPU report is rank 0's).

    • Effective settings: TF_GLM_WORLD=2, TF_GLM_LAYERS unset (full checkpoint), TENSORFOLD_MEMORY_RESERVE_GIB=4, --prompt-cache-gib 4, --parallel 1, context 524288; NCCL_IB_DISABLE=1, NCCL_SOCKET_IFNAME=enp1s0f0np0.

    Two follow-ups, no urgency:

    1. If a per-rank allocation plan in preflight (weights / workspace / first-state shown separately) lands, we are glad to re-run the same two-node probe and re-check the numbers against it.
    2. Prefix-sized cache snapshots: our production window is 524,288 tokens with ~266K-token working prompts, so any snapshot sizing below the full arena changes the keep/no-keep verdict on this hardware. Happy to test a build that trims snapshots to the kept prefix.

    On the older Python-lane SIGSEGV: the hours-stable TF_GLM_KEEP_REASONING=0 run continues; we will send the matching installed-files list and a fatal trace when it next faults on demand.

  11. ashhart commented on Oct 18, 2026

    @ashhart
    Owner

    Thank you, @ss-cong, for accepting the accounting correction and supplying the native run identifiers. The parent NVFP4 revision, BF16 o_proj changes, matching 1.0.12 binaries and both ranks' settings pin the 524,288-token-window run. The 9.53 GiB snapshot and 4 GiB cache limit are understood.

    A per-rank weights/workspace/first-state breakdown and prefix-sized snapshots remain follow-up work that isn't scheduled yet; we'll say here when it is. We have not established a cache fit for your roughly 266K-token working prompts.

    For the older Python SIGSEGV, keep the matching installed-files list with the fatal trace when it recurs. The stable TF_GLM_KEEP_REASONING=0 run narrows that investigation; the native EXL3/index/packing changes in 1.1.0 do not establish a crash fix.

    Posted by Ash's AI Assistant Synthena

  12. ashhart commented on Oct 19, 2026

    @ashhart
    Owner

    Thanks @ss-cong, an update on the cache cost your report found: native GLM CUDA prompt states sized by the committed prefix have passed our two-GB10 check at a 131,072-token window: drafted == plain 17/17 and resumed == fresh 12/12.

    The cache comparison retained four states in 980 MiB; the old code kept one 1,812 MiB state and evicted three. Cold prompt timings were within run noise. This patch is queued next for 1.1.2 and is not yet on the line.

    It addresses the native full-window snapshot cost you reported, while live-window allocation and preflight accounting remain separate. The 131K check does not qualify your 524,288-token window or roughly 266K-token working prompts.

    The intermittent slowdown, the idle rank's high GPU-utilisation reading at low power, and the older Python SIGSEGV on the patched 0.6.0 lineage remain unresolved by this cache check. We're keeping the issue open for those and the larger-window follow-up.

    Posted by Ash's AI Assistant Synthena

  13. ashhart commented on Oct 21, 2026

    @ashhart
    Owner

    Thank you for the report. Version 1.1.2 sizes GLM CUDA snapshots from the committed prompt prefix while retaining the live sequence layout. Please retest the original cache workload and include the checkpoint, context, cache budget and observed memory use in a sanitized report.

    - Synthema, Ash's AI Assistant.

  14. ss-cong commented on Oct 23, 2026

    @ss-cong
    Author

    Retested the cache workload on 1.1.2 on our two-GB10 pair. The fix works as described, and here are the four numbers you asked for.

    Environment: tensorfold-native 1.1.2 aarch64 (sha256 4da070ed…c367, verified); Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold-Ablit@57edefd2 + incoai/GLM-5.3-Flash-DFlash2@bf582e4e; RoCE 2 HCA, 1024 KiB; digest cache hit (0.0 GiB, 83/83).

    Workload: 4 distinct ~105K-token prefix sessions (random filler + unique instruction), greedy temp 0, max_tokens=8; after filling all four, re-sent the same four prompts in the same order and read prompt_tokens_details.cached_tokens.

    1.1.1 resend 1.1.2 resend
    cached_tokens 0 / 0 / 0 / 0 104,448 / 104,448 / 104,448 / 104,448
    latency 147.2 / 147.1 / 146.5 / 146.6 s 1.20 / 0.92 / 1.01 / 0.93 s

    So the old code kept effectively one state (the last one) and evicted the rest; 1.1.2 keeps all four, with a ~130-160x resume speedup. resumed == fresh holds: same-request greedy outputs are byte-identical on both versions.

    Memory (what we can observe): on GB10 unified memory neither /proc/meminfo MemAvailable nor process RSS reflects prompt-state cost, because the arena is allocated at boot - so we cannot reproduce your 980 MiB / 1,812 MiB per-state figures directly. What the build self-reports:

    config model per stream left after 12.2 GiB reserve prompt cache
    ctx 131072 / par 4 87.26 GiB 1.81 GiB x4 12.8 GiB 7.4 GiB
    ctx 524288 / par 2 92.24 GiB 6.59 GiB x2 7.1 GiB 0.5 GiB
    ctx 524288 / par 4 refused: needs 19.77 GiB, budget leaves 7.00 GiB

    Throughput (400-token prose, temp 0, same harness): 1.1.1 23.8 tok/s at 1 stream / 56.3 at 4; 1.1.2 23.9 / 51.7 - single-stream unchanged, 4-stream within run variance. Prefill unchanged: ~714-717 tok/s (1.1.1) vs ~708-712 tok/s (1.1.2).

    Caveat for anyone at a 524,288-token window: the prompt cache shrinks from 7.4 GiB to 0.5 GiB, so the fix has very little room there - still only ~2 concurrent full-window streams (6.59 GiB each). At 131K the improvement is large and clean.

    Boot times on this pair: 230.8 s at 131K / 481.3 s at 524K par 2 (1.1.1 at 131K: 227.1 s).

  15. ashhart commented on Oct 24, 2026

    @ashhart
    Owner

    Thanks @ss-cong for the 1.1.2 cache retest: four 104,448-token resumes in about a second each, and greedy outputs identical, confirm the snapshot fix. The original slowdown (13-token prompts taking 10 to 19 s after about three hours, and an idle rank 1 at 96% GPU) was measured on the patched Python 0.6.0 lineage. Since 1.1.2, idle GLM CUDA ranks sleep between requests. Could you run native 1.1.3 under the same long agent session for several hours and post the six 13-token probes, both ranks' GPU utilisation and power while idle, and both ranks' logs? If it degrades, please add a TF_GLM_PROF=1 capture of one slow request.

    - Synthema, Ash's AI Assistant.

  16. ss-cong commented on Oct 24, 2026

    @ss-cong
    Author

    Follow-up: we also measured the 262,144-token (256K) window, which the previous report skipped, and the prompt cache behaves non-monotonically there in a way that looks like a bug worth a look.

    Same pair, same checkpoint/drafter, 1.1.2 aarch64:

    ctx 262144 boot model per stream left after 12.2 reserve prompt cache 4x105K resends
    par 4 227.3 s 88.92 GiB 3.40 GiB x4 10.5 GiB 0.3 GiB 0 hits, 148.8-149.9 s each
    par 2 226.9 s 88.92 GiB 3.40 GiB x2 10.5 GiB 7.1 GiB 104,448 cached, 1.17-1.28 s

    At par 4 the 0.3 GiB arena caches nothing at all - not even a 16K-token prefix (resend 22.9 s, cached_tokens 0, identical to a cold prefill). At par 2 the same 105K-token states round-trip in ~1.2 s.

    So the arena budget is not a function of the window alone: 131072/par4 -> 7.4 GiB (works), 262144/par4 -> 0.3 GiB (inert), 262144/par2 -> 7.1 GiB (works), 524288/par2 -> 0.5 GiB (inert). It looks like streams x window eat the prompt cache first, and below some arena size the cache silently stops storing instead of degrading gracefully.

    Two questions: is there a minimum arena size under which the prompt cache is intentionally disabled (and could the boot line or capabilities --json say so), and would a --prompt-cache <GiB> / admission knob that reserves a floor before streams be reasonable? Right now a user at 256K/par4 gets zero caching with no visible signal other than this measurement.

    Throughput at 256K for reference: par4 24.0 tok/s (1 stream) / 55.0 (4); par2 24.3 / 38.6 (2). resumed == fresh holds in both.

  17. ashhart commented on Oct 24, 2026

    @ashhart
    Owner

    Thanks @ss-cong for the 256K / 4-stream measurement. On main now (2998883): when GLM on CUDA starts with a prompt cache too small to hold even its first planned state, rank 0 says so once at startup. The warning names the budget, the per-state size and the flags that make room (--context, --parallel, --prompt-cache-gib, TENSORFOLD_MEMORY_RESERVE_GIB), and /metrics reports the same facts. Allocation and admission are unchanged. It will be in the next release.

    We're also running a long soak on two GB10s (1.1.1 against 1.1.4) to check memory over hundreds of requests, and will post what it shows here.

    - Synthema, Ash's AI Assistant.

  18. ashhart commented on Oct 24, 2026

    @ashhart
    Owner

    Soak results, as promised. Setup: GLM-5.3-Flash NVFP4 at TP=2 on two GB10s, --context 245760 --parallel 1, default prompt cache. Each build served 300 seeded chat requests on fresh servers, then sat idle for 90 s. Both ranks' memory was sampled throughout.

    v1.1.1 v1.1.4
    Requests answered 300 of 300, 0 errors 300 of 300, 0 errors
    Prompt cache at start 1.0 GiB 0.8 GiB
    Resumed from the cache 0 61
    Memory after the first request (rank 0 / rank 1) +3.4 / +4.8 GiB, then flat +4.6 / +2.8 GiB, then flat
    Lowest MemAvailable (either rank) 8.0 GiB 12.4 GiB
    After the server stops all memory returned all memory returned

    Neither build ran out of memory. On neither did memory keep growing over the 300 requests: it settles a few GiB above the prompt-cache budget early on and stays there. 1.1.4 also resumes prompts from the cache where 1.1.1 at this window did not.

    So we can't reproduce out-of-memory errors after use on two GB10s with 1.1.1 or 1.1.4 at this window. If you're seeing it, please post:

    • the TensorFold version on each box (tensorfold-native --version);
    • the checkpoint and revision, and the full serve command on both ranks;
    • the startup line that reports the model, per-stream size and prompt cache;
    • the last 200 lines of both ranks' logs around the failure;
    • free -m on both boxes before the load and when it fails.

    That will tell us whether something else on the box is taking room after the load, or whether a request shape we didn't send grows memory.

    - Synthema, Ash's AI Assistant.

  19. ss-cong commented on Oct 26, 2026

    @ss-cong
    Author

    Ran the long soak you asked for on native 1.1.5 (latest). It did not degrade, so no TF_GLM_PROF=1 capture.

    Setup: tensorfold-native 1.1.5 aarch64 on 2x GB10; Mia-AiLab/GLM-5.3-Flash-EXL3-4bpw-TensorFold-Ablit@57edefd2 + incoai/GLM-5.3-Flash-DFlash2@bf582e4e; --context 262144 --parallel 2 --max-tokens 32768 --drafter ... --no-thinking --metrics-open; RoCE 2 HCA. Boot line: model 88.92 GiB; 2 streams at 3.40 GiB each at a 262144-token window, 10.5 GiB left after 12.2 GiB reserve; 7.1 GiB prompt cache, loaded in 226.3 s.

    Workload, 3 h (16:40:33 -> 19:40:35): 13-token probes every 30 min (6), an ~105K-token document every 60 min (3, same document), 400-token prose every 15 min (12), and GPU util/power + MemAvailable sampled every 5 min on both ranks (36 samples).

    The six 13-token probes (the degradation signature): 0.73 / 0.72 / 0.75 / 0.72 / 0.71 / 0.70 s. Flat over three hours - on the 0.6.0 lineage the same probe read 10.81-18.80 s once degraded.

    Long document: #1 cold 148.8 s; #2 2.69 s with 104,448 cached; #3 2.67 s with 104,448 cached.

    Medium decode (400 tokens): 23.7, 23.7, 23.8, 23.9, 23.7, 23.6, 23.6, 23.7, 23.6, 23.6, 23.8, 23.7 tok/s - under 1.3% spread over 12 runs.

    Idle ranks (36 samples): rank 0 0% util and 11.3-11.6 W throughout; rank 1 0% and 10.7-10.9 W from the second sample on (its first sample after load was 94%, which is the load tail, not steady state). Temps 46-49 C. MemAvailable 15.5 -> 16.1 GiB with no downward trend - no leak. The idle rank 1 at 96% GPU / 17.8 W from the original report did not reproduce on 1.1.5.

    Logs: both ranks for the full three hours: no errors, no slow-request lines, no degradation markers. The only warning is the expected non-loopback server has no API key.

    One finding on the new flag, since it is relevant to the 256K report: on CUDA --prompt-cache-gib 3 at 262144/par4 still reports only 0.4 GiB of prompt cache, because it only caps what weights+streams leave. Adding --prompt-cache-over-cap refuses to start: "--prompt-cache-over-cap lifts a Mac's 70% cap: on CUDA the prompt cache takes at most the memory the weights and streams leave, so serve without it". So on CUDA the only way to get a usable cache at 256K is to lower --parallel (par4 -> 0.3 GiB, inert; par2 -> 7.1 GiB, works). Might be worth saying that in the startup warning and the flag's help text, so users don't pass --prompt-cache-gib expecting it to reserve memory.

    Raw data: 36 samples + 21 requests in JSONL, both rank logs kept. Happy to upload them if useful; can also re-run any window you want (this was 256K/par2 because that is the config where the cache is actually live - 524288/par2 only leaves 0.5 GiB).

  20. ciprianveg commented on Oct 26, 2026

    @ciprianveg
    Contributor

    /atc claim 1 5

  21. ciprianveg commented on Oct 26, 2026

    @ciprianveg
    Contributor

    A data point from an 8×GB10 TP=8 lane: a sampling-mode mismatch between rank 0 and its followers produces this stall shape — and the native tree already carries the fix's shape

    We chased a stall-then-crash class on our own GLM-5.3 EXL3 TP=8 lane (8 × GB10, an in-house TensorFold-derived serve protocol that forked from an older step-header shape) that looks relevant to the unresolved 0.6.0-lineage SIGSEGV, so here is the mechanism and the receipts, with the caveat up front: our receipts are from our lane, not from your native tree, and not at TP=2.

    • The mechanism. The step header our lane used carried no sampling fields. Rank 0's engine applied the request's sampling (temperature > 0) and posted the sampled candidates' gather; the followers reconstructed their sampling from the header as null and ran the greedy pick — a different collective (the per-rank top-1 pairs all-gather). The collective rank 0 waited on never formed; each follower waited on nothing. The stall ended as a hang, or as a crash whose "completion" was a stale read — a never-written candidate buffer reading recycled wire memory. Greedy requests never crashed (null on both sides); only the sampled arm did. From the outside this is indistinguishable from "a follower enters its collective before there is a request."
    • The fix, with receipts. The header grew seed/temperature/top_p/min_p (raw f64 bits) plus top_k, and the follower's step application reconstructs the request's sampling; temperature 0 stays greedy. After the fix: the temperature-1 crash reproduction ran clean, the sampled draws were bit-consistent with the same seed drawn through the equivalent single-process path, and the greedy anchors were bit-identical to before (8/8 prompts).

    Your native tree already has this shape, so this is not a bug report against it — we read the source before commenting. cuda_follow.zig's Header has carried seed/temperature/top_p/min_p/top_k on the begin step since the GLM CUDA family's first commit (2675b30), Leader.beginOn fills them from the stream's sampling, and the follower applies them in follow() through beginFollowing — so Engine.draw takes the same branch (sampled gather vs greedy pairs) on every rank. The structured path is rank-asymmetric by design (drawWhole: followers gather whole rows and return; only rank 0 masks and draws), and the DFlash2 drafter's block pass is greedy-deterministic, so we could not find a remaining path where rank 0 and a follower enter different collectives over a sampling disagreement.

    The suggestion that falls out for the 0.6.0 Python lineage: when the fatal trace is captured, dump each rank's effective sampling rule at the stall, not just the stacks. Two ranks that disagree on the draw mode (one sampled, one greedy) enter two different collectives; the failure is an unmatched pair, not a slow one, and a mode mismatch is visible without a core.

  22. ciprianveg commented on Oct 26, 2026

    @ciprianveg
    Contributor

    /atc release

  23. ashhart commented on Oct 27, 2026

    @ashhart
    Owner

    Thank you, @ss-cong, for the careful soak on 1.1.5 and the earlier cache retests. Native GLM on CUDA now sizes kept prompt states by the committed prefix (3508f68, since 1.1.2) and warns at startup when the cache cannot hold one state (2998883), and your three-hour run showed none of the original slowdown. You're right that on CUDA --prompt-cache-gib only caps what the weights and streams leave, so we'll make the warning point at --parallel and --context instead. Closing as fixed; please reopen if the slowdown comes back on a current release.

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