Repository navigation
Merge upstream main - #58
Merged
Merged
Conversation
plotarmordev
commented
Nov 15, 2026
Owner
- flash next cuda: a lone stream draws on its own path, not the group's whole-buffer download
- changelog: Unreleased above 1.2.9
- uocr: Unlimited-OCR-2 on native Metal
- changelog: Unlimited-OCR-2 on native Metal under Unreleased
- changelog: Unlimited-OCR-2 on native Metal: the publisher's BF16 release, page images to structured text ashhart/TensorFold#2074's line from lines/2074.txt in place of its own
- changelog: back under Unreleased
- kv pool: a named TF_KV_SHARE's slots come where an asked cache goes
- docs: the memory plan sets a named TF_KV_SHARE's slots where a named cache goes
- changelog: kv pool: a named TF_KV_SHARE's slots come where an asked cache goes ashhart/TensorFold#3125 under Unreleased
- changelog: back under Unreleased
- changelog: kv pool: a named TF_KV_SHARE's slots come where an asked cache goes ashhart/TensorFold#3125 under Unreleased
- feat(hip): a tuning row can bound the width of the codes it takes
- perf(hip): on gfx1151 a plain prompt of 1 or 2 rows takes the 2-row K-parallel tile
- changelog: perf(hip): on gfx1151 a plain prompt of 1 or 2 rows takes the 2-row K-parallel tile ashhart/TensorFold#3273 under Unreleased
… whole-buffer download On the 1.2.9 release commit, one sampled stream of Flash Next (MLX 4-bit checkpoint, chat, temperature 1.0) decoded about 10% slower than 1.2.8 on a GB10: 48.7, 46.1 and 48.8 tok/s against 43.9, 44.3 and 42.2, alternating runs; the other sweep cells were level or faster. ashhart#2927's group path runs a top-k launch and a synchronous download of the whole batch buffer every draw step, which one stream cannot amortise. A lone stream now takes the per-stream draw it had before ashhart#2927; two or more streams keep the group draw. Tokens are unchanged either way: both paths draw the same rows, and the batch tests compare them.
baidu/Unlimited-OCR-2 at its released bf16 weights on M5-class GPUs: the publisher's preprocessing (bit-exact), the SAM and CLIP image encoder, the DASH MoE decoder with greedy generation, chunked prefill (bit-identical at any cut), serving through tensorfold-native --vision with the family's chat template, and every kernel under the contract. The SAM encoder, the decoder's attention, its page2d rotary and its MoE gate are written from the papers and from the release's modules measured through their inputs and outputs. tf-uocr-blocks gates each encoder step alone against float32, tf-uocr-vision and tf-uocr-decode gate a page's stages, and tools/zig/uocr_reference.py makes their cases from the release's own code. Fed torch bf16's reply, tf-uocr-decode accepts a departure only as a tie: the same two contenders on both sides, each margin within one bf16 step (the reference records every step's two highest logits); --reply-reported reports them instead. The server's built-in templates share one helper (hf_text_parse.zig): Nemotron Parse's replaces the checkpoint's, this family's fills in when the checkpoint ships none, and a --chat-template wins over both.
Under slots_only without --prompt-cache-gib, plan sets aside the slots that fit past the engine's own window and each other stream's fixed part and page, TF_KV_SHARE at most, before windows and held count the rest. The rest of the default cache still becomes pages after the windows. Plans that already kept all n are unchanged, so is every plan without slots_only or with an asked cache. GLM's advice under 4 states a stream names TF_KV_SHARE alone where its slots now fit, and --prompt-cache-gib only beside a named cache too small for them.
A row said which products its entry takes by rows, items and pairs, and nothing about the weights' width. Timings on gfx1151 show a choice that turns with it: of the two K-parallel tiles a plain prompt of 1 row can run on, one is ahead on 2-bit and 3-bit codes and the other from 4-bit up. `max_bits` is the most bits a weight code holds for the row to take a product (0, the default: any). The registry's cost check refuses wider codes for plain products and plans alike. A bound that does not parse refuses its row instead of being ignored: - a bound that is no code width (2, 3, 4, 5, 6 or 8) stops the build of the table that writes it, naming the entry and the bound, where 7 or 9 would have read as "up to 6" or "any"; a row made by hand with such a bound takes no product. The registry and the kernel cases read the widths from one list, beside the row type; - `tuning.build` copies an entry's fields by name and dropped the ones the row type lacks, so a misspelled bound left its row taking every product. Such a field now stops the build, naming the entry and the field. Every field the four tables carry is the row type's. `hip-affine-tune` prints the bound with a row it proposes. No table sets the bound yet, so no choice changes. Refs ashhart#2923
…-parallel tile A plain prompt product of 1 or 2 rows ran on `kp0` (8 columns a lane set, 1 row a pass) on every card. On gfx1151 `kp3` (4 columns, 2 rows a pass) is ahead at 2 rows at every width, and at 1 row from 4-bit codes up; at 1 row of 2-bit or 3-bit codes `kp0` stays ahead. A resumed prompt ends in such a piece whenever 1 or 2 tokens follow the kept state. gfx1151's table now gives `kp0` one row of codes of at most 3 bits and `kp3` the other plain products of up to 2 rows. Costs stay as they were, so `kp0` keeps the products its row still takes and no row is shadowed. Nothing else is chosen differently: products of 3 rows and more, routed plans, decode and the other three tables keep their tiles. Both tiles are one template and write the 128-row tile's bytes. Tests: - launches: at every width gfx1151 picks `kp3` at 2 rows and, at 1 row, `kp0` for 2-bit and 3-bit codes and `kp3` from 4-bit up, with the matrix cores on or off; it keeps `kp1` and `kp2` past 2 rows and the reference tile with the dot2 GEMM tiles off; gfx1030, gfx1100 and gfx1201 still pick `kp0`. - tuning: gfx1151's bound is set, so a table that lost it fails. - kernel suite: `kp0`, `kp3` and the 128-row dot2 tile, launched by id whatever the card's table picks, write the same bytes at 1 and 2 rows, every width and group, fp32 and rounded into out16; an output left unwritten fails too. Refs ashhart#2923
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.