Skip to content

train 1115012352: #2074 #3125 #3273 (CI only) - #3398

Closed
ashhart wants to merge 9 commits into
mainfrom
lead/train-1115012352
Closed

ashhart wants to merge 9 commits into
mainfrom
lead/train-1115012352

Conversation

@ashhart

@ashhart ashhart commented Nov 15, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #2074 #3125 #3273 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

BobClawblaw and others added 9 commits November 15, 2026 01:23
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 #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 #2923
@ashhart

ashhart commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Landed: #2074 #3125 #3273 as main 41a72fd. This PR only carried their CI.

@ashhart ashhart closed this Nov 15, 2026
@ashhart
ashhart deleted the lead/train-1115012352 branch November 15, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants