Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Interleaved template string accumulations retain their own growing buffers, avoiding repeated copies of the full prefix. Saved and branched strings retain their bytes and request provenance. Related to #1633; this remains a draft because the reported 66 GiB production failure is not reproduced.
The final implementation uses a one-based
u32handle into the render context's builder registry.Strremains 40 bytes andValue48 bytes, matching the base on the tested 64-bit targets. Reuse requires both text and provenance to identify the builder's complete current value; older snapshots start a new builder. Earlier backing arrays remain valid for retained aliases. These checks are necessary for byte and provenance correctness, including mutation while evaluating the right operand.Receipt
Base
f350cd3ea253a042e205746928271f9d8f71a82d; current candidate implementation8d00b490f5ddf45721546e9b9816a083a46e5fa2. Later commits add qualification helpers and receipts. Historical receipts retain their original revision labels.Template memory and rendering
The current allocation controls cover 306 processes across three revisions and three optimization modes: 297 completed and matched Jinja bytes, nine baseline processes (three shapes in three modes) hit the fixed 240 MiB combined compiled-template and render-scratch cap, and all 102 current-candidate cases completed. Independent verification checked 176,407,221 rendered bytes and 72 provenance comparisons. Scratch is peak live allocator memory, not RSS or GPU memory.
Remaining shape-dependent costs are disclosed in that receipt: short large-catalog scratch is 3.34% above base, 128 small-object cycles 1.05% above base, and the 128-large-JSON-string case uses 38,094,060 bytes versus 34,618,268 for the earlier pointer implementation (+10.04%; original base hits the cap). This does not remove all quadratic list operations.
Fixed host timings use six balanced three-way permutations, 72 processes and 216 timed renders. These are descriptive medians, not an equivalence test or model throughput:
Current CUDA build and model qualification
Full CUDA receipt and reproducible raw data. Environment: one DGX Spark GB10 (
sm_121), Ubuntu 24.04.5, driver 580.178.04, Zig 0.17.0, nvcc 13.3.73 innvcr.io/nvidia/pytorch:26.07-py3, checkpointnvidia/Qwen3.8-Flash-Next-FP4-Localatb9ce18a6887e18c089fdea8509a33e63429a3300. Context 8,192, parallel two, bf16 KV, prompt cache zero, top-k 20/top-p 0.95, 9 GiB reserve and 6 GiB guard.The candidate built successfully through 218/218 CUDA steps and a separate 112/112-step build embedding all 103 retained baseline GPU assets. The baseline install was reused unchanged. Four independently compiled CUDA fatbins differed, so measured binaries use identical baseline assets to isolate the host change. Source, executable, helper, image and checkpoint metadata identities are pinned.
Exactness: 18 complete 256-token drafted/plain responses form nine exact pairs across three fixtures, greedy seed 1234 and sampled seeds 1234/1235. Six generation/history tokenizations also match. All 480 decode responses match across repetition, solo/concurrent and builds; every candidate response matches the corresponding plain P0 output. The corrected experiment covers 498 responses and 127,488 token IDs, with zero mismatches and zero cached tokens.
Decode speed
Six paired fresh-server blocks (AB, BA, BA, AB, AB, BA), 256-token replies, two repetitions per cell. Each interval uses six paired log ratios of server-level medians (95% t, df=5), not individual requests. All twelve intervals are wholly within the prespecified ±2% band. No interim intervals, replacement pairs or extra runs.
Throughput columns are arithmetic means of six per-run medians. The paired geometric change and confidence interval come unchanged from the frozen comparator and determine the gate.
TTFT
Measured cells show arithmetic means of six per-run median request TTFTs. The last row separately averages six first-cold excluded warmups per side. TTFT has no equivalence gate.
First-cold mean TTFT increased by 24.69 ms (+4.32%). This is descriptive; TTFT equivalence is not established.
Tests run and limits
test-cuda-host, server CPU, kernel-contract host, golden and fuzz targets.zig fmt --check;git diff --checkpasses. Lean remains 426 base / 426 branch, zero added problems. Existing findings are not called clean.SUMMARYlines are not applicable. CUDA compilation and the checkpoint-specific model gate passed as reported above; a fresh full GPU kernel-contract suite was not run for this host-only change.Coordination
ATC check was complete with advice
yoursand PR #1652 as the only linked implementation. Official overlap remains incomplete withpullFilesLimit. A separate paginated audit at2026-10-30T15:14:52.694814+00:00covered all 110 open PRs, 4,998 changed-file entries and all 153 branch paths. A second inventory confirmed stable PR heads, bases and local targets. No other PR touched these paths, so no touching PR required a merge-tree check.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. Drafted/plain and concurrent/solo pass; resumed-cache equality remains unrun.Authored by JRB AI in a private capacity. This contribution does not represent the views or positions of any organisation.