Repository navigation
Description
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 inprefill_s— while the engine reported
requests_running 0before 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 (
enp1s0f0np010.10.10.1/.2
andenP2p1s0f0np010.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 labeltf.patches=8ea91ba1bb04, built from the
MiaAI-Lab EXL3 recipe
at33b50fd(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_POLICYfnc7:0.3. Startup:native 1048576, allocated prompt/reply window 524288, cache slots 524304; rank 1ready 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 namedTF_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 restartwould 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 -qthrottle reasons0x0, 55–57 °C, no
Xid/NVRMlines 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_tokenswas 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
- perf(glm): an idle rank 1 waits on the rendezvous TCP store, not in a spinning all-gather #132 and Qwen3.8-27B TP=2: idle rank 1 spins at ~96% GPU and slows co-located work (#132 does not cover this path) #305 — idle follower spinning on its collective; 96% GPU on rank 1, 0% on rank 0.
This is what our 19:20 sample looks like, on the release that includes the GLM fix. - GLM-5.3-Flash on Mac (native 1.0.12): a continuing turn's cache restore fails and re-prefills 100k+ tokens, with nothing logged #966 — a continuing turn's cache restore fails and re-prefills 100K+ tokens with nothing
logged; two reporters, maintainer engaged. Our 0.41 s → 14.1 s reuse path may be the same
failure seen from the client side (cached_tokensstill reports the prefix as cached). - Proposal: streams take memory from one core pool as they grow, instead of a full window each at load #781 —
--parallel Nreserves N whole--contextwindows, and "a 2k-token chat holds as much
memory as a 128k agent session". We are at--parallel 8 --context 524288with the pool 77%
held by 32 kept prompts, i.e. exactly the state that proposal describes. - In the recipe repo we run (they are not TensorFold issue numbers): MiaAI-Lab #185 (same day, long multi-turn is 7–14 tok/s against 103–105 tok/s
single-turn — same shape as ours, on the zig engine), MiaAI-Lab #173 (kept-state prefix match silently
fails above ~800K), MiaAI-Lab #160 (the pool is sized from free memory, 26% swing
between identical launches).
Questions
- 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. - 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_promptsat the 32-entry cap, 77% of pool rows held). - 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_promptsrows, 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
ss-cong commentedon Oct 17, 2026
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=524288preserved, 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 inprefill_scame 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.drawonce a second on rank 1 in the healthy window: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_prompts32 → 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.
cwschroeder commentedon Oct 17, 2026
Source check for the reported v0.6.0 lineage and recipe
33b50fde:_flush()rings whenself.idle, andfollow()awaits it in that state.MFILLuses 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 thatMULTI_PREFILLbypasses the doorbell.RoceComm, soTF_GLM_COMM=rocedoes not put all traffic on the custom RoCE path (0010).prefill_sincludes elapsed wall time throughtorch.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,_sharewait 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.
ss-cong commentedon Oct 17, 2026
Following your checklist — what we could get without changing the running image
1.
prefill_swas misleading me, as you said. Over ten consecutive probes,wall - prefill_s - decode_sreached 8.3–13.7 s (for example wall 20.11 s,prefill_s0.33 s,decode_s0.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.
/healthpublishesiteration_s(the current iteration's elapsed time), and it explains the wait. Sampled at 0.15 s across a slow probe:A 90 s sample of
iteration_sat 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 carriedrun=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}anditeration_sare in/health;requests_waitingexists 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 themulti.pypatch 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 byfutex_do_waitandpoll_schedule_timeout. As you predicted, kernel wait channels are too coarse.patches/0040armsfaulthandler.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.shforwards everyTF_GLM_*from the launch environment into the container, soTF_GLM_MULTI_WATCHDOG_S=5at 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.cwschroeder commentedon Oct 17, 2026
Five seconds is a reasonable threshold for a short diagnostic window at your next planned launch, with
TF_GLM_MULTI_WATCHDOG_EXIT=0explicitly set on both ranks. Patch 0065 changes the 0040 behavior:EXIT=1terminates the process after the first dump. The pinned launcher forwards both exportedTF_GLM_*values; please check the effective settings in both containers.The timer is narrower than a periodic process sampler:
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.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.
ss-cong commentedon Oct 17, 2026
The stall ends in a SIGSEGV — stacks captured, rank 0 died, rank 1 kept waiting
We armed
TF_GLM_MULTI_WATCHDOG_S=5at the restart and let real traffic run. At 2026-10-17 20:43:30 +08:00 the server hung andfaulthandlerfired 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).rank 0, the request thread (same stack in three of the seven dumps):
rank 0, the iteration thread:
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 followand amulti.py_fillframe — waiting for rank 0, not working:So the shape is: a request thread sits in
kept_reasoning.signature()/_keys/restore()(patch0120's kept-reasoning restore, on the render/prepare path before any prefill), the iteration thread is inmulti._fill, rank 1 is infollow(), and ~50 s later rank 0 segfaults. This is also the same stack family as the earlier slow windows —kept_reasoningappeared 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:
kept_reasoning.restore()/_keys()/signature()(patch0120) expected to run on the request thread ahead ofrender, and can it block on anything the iteration thread holds? The signature walk is over kept states, so the cost growing withkept_promptswould match what we measured.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 (therepeat=Truetimer writes every 5 s for the whole stall)?We have the complete
docker logsfrom 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).cwschroeder commentedon Oct 17, 2026
The pinned source supports a CPU history cost here, but does not establish the SIGSEGV cause.
33b50fde, 0036 wiresrestore()beforeinner.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.follow()frame alone cannot establish healthy idle; the complete innermost frames are needed. I would use 30 seconds withTF_GLM_MULTI_WATCHDOG_EXIT=0on 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.PYTHONFAULTHANDLER=1inside the containers can enable it if absent.Please share the Python/native-component versions, effective watchdog settings, installed
kept_reasoning.py/multi.pyhashes and relevant source, both ranks' full innermost stacks, and the final fatal/native traceback or core backtrace if available. The0120attribution differs from the pinned recipe's0036; matching the installed files comes before proposing a memo optimization.ss-cong commentedon Oct 17, 2026
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) withnvidia/GLM-5.3-Flash-NVFP4at 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:That is 190.43 / 2. Once the lane came up it reported:
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 8cannot start at a 524288-token window: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:The first request that tried to keep anything:
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
capabilities --jsonreports"families": {"glm5_next": ["modelopt-nvfp4"]}, and the checkpoint'sconfig.jsoncarriesquant_method: modelopt,quant_algo: NVFP4, andconfig_groups.group_0.weights = {num_bits: 4, type: float, group_size: 16}.TF_GLM_RANK,TF_GLM_WORLD=2,NCCL_COMM_ID=10.10.10.1:29521(servehas no--tp/--rank). The host has nolibnccl-net.sofor 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.The run above used a local copy of this checkpoint whose only change is BF16
o_projvalues (no size difference); the stock snapshot reports the samemodel 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 atkept_prompts 32and 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.cwschroeder commentedon Oct 17, 2026
@ss-cong, the full-window snapshot cost matches the source. The startup
modelvalue already includes the first live sequence. I checked release source833bbfcb; the eight relevant files are byte-identical at current main6ee828c2.modelFamily 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=0result narrows the older Python reproducer, but a faulting trace and matching installed files are still needed to establish the SIGSEGV cause.ashhart commentedon Oct 17, 2026
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
ss-cong commentedon Oct 18, 2026
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
stateBytescopy 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 stocknvidia/GLM-5.3-Flash-NVFP4snapshotda920bb0b9f4a06727223a349e55468e38352348; only delta is BF16o_projvalues in layers 15–45 perABLIT_META.json(altered-dealign-oproj-l15-45-skip44);config.jsonmd5a5c93afedbb1,quantization_config.quant_algo = NVFP4.Binary:
tensorfold-native 1.0.12, md5390fc80f40ac, 32,637,128 bytes, identical on both ranks (~/tf1012/bin/tensorfold-native, aarch64). Installed via the 1.0.12 pip wheel; NCCL2.30.7+cuda13.3(socket transport, nolibnccl-net.soon this host).Rank 0 startup (GB10 s/n in earlier post; 10.10.10.1):
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=1then NCCL2.30.7+cuda13.3join; nomodel ...line (single-GPU report is rank 0's).Effective settings:
TF_GLM_WORLD=2,TF_GLM_LAYERSunset (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:
On the older Python-lane SIGSEGV: the hours-stable
TF_GLM_KEEP_REASONING=0run continues; we will send the matching installed-files list and a fatal trace when it next faults on demand.ashhart commentedon Oct 18, 2026
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
ashhart commentedon Oct 19, 2026
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
Size GLM CUDA prompt snapshots by committed prefixes
Changelog: the remaining user-visible 1.1.2 changes
ashhart commentedon Oct 21, 2026
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.
ss-cong commentedon Oct 23, 2026
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.2aarch64 (sha2564da070ed…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 readprompt_tokens_details.cached_tokens.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 == freshholds: same-request greedy outputs are byte-identical on both versions.Memory (what we can observe): on GB10 unified memory neither
/proc/meminfoMemAvailablenor 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: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).
ashhart commentedon Oct 24, 2026
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=1capture of one slow request.- Synthema, Ash's AI Assistant.
ss-cong commentedon Oct 24, 2026
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:
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 --jsonsay 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 == freshholds in both.ashhart commentedon Oct 24, 2026
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/metricsreports 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.
ashhart commentedon Oct 24, 2026
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.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:
tensorfold-native --version);free -mon 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.
ss-cong commentedon Oct 26, 2026
Ran the long soak you asked for on native 1.1.5 (latest). It did not degrade, so no
TF_GLM_PROF=1capture.Setup:
tensorfold-native 1.1.5aarch64 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 Wfrom 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 3at 262144/par4 still reports only 0.4 GiB of prompt cache, because it only caps what weights+streams leave. Adding--prompt-cache-over-caprefuses 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-gibexpecting 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).
ciprianveg commentedon Oct 26, 2026
/atc claim 1 5
ciprianveg commentedon Oct 26, 2026
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.
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'sHeaderhas carriedseed/temperature/top_p/min_p/top_kon thebeginstep since the GLM CUDA family's first commit (2675b30),Leader.beginOnfills them from the stream's sampling, and the follower applies them infollow()throughbeginFollowing— soEngine.drawtakes 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.
ciprianveg commentedon Oct 26, 2026
/atc release
ashhart commentedon Oct 27, 2026
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.
GLM CUDA: the too-small prompt cache warning names --context and --pa…