Repository navigation
Living Weights on CUDA: a split product adds its slices in a fixed order, so a lesson repeats run to run - #632
Merged
Conversation
…der, so a lesson repeats run to run tf_train_gemm cut K into slices that each added their part into C with atomicAdd, so the adds landed in a different order on every run and every gradient differed in its last bits; ashhart#591's six facts kept Lisbon in one run and took it out in the next. One slice now adds into C as the only writer of its elements. More slices each write their part to the backward's new parts buffer (f32 [split, m, n]: split() keeps slices times 64 x 64 tiles within its 192 blocks, so 3 MiB, counted in Trainer.memory through Bufs.total), and tf_train_gemm_sum adds them into C in slice order. tf-cuda-test train runs each product twice and requires the same bits. On a GB10, each fact taught twice through /v1/slide/learn on a fresh copy of the folder: - "My sister is called Ana." (taken out both times): main's losses differ between the runs (0.529 and 0.526 after the first round); this branch's logs are the same line for line. - "My favorite food is lasagna." (kept both times): main saved different bytes into all four shards; this branch saved the same bytes. The kernels' accuracy (8.42e-7 and 2.40e-6 for the split cases), train-mixers, slide-grad (1.0267 at layer 51) and the step times (223 ms at 26 rows, 490 ms at 87) are unchanged.
Owner
|
Thank you, @ZackSample, for taking the follow-up so quickly. This is merged into main (dfb08ff), your commit as it was, and it ships in 1.0.6. On a GB10 we ran |
Closed
jschmied
pushed a commit
to jschmied/TensorFold
that referenced
this pull request
Oct 11, 2026
…series and PRO 6000 Blackwell, NVFP4 Nemotron 1.0.6 ships what main gathered since 1.0.5 and tonight's landings (the CHANGELOG lists them): structured output and required tool calls on the native server with drafting on, the Qwen3.8-27B serving concurrent requests and drafting sampled ones, sm_120 kernels in the Linux archives, NVIDIA's NVFP4 Nemotron checkpoint on CUDA, Living Weights on a GB10, and the fix for 1.0.5's known issue (GLM pair prose decode). The CHANGELOG heading, build.zig.zon, the README and the RUNBOOK's download lines name 1.0.6; the CHANGELOG credits ashhart#632 and lists the contributor-facing PRs.
jschmied
pushed a commit
to jschmied/TensorFold
that referenced
this pull request
Oct 11, 2026
…ct, and the CHANGELOG The guide explains the pocket (64 neurons beside each shared expert, keyed on the reply or the subject), the /slide 3D view, the GB10's trainer memory, what was measured (personal facts on three machines, short and long documents, time a fact, serving cost) and the startup refusal of folders taught by 1.0.3 to 1.0.5. The README mentions documents and the 3D view. The CHANGELOG's Unreleased entries replace ashhart#591, ashhart#599 and ashhart#632's with the pocket learner, the speed work and the view, crediting them.
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
…lices in a fixed order, so a lesson repeats run to run Thanks @ZackSample.
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
…series and PRO 6000 Blackwell, NVFP4 Nemotron 1.0.6 ships what main gathered since 1.0.5 and tonight's landings (the CHANGELOG lists them): structured output and required tool calls on the native server with drafting on, the Qwen3.8-27B serving concurrent requests and drafting sampled ones, sm_120 kernels in the Linux archives, NVIDIA's NVFP4 Nemotron checkpoint on CUDA, Living Weights on a GB10, and the fix for 1.0.5's known issue (GLM pair prose decode). The CHANGELOG heading, build.zig.zon, the README and the RUNBOOK's download lines name 1.0.6; the CHANGELOG credits ashhart#632 and lists the contributor-facing PRs.
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
…ct, and the CHANGELOG The guide explains the pocket (64 neurons beside each shared expert, keyed on the reply or the subject), the /slide 3D view, the GB10's trainer memory, what was measured (personal facts on three machines, short and long documents, time a fact, serving cost) and the startup refusal of folders taught by 1.0.3 to 1.0.5. The README mentions documents and the 3D view. The CHANGELOG's Unreleased entries replace ashhart#591, ashhart#599 and ashhart#632's with the pocket learner, the speed work and the view, crediting them.
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.
Follow-up 1 from #591: a CUDA lesson now repeats run to run.
What changed
tf_train_gemmadds intoCas the only writer of its elements: a plain add, no atomic.partsregion of the backward's buffers (f32 [split, m, n]), andtf_train_gemm_sumadds them intoCin slice order.split()keeps slices times 64 x 64 tiles within its 192 blocks, sopartsis 3 MiB. It is counted inTrainer.memorythroughBufs.total.tf-cuda-test trainnow runs each product twice and requires the same bits.No
atomicAddis left in the training kernels (train.cu,train_mixers.cu). The expert plan'satomicAddonly counts each expert's members in shared memory, and their places come from a rank, so it was already deterministic.Checks on a GB10 (driver 580.178.04, CUDA 13.0)
tf-cuda-test train: pass with the same accuracy (8.42e-7 and 2.40e-6 for the split cases). Run twice, 0 of 349,440 values differ in any bit.tf-cuda-test train-mixers,slide-grad(1.0267 at layer 51, the same as main) andzig build test: pass. Lean check 542 problems, the same as main.slide-bench, median of 10, two runs each): learn 223 ms at 26 rows and 490 ms at 87 rows on both builds.Each fact taught twice through
/v1/slide/learnon a fresh copy of the folderAfter rebasing onto 6ed796d, which brings #605's grouped experts, the lasagna lesson again saved the same bytes twice, and the same bytes as on 9041e20.
For @zweck: this takes
atomicAddout of the split-K path. It sits on main, which is already green on your card, so this branch should stay green there too. It doesn't apply to 3d9671b as is, becausecuda_train_back.zighas moved since. If you want to try it on the build that fails, I can put the same change on top of 3d9671b.Follow-up 2 (
slide-grad's span rule) is not in this PR.🤖 Generated with Claude Code