WIP: goals 2 and 3 - long context, and past the external reference #14
No reviewers
Labels
No labels
human-approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitpartner/tt-stack!14
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/claude-auth/goal-2-3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #13 (
agent/fable/cxx-fork-build), which is where the C++ prefillfixes live. Merge that first.
Goal 1 is closed out
14.368 tok/s, and 14.418 tok/s on a second run after a full container
teardown and a warm restart — 0.3% apart, which settles goal 1's third
condition (reproducible without hand-holding) by measurement rather than
assertion. Both in
bench/runs/goal1-endpoint-fp8-2026-09-04.jsonl.decode-bench.pyno longer hardcodes the retired 18 tok/s target; thethreshold is
--target, default 10. It also referred toargs.targetwherethe namespace is called
a, so my own threshold change crashed it on firstuse — fixed, and that fix is why there is a second baseline number at all.
Goals 2 and 3 now have gates
They existed only as sentences in goal 1's "explicitly not in goal 1" list.
Two findings from writing them down properly:
tokens of KV; at
bfloat16that is 64 GiB against 64 GiB of total deviceDRAM, and at
bfloat8_bit is 32.5 GiB. SoQWEN_SDPA_BF8is load-bearing,and the ~1.4 GiB of margin it leaves is thin enough that goal 3's work
belongs first —
down_projatbfloat4_breturns 2.65 GiB of DRAM. Theordering runs opposite to the numbering.
(
qwen36_vllm.pycaptures at pos 0 and replays per bucket), and goal 1'sp99/p50 of 1.18 says there is no stall left to remove. So the dispatch lever
is spent and only the divisor is left — and
down_projalone projects to~15.9 tok/s against a >16.0 gate.
Patch 0008
bfloat4_bonmlp.down_proj, gated onQWEN36_MLP_DOWN_BF4: 5.704 G params,1.0625 → 0.5625 bytes/element, −2.65 GiB per token, ceiling 29.1 → 32.2 tok/s.
Chosen because two independent published NVFP4 recipes for this model quantise
down_proj— evidence-led rather than the first candidate to hand. Verifiedon device: the logs now read
mlp.down_proj.weight.tp_dtype_BFLOAT4_B.Four things went wrong, and each is recorded where it will be re-read
load_mlp_weights()returnsearly at
num_devices > 1throughtp_common.shard_w. The first versionpatched only the single-device branch — the one that reads naturally when
you skim — and the image built, imported, asserted its own gate, loaded 64
layers and served, while every log line said
BFLOAT8_B. A null resultthat looks like a finding is the worst outcome available, so the overlay
now counts four occurrences of
_down_dtypeand fails the buildotherwise.
file carries no dtype, so the flip would silently reload the bf8 tensors.
False —
ttnn.as_tensorappends dtype and layout to the filename, so thetwo dtypes are separate files that coexist and switching is warm in both
directions. Corrected in place rather than quietly dropped. The design is
better than I assumed, which makes the dtype sweep cheap: each candidate
materialises once, ever.
are already merged into the fork branch. They matched cleanly in neither
direction,
patch(1)took them with fuzz, and the image died atNameError: name 'Mode' is not defined.patch -R --dry-runis not areliable already-applied test on a rebased tree. Now: named files,
--fuzz=0, and a real import before the image ships.path about to tilize NaN placeholders into the new bf4 filenames, deleted
them and refused to start. That guard saved the experiment;
COLD=1is nowa documented switch.
Also
scripts/vllm-tt-serve.sh— the working invocation, in the repo at last,with
goal1/goal2/goal3profiles. It lived only in a shell historyand a container's
Config.Cmd.bench/long-context-bench.py— N concurrent streams at a real depth, since256k behaviour cannot be inferred from 4k on an architecture where 16 of 64
layers scale with context and 48 do not.
docs/FORKS.md— separates the C++ patches (overnight wheel build) from thePython ones (seconds, last image layer).
Still open
The goal-3 number itself: the cold bf4 build is running on cfx-llm2 now. WIP
until that measurement is in
bench/runs/, and goal 2's ladder has notstarted.
Tier: T1 (a dtype policy change behind an env gate, plus docs and scripts).
Every MBU figure in this repo took 27.49 GiB from the external report. Summing our own tensor-cache files by name group says that is wrong, because two of the largest cached tensors are not read per token: mlp.gate_up.weight.swiglu.tp 5.98 GiB packed [gate|up] for the fused PREFILL agmm -- the source says decode keeps w1/w3 tok_embeddings.weight 2.37 GiB a row lookup, not a matmul The corrected read is 20.17 GiB, and it moves both numbers in opposite directions: the 100%-MBU ceiling rises from 29.1 to 39.7 tok/s, and our measured 14.42 tok/s is 36% of DRAM rather than 49%. That is better news and worse news, and the worse half is the interesting one. More headroom exists than documented. But a decode that is ALREADY TRACED, with a p99/p50 of 1.18 and no episodic tail, sitting at 36% MBU, has something systematic in front of every token -- which is not the conclusion the previous revision drew when it said the dispatch levers were spent. Three candidates are now written down with the evidence for each: host round-trips (_ondev_argmax is False, so logits cross PCIe Gen3 x4 every token), M=1 matmul efficiency on a path tuned for 1 and 4 cards, and the per-layer CCL at a TP=2 that falls back to TP=4 constants. It also changes the goal 3 projection from a miss to a pass: at a constant 36% MBU, down_proj at bfloat4_b lands at 16.6 tok/s against the > 16.0 gate rather than the ~15.9 the old divisor predicted. Whether MBU holds constant is the open question, which is the argument for measuring instead of projecting.Closing as obsolete: this was a draft/WIP PR for goals 2-3 that has been superseded by PR #15 (
agent/claude-auth/goal-4-nvfp4-single-card), which includes all of these commits and continues the work.Pull request closed