Repository navigation
Merge upstream main - #67
Merged
Merged
Conversation
plotarmordev
commented
Nov 17, 2026
Owner
- feat(flashnext): read the chunk settings through the startup parser (Flash Next CUDA: validate chunk settings through the shared startup parser ashhart/TensorFold#3308)
- changelog: credit feat(flashnext): read the chunk settings through the startup parser ashhart/TensorFold#3591 beside Flash Next CUDA: validate chunk settings through the shared startup parser ashhart/TensorFold#3308
- contract: every chip checks each chip's qwen27 control edit matches its source once, so an M4 run sees a stale M5 edit
- changelog: contract: every chip checks each chip's qwen27 control edit matches its source once, so an M4 run sees a stale M5 edit ashhart/TensorFold#3343 under Unreleased
- changelog: contract: every chip checks each chip's qwen27 control edit matches its source once, so an M4 run sees a stale M5 edit ashhart/TensorFold#3343 back under Unreleased after the 1.2.9 cut
- changelog: contract: every chip checks each chip's qwen27 control edit matches its source once, so an M4 run sees a stale M5 edit ashhart/TensorFold#3343's line from lines/3343.txt in place of its own
- hip flashnext: stage a tile's rows of q once in tf_fn_idx_scores and register its contract
- changelog: hip flashnext: stage each tile's q rows once in LDS in tf_fn_idx_scores ashhart/TensorFold#3601's line from lines/3601.txt in place of its own
- nemotron hip: add within-path invariance checks for prompt cuts, decode grouping and resume
- changelog: nemotron hip: add within-path invariance checks for prompt cuts, decode grouping and resume ashhart/TensorFold#3580 under Unreleased
- changelog: nemotron hip: add within-path invariance checks for prompt cuts, decode grouping and resume ashhart/TensorFold#3580's line from lines/3580.txt in place of its own
- template: add the float filter
- changelog: template: add the float filter ashhart/TensorFold#3577 under Unreleased
- fix(studio): accept optional benchmark product families
- changelog: fix(studio): accept optional benchmark product families ashhart/TensorFold#2693 under Unreleased
- fix(studio): open model picker from planning-only control
- changelog: fix(studio): open the model picker from Planning only ashhart/TensorFold#3357 under Unreleased
- h3: read the transformer shards ahead of their Metal mappings
- docs(h3): transformer read-ahead in the Metal recipe
- docs(h3): read-ahead receipt against main in the Metal recipe
- changelog: h3: read the transformer shards ahead of their Metal mappings ashhart/TensorFold#2999 under Unreleased
- kolibri1: tree-attention cache offsets signed; a ring attach makes below the origin no longer overflows
- changelog: kolibri1: tree-attention cache offsets are signed, so a cache placed below the origin no longer overflows ashhart/TensorFold#3561 under Unreleased
- flash next metal: the scale index is the default, prompt gathers and grouped experts read it, routed arrays are freed
- changelog and ledger: Flash Next's scale index by default (Flash Next on Metal: the scale index is the default; prompt gathers and grouped experts read it, routed arrays are released ashhart/TensorFold#2805)
- glm metal: 8-bit routed experts read once a window by unique expert
- changelog: glm metal: 8-bit routed experts read once a window by unique expert ashhart/TensorFold#3631 under Unreleased
- lean: one-line comments
- glm metal: MTP drafts through the layer's own LM head when stored
- changelog: glm metal: MTP drafts through the layer's own LM head when stored ashhart/TensorFold#3632 under Unreleased
- lean: one-line comments
- tf-glm-run: GLM_PROMPT_NLL scores every prompt token through the prompt path
- changelog: tf-glm-run: GLM_PROMPT_NLL scores every prompt token through the prompt path ashhart/TensorFold#3633 under Unreleased
- lean: one-line comments
- changelog: tf-glm-run: GLM_PROMPT_NLL scores every prompt token through the prompt path ashhart/TensorFold#3633 as a dev-tool loss check
- changelog: drop nine Unreleased lines that came in with Flash Next on Metal: the scale index is the default; prompt gathers and grouped experts read it, routed arrays are released ashhart/TensorFold#2805's re-pointed commit
- metal row projection: windows of 4+ rows run 8 at a time, then 4, 2 and 1, each code unpacked once
- metal row projection: the 8-row step only on chips with tensor units; M1-M4 keep main's 4, 2 and 1
- metal row projection: retain the narrow source on pre-tensor chips
- metal row projection: the two pipeline-selection tests run only on macOS
- changelog: metal row projection: windows of 4+ rows run 8 at a time, then 4, 2 and 1, each code unpacked once ashhart/TensorFold#3129 under Unreleased
- Add an opt-in Keenable provider for agent web tools
- app: install the DNS fixture in the Keenable search test
- changelog: app: an opt-in Keenable provider for agent web tools (lands #2752) ashhart/TensorFold#3637 under Unreleased
- fix(dsv41): plan the 32-row prefill program so the second streams buffer is sized for it
- fix(dsv41): fold the prefill plan comment into one line
- dsv41: a host test sweeps prefill segments of 17 to 33 rows, full and replay (dsv41: a prompt whose prefill segment is 18 to 32 rows long replies with repeated begin-of-sentence tokens (second streams buffer planned for 17 rows) ashhart/TensorFold#3366)
- changelog: fix(dsv41): plan the 32-row prefill program so the second streams buffer is sized for it ashhart/TensorFold#3388 under Unreleased
- qwen3_5 cuda: rows on one shared page run read each key tile once across streams (join kernels)
- changelog: qwen3_5 cuda: streams resumed from one prompt read each shared prefix key tile once a forward ashhart/TensorFold#3653 under Unreleased
- changelog: each line once under Unreleased
- qwen3.5 metal: declare warm turns so a follow-up resumes the reply
- qwen3.5 prefill: background passes yield at chunk boundaries and keep the completed prefix
- qwen3.5 metal: keep warm ends only on usable cuts
- changelog: qwen3.5 metal: declare warm turns so a follow-up resumes the reply (lands #3457) ashhart/TensorFold#3662 under Unreleased
- docs: add native HIP section to Nemotron 3.5 Lightning recipe
- docs: correct Nemotron HIP draft sizing and cap
- changelog: docs: add native HIP section to Nemotron 3.5 Lightning recipe ashhart/TensorFold#3560 under Unreleased
- core lanes: a cut chance tail prices by the rule's rates, not as a measured zero (core lanes: shared rounds can't tell a cut draft tail from a measured zero chance ashhart/TensorFold#2870)
- core lanes: preserve cached cut markers on allocation errors (core lanes: shared rounds can't tell a cut draft tail from a measured zero chance ashhart/TensorFold#2870)
- changelog: core lanes: a cut chance tail prices by the rule's rates, not as a measured zero (#2870) ashhart/TensorFold#2979 under Unreleased
- server: keep tool markup quoted in Markdown code spans and fences as prose
- changelog: server: keep tool markup quoted in Markdown code spans and fences as prose ashhart/TensorFold#3588 under Unreleased
- qwen3_5 cuda: warm turns prefill the next turn's prompt and keep only a 4096-row-multiple end
- server: warm passes use the same system cut as chat requests
- changelog: qwen3_5 cuda: warm turns prefill the next turn's prompt and keep only a 4096-row-multiple end ashhart/TensorFold#2824 under Unreleased
- docs: GLM-5.3-Flash long agent sessions: reasoning the client sends back, the model's repetition past about 300K, and omp's replayReasoningContent
- changelog: Docs: GLM-5.3-Flash in long agent sessions (reasoning sent back, repetition past ~300K, omp's replayReasoningContent) ashhart/TensorFold#3576's line names its PR
- docs: use TensorFold from OpenClaw through the openclaw-tensorfold plugin
- test: seeded schedule exploration for the lane host
- changelog: test: seeded schedule exploration for the lane host (test-lane-explore-host) ashhart/TensorFold#3233 under Unreleased
- xpu: Qwen3.8-27B's RoPE tables from core's rope_freq, transformers' words (value change)
- xpu: the RoPE table test gets its own step, test-rope-xpu-host
- changelog: RoPE: Qwen3.8-27B on XPU from core's exact helper (#1852 batch 8; 1-ulp value changes) ashhart/TensorFold#2000 under Unreleased
- server: a grammar over 512 KiB is refused before it is compiled
- server: tools count once against the grammar size limit, with a refusal of their own
- server: keep the merged grammar route within its module limit
- changelog: server: a grammar over 512 KiB is refused before it is compiled ashhart/TensorFold#3038 under Unreleased
- glm wide: the failed-compile count takes the two by-expert row kernels a width (upstream 9e52d73)
…ts source once, so an M4 run sees a stale M5 edit
…register its contract
…de grouping and resume
Jinja's float(value, default=0.0) for numbers, booleans and numeric text. Anything else gives the default, an undefined value raises, and an argument Jinja does not have is an error, as in Jinja. Inkling 2's chat template reads its thinking effort through it.
Model.load reads every shard span through core's checked read-ahead before the first forward, so missing or short shards fail the load. TF_LOAD_PREFETCH=0 leaves page faults to the mapping. zig build test-h3-read-ahead covers 16 readers and 0, and the nightly macOS adapter target runs it.
…low the origin no longer overflows On main a copy-drafts-only server (ReleaseSafe) panics at its first one-row step graph: offsets computed m.k[i] + at - m.origin in u64, and attach's sliding rings can be allocated below origin. The kernel reads the offsets as long long, so a negative one is valid.
…grouped experts read it, routed arrays are freed TF_FLASHNEXT_SCALE_INDEX is now on by default on GPUs without tensor units. The loader indexes every 4-bit group-32 expert projection once at load, on up to eight threads. The routed gate, up and down projections, which only expert kernels read, release their stored scales and biases and keep the index and table in those slots; the shared projections keep theirs beside the index, since kernels outside the expert set read them direct. The prompt gathers (32, 64 and 128-row tiles and the fused gate/up) and the grouped expert kernels now read each group's pair through the index, as the per-row expert kernels already did: the same two values into the same sums, so replies keep their tokens. An index is keyed by its projection's codes buffer, and a kernel takes the indexed form only for a projection that has one. A tensor with more pairs than a 16-bit index holds turns the index off with a warning, as before. The indexed gathers and the indexed grouped launches register with the kernel contract as bit-preserving replacements of the direct reads, each with a planted control and launch records. Refs ashhart#2751
At widths other than 4/64, wide.moe ran each (row, pick) slot in its own threadgroup, so a window of R rows read each routed expert once per pick and the shared expert once per row. glm_moe_rows_u runs one threadgroup a unique expert (the route's uids, members and count) with a simdgroup per pick, and the shared expert with a simdgroup per row, so their weights come from memory once for every row that picked them. Each pick's sums are the same tf_rp_rows call, so the bits are too. Windows of 2+ rows take it; one row keeps the per-pick launch. tf-glm-rows-check: by unique expert == by pick at q8, q4 and q2 for 2, 4 and 16 rows (456,192 bit-equal values).
A checkpoint may store layers.45.shared_head.head (a lighter copy of lm_head, e.g. 4-bit beside an 8-bit backbone). On one Mac the loader loads it beside lm_head and the MTP drafts project through it; lm_head still produces every verified token, so replies are unchanged. Without the tensor nothing changes. 8-bit GLM-5.3-Flash with the 4-bit MTP layer and head, 6 bench prompts: 12/12 replies equal to the 8-bit alone; greedy 53.0 -> 53.2-53.5 tok/s, sampled 48.4 -> 50.1-50.3, 3.5 GB less memory.
… the completed prefix A warm pass ran to the end of the prompt instead of stepping aside when foreground work arrived: the loop checked cancellation but never the yield hook its background passes wire. The pass now keeps its completed prefix and returns error.Yielded at the boundary; the next pass resumes the kept mark.
A planned store kept a warm end off the grid, and under a one-snapshot budget the unusable end evicted the usable mark: the next request resumed at zero. The rules now set warm_usable, and the one-snapshot regression stays.
…prose Tool-call openers quoted inside Markdown inline code spans (`...`) or fenced code blocks (```...``` or ~~~...~~~) in generated assistant prose were treated as live call openers. Quoted `<tool_call>` tags paired with a following real call's `</tool_call>` and rejected it, quoted `<tool_call>NAME<arg_key>...` fragments naming an offered tool streamed bogus arguments, and complete quoted calls inside prose or code blocks executed as tool calls. Add a linear-time Markdown code-span and fence scanner (reply_code.zig) and wire it into whole parsing (tool_parse.zig), streaming call deltas (tool_stream.zig), single-call prose filtering (tool_policy.zig), prose hiding and thinking-tail lifting (reply_text.zig, reply_tool_tail.zig), LFM2 rewrites (tool_lfm2.zig), logprob ranges (logprob_parts.zig), and EOS call closing (chat_generation.zig). While streaming, an inline backtick span containing a tool opener waits until a matching closer confirms code or a paragraph break or end proves it literal. zig build test-tool-parse-host test-tool-visibility-http-host test-thinking-tail-host, zig build test test-golden dev-tools -Dcpu=apple_m1, zig fmt --check build.zig zig, and python3 tools/pr_check.py --base origin/main pass.
… a 4096-row-multiple end The Qwen3.5 CUDA family declared no warm pass, so the server never ran one for it. Both entry points now declare `warm_quiet` (150 ms) and `warm_usable`, `cuda_snaps.cacheRules` reads a family's `warm_usable`, and a CUDA host takes the family's own wait instead of Nemotron's. What the pass keeps is the narrow part: a request's chunk starts never reach its own end, and this family's grid is 4096 rows, so the end survives only when the prompt is an exact multiple of it. A turn under 4096 rows keeps nothing and is cancelled before it runs; a 5000-row turn keeps its 4096 mark but not its end. `prefillFn`'s whole text pass is fixed on main (ashhart#2838); this branch carries the enablement only, and ashhart#2873's foreground yield goes first. Host tests: the declarations on both entry points, and a family's warm rules and its own wait. Refs ashhart#2812
Share the existing chat chunk-start expression through Plan.request. A warm pass computes its own system prefix and uses that same plan, so request-starts caching does not skip the system cut on the background path. The host regression compares warm-prefix and later-request cuts with a 600-token system prefix. Skipping the cut fails the test; preserving it gives the same starts below the warm end. Refs ashhart#2812
…ack, the model's repetition past about 300K, and omp's replayReasoningContent
The lane host tests run hand-picked orders; their seeds pick samples, not schedules. test-lane-explore-host wraps the fake target and, before each prompt call, prompt step, batched pass, first draw, one-token step and verified round, lets a seed pick the next arrival, a cancel, the backend's room for live lanes or the memory pressure the host reads. The seed also picks the setup: lanes, requests, a draft head or none, pipelined or verified one-token rounds, early or late speculation, batched or per-stream head drafts, sampled or greedy requests, and for chunked prompts the chunk count and the prompt-row budget. After each schedule every request has finished exactly once with no event after it, ended `length` with all its tokens or `cancelled` only when cancelled, and its tokens are a solo run's (or their prefix); no reply passes max_tokens, the backend never holds more lanes than the host, prompt steps beside a decoder stop at the row budget, a stream's chunks run in order, and no lane or stream is left. A third test replays 16 seeds of each scenario and compares a digest of every yield point's act and every reply. A failure prints its seed and `zig build test-lane-explore-host -Dexplore-seed=S` replays it; -Dexplore-seeds=N sets the sweep (default 200 a scenario) and -Dexplore-tally=true prints what the schedules did. The test binary runs in about 2 s. A planted skipped release on cancel and a removed budget stop each fail at a printed seed that replays. No engine code changes. The nightly Linux host list runs the step.
…ords (value change) Both target loaders (load.zig: load and loadGptq) and the DFlash2 drafter (drafter.zig, Drafter.init) take their inverse frequencies from xpu/rope_table.zig: rope_freq.inverseFrequencies(1e7, 64) for the target's 32 words (attn_prep: 64 rotated dims of 256), (1e7, 128) for the drafter's 64 (dprep: full 128-dim heads). Every word that moves moves by exactly 1 ulp. Target, theta 1e7 over 64: 15 of 32 differ; largest |old - new| 2.980e-8 (word 2), largest relative 1.181e-7. word 2 0x3ebaf81a -> 0x3ebaf81b word 16 0x39a5cb5f -> 0x39a5cb60 word 22 0x37812dac -> 0x37812dab word 3 0x3e61f836 -> 0x3e61f835 word 18 0x38f22ce3 -> 0x38f22ce2 word 26 0x3609cf4b -> 0x3609cf4a word 5 0x3da50957 -> 0x3da50956 word 19 0x3892587f -> 0x3892587e word 28 0x35494c56 -> 0x35494c57 word 7 0x3cf11176 -> 0x3cf11177 word 20 0x3830df51 -> 0x3830df52 word 29 0x34f3499c -> 0x34f3499d word 10 0x3bd4ca14 -> 0x3bd4ca15 word 21 0x37d5c442 -> 0x37d5c441 word 13 0x3abbd3ec -> 0x3abbd3ed Drafter, theta 1e7 over 128: 18 of 64 differ; largest |old - new| 2.980e-8 (word 4), largest relative 1.181e-7. Even words 2j equal the target's word j, old and new, so 15 are the target's above at twice the index: 4 6 10 14 20 26 32 36 38 40 42 44 52 56 58. Three odd words also move: word 25 0x3af19f03 -> 0x3af19f02 word 35 0x391bc44d -> 0x391bc44e word 39 0x3863872d -> 0x3863872c Why the words differ: - Formula order: the loaders computed f32(1e7^(-i / 32)), a negative exponent with no reciprocal; transformers and rope_freq compute 1 / 1e7^(2i / d). - Precision: both old forms kept everything in f64 and rounded to fp32 once (the drafter's f32(1 / 1e7^(2i / 128)) took its reciprocal in f64). transformers rounds 1e7^e to fp32, then takes an fp32 reciprocal: two roundings. Every moved word is a case where those two roundings land 1 ulp from the single one. On all 18 moved words the old word is the nearer one to the exact 1e7^(-2i / d) (checked in 60-digit decimal). So this is a move to transformers' bits, not an accuracy fix. - Theta and exponent handling contribute nothing: 1e7 is exact in fp32 and f64, and 2i / 64 and 2i / 128 are exact in both, so old and new raise the same base to the same exponent. Test (zig build test, through the XPU host tests): rope_table.zig prints the old and new tables side by side with each table's largest absolute and relative difference. The replaced expressions live only in the tests, as references. The target's words are pinned to the transformers 5.22.1 literals that rope_freq's own test holds for 1e7/64. The drafter's are pinned to new 1e7/128 literals, each step correctly rounded in 60-digit decimal; their even words are the 1e7/64 transformers words, and their odd words are not yet checked against torch. The tests also assert exactly the moved indices and at most 1 ulp. Not run on an XPU. Before landing it needs a token A/B of old and new xpu-qwen27 builds on the same ids, and drafted == serial on the new build (XPU_VERIFY_TEST, XPU_DRAFTER with XPU_TREE=15, XPU_MULTI_TEST). Refs ashhart#1852.
xpu/rope_table.zig's two tests (the target's and the drafter's words against their old expressions) ran only under the aggregate test step. test-rope-xpu-host runs them alone, without devices or ocloc; the aggregate step still depends on them. Refs ashhart#1852.
xgrammar's compile grows with the square of the grammar's text and the server holds one lock across it. A grammar over 512 KiB now gets HTTP 400 before the compiler sees it.
…al of their own A sent grammar is checked where it is read, before compiling. A tool grammar is measured as the grammar for one call, which holds each tool's name and schema once, so the repeat a parallel-call grammar adds no longer refuses tools under the limit (300 KiB of required tools is served); names and many small tools still count. Its 400 names tools. The docs say a JSON schema or a choice list is measured as the server re-serializes it.
…eam-main # Conflicts: # zig/build/h3_host.zig # zig/build/metal_targets.zig # zig/src/families/h3/h3.zig # zig/src/families/h3/read_ahead.zig # zig/src/families/h3/tensors.zig
…s a width (upstream 9e52d73)
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.