Repository navigation
fix(hip): keep the shared rows' token stride coprime to the vocabulary's span - #2661
Conversation
|
@AbrahamCete, thank you, and I'm sorry: that was our landing tool's fault, not yours. It stacked #2652 at 06:32, and at landing it put back that stacked branch without checking for your 06:48 push. These two commits are what we asked for. The stride is always coprime to the span (two primes whose product passes every span, so at most one divides it), |
…y's span 7919 gave distinct ids only when it did not divide min(vocab, 65536) - 1; a vocabulary of 15839 ids gave two. Where 7919 divides the span the stride is now 7927, the next prime. Their product passes every span, so at most one divides it and the stride is always coprime. A served vocabulary's span of 65535 keeps 7919, so its timed table does not change.
…in one helper Rig.time passed fillTokens the window count by hand, and no test saw that call. fillRound now fills a round's greedy draws and tokens from the windows' widths and returns its rows; Rig.time only points each window at its rows, and the new host test pins a lone window and a shared round.
099ece3 to
394f4bb
Compare
|
Thank you @AbrahamCete. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
|
Thanks @AbrahamCete! This is in TensorFold 1.2.6, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.6
|
What this changes
These are the two commits from #2652's review that its landing left out (#2652 (comment)). On
main,hip_costs.zigsteps the shared rows' token ids by 7919. That gives distinct ids only when 7919 doesn't dividemin(vocab, 65536) - 1.fix(hip): keep the shared rows' token stride coprime to the vocabulary's span: the stride is 7919, or 7927 where 7919 divides the span. Their product is larger than every span, so at most one of them divides it, and the stride is always coprime.refactor(hip): fill a timed round's tokens and draws from its widths in one helper:fillRoundfills a round's greedy draws and tokens from its windows' widths and returns its rows.Rig.timeno longer passes the window count by hand.A served span of 65535 keeps 7919 (65535 mod 7919 = 2183), so a served vocabulary's timed ids and table stay as #2652 landed them. The table only steers draft depth, so tokens are unchanged.
main1bb0ea2, two commits: 21d747d and 099ece3.atc overlap --json: (2026-11-09 07:56 UTC, onmainf212eea): incomplete (limitationspullFilesUnavailable,timeLimit). No open PR shares a file with this branch, andatc wholists none for either file. The branch merges clean withmainf212eea.Checks on this head
hip_costs.zigandhip_costs_test.zigare byte-identical to fix(hip): time shared rows with a token a row, keep lone windows on one token #2652's last pushed head, 89ea115, where the receipts in the review reply ran.python3 tools/zig/lean_check.py: 398 problems on the base (1bb0ea2) and on this head;lean_new.py: 0 new.zig build test test-golden --summary all: 621/621 steps, 8095 of 8161 passed, 66 skipped.zig build hip-host-test: 68/68.zig build test-qwen35-hip-host: 86 of 88 passed, 2 skipped.zig build check-native-hip-host: 6/6 steps.zig build native-hip: exit 0.hip_costs_test.zigfailed before their change and pass after it:fillRound.fmt,zig,zig-windows,zig-macos-dev-tools,pytest,release-paths,benchmark-clientson Ubuntu and Windows); the two nightly host jobs skip.main's stride-7919 table within 0.5% (the 33-64 row bucket 2.8% lower), measured across two servers (fix(hip): time shared rows with a token a row, keep lone windows on one token #2652 (comment)).Receipt
lw-*).main1bb0ea2 and this head; Zig 0.17.0; hipcc with HIP 7.1.52801 and Ubuntu clang 21.1.8; Ryzen AI Max+ 395 (gfx1151), Linux 7.0;TensorFold/Qwen3.6-35B-A3B-MLX-4bit-MTPat f84b054c5677.tf-qwen35-test check <35B> --only invariants: 51 passed, 0 failed, 1 skipped. The table only steers draft depth.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.--drafter, no slower than without it, greedy and sampled. (A served vocabulary times the same ids asmain.)