Repository navigation
Conversation
…for a host pipeline A video model's denoising transformer: no lane round, and int8 products and attention on mma.sync m16n8k32. It is a library (zig build tf-h3) beside the engine; the lane core and the server are untouched. The recipe holds the receipt: 7.1 s a pass at 864x480 on a GB10 against 10.5 s for the host's bf16 blocks, cosine 0.998 after 50 blocks.
|
The Mac half of this work is now #586 (the same model's transformer on Metal), kept as its own pull request so each is one change. Both add files under |
|
Thank you, @drowzeys, for the careful write-up, and for saying plainly where this sits against the rules. The answer is still no, for the reasons you named. TensorFold is one kind of engine: every token goes through lane rounds and drafted output is checked against plain decoding, and H3 has neither a token stream nor drafts to check. The int8 projections and attention are also a precision trade we don't make anywhere in the engine. Those hold however good the code is, and it is good: nothing in the lane core or the server, host tests, and a receipt with its error measured. It belongs in its own repository on top of the runtime, the way you run it on the fork today. If the fork needs something from the runtime to stay a clean dependency, such as a stable way to share the CUDA context, a small PR for that hook would be welcome. I'll close this one. Thanks again. |
Thank you, Ash, for TensorFold and for the CUDA runtime this builds on. This is offered as a proposal, and I want to be plain about where it sits outside the rules before anything else.
Where it sits outside the rules
If the answer is still no, that is a fine answer; it will keep living on the fork.
What it is
A library,
zig build tf-h3 -Dnvcc=...→libtf_h3.so, that runs the 50 transformer blocks of MiniMax H3 / FastH3 for a host pipeline which owns everything else (text encoder, sampler, patch projections, final layer, decoders) and shares its CUDA context.zig/kernels/cuda/h3_products.cuh: an int8 product onmma.sync m16n8k32(plain, SwiGLU and group-scaled epilogues) and tile-routed int8 attention with an online softmax.zig/kernels/cuda/h3.cu: the row kernels (modulated RMSNorm to int8, head layout with rotary, pooling, top-k routing, gate mix) and the entry points.zig/src/families/h3/:checkpoint.zig(safetensors by name, with host tests),cuda_weights.zig(quantize on the GPU, or read the saved int8 copy),cuda.zig(the forward),cuda_lib.zig(the C entry points).zig/build/cuda.zig: thetf-h3step, which builds only this family's kernel image, and the checkpoint tests intest-cuda-host.docs/recipes/minimax-h3-cuda.md: the receipt.Receipt
One DGX Spark (GB10, compute capability 12.1, CUDA 13.0 toolkit), checkpoint
FastVideo/FastVideo-FastH3-Comfyfastvideo_fasth3_8step_v2_pruned_bf16.safetensors, host ComfyUI ata4b5a045, 124 frames, 8 passes, measured 2026-10-09. The kernels are the ones in this change; the Zig around them was split into smaller files afterwards and renders a bit-identical clip (two seeds).Raw tensor-core rate on the GB10 measured on registers: int8 245 TOPS, bf16 122 TFLOPS; the product kernel reaches 150 to 175 TOPS on these shapes.
Checks run on this branch
zig fmt --checkon the changed Zig filespython3 tools/zig/lean_check.pymain(4ebf52a), 510 with this change: zero addedzig build test-cuda-hostzig build tf-h3on a GB10Not done, and not claimed
tf-cuda-testcommands if that is the gate you want.drowzeys/TensorFold, branchh3-1.0.4) and is not in this change, to keep it to one thing.It is used today by keys-TensorFold Studio on a DGX Spark.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CPyz4HarJ7ZubrPWPjtSdX