Repository navigation
Conversation
…de the engine A video model's denoising transformer on the M5 tensor units: no lane round, and int8 projections and tile-routed int8 attention. zig build tf-h3-dit runs every denoising forward for a case file; the lane core and the server are untouched. The recipe holds the receipt: 5.33 s a forward at 864x480 on an M5 Ultra, first-forward video cosine 0.9606 against the Python float reference.
Owner
|
Thank you for the Mac half too. The same answer as #585 applies here, so I'll close this one as well. One note from your receipt: the 39 failing steps were |
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.
Thank you, Ash, for TensorFold and for the Metal runtime this builds on. This is the Mac half of the work whose CUDA half is #585, kept apart so each pull request is one change. The same plain statement applies here.
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
zig build tf-h3-dit -Dcpu=apple_m1 -Doptimize=ReleaseFastbuilds a tool that runs every denoising forward of MiniMax H3 / FastH3 for the packed [text | keyframe | audio | video] rows on the M5's tensor units.zig/kernels/metal/h3/h3_products.metal: rows to int8 and the int8 projection forms (plain, group-scaled, SwiGLU).zig/kernels/metal/h3/h3_rows.metal: modulated RMSNorm to int8, head layout with rotary, pooling, tile scores, top-k, the pooled branch, gate mix, the final norm and heads.zig/kernels/metal/h3/h3_attention.metal: tile-routed int8 attention with an online softmax, with half or 8-bit weights.zig/src/families/h3/h3.zig(the forward) andtensors.zig(safetensors mapped for Metal, the checkpoint's shards by name).zig/tests/h3_dit.zigand thetf-h3-ditstep inbuild.zig.docs/recipes/minimax-h3-metal.md: the receipt and the case file's layout.Receipt
Mac Studio (Apple M5 Ultra, 256 GB, macOS 27.0.1, Zig 0.17.0), checkpoint
FastVideo/FastVideo-FastH3-8-Step-V2, 864x480, 124 frames, 8 steps, measured 2026-10-10.The video figure is far from the reference, and I do not want that to pass unnoticed: it includes int8 rounding of weights, activations and attention against a float reference with FastVideo's reference routing. Clips made with it have been judged by eye and ear, not by a metric.
This code was split out of the engine on the fork (branch
h3-1.0.4) to stand without the Qwen-Image family it used to borrow kernels from. On both cases the final video and audio rows are bit-identical to that engine's.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 tf-h3-diton an M5 Ultrazig build test -Dcpu=apple_m1on that Macxcrun: unable to find utility "metal". A cleanmain(4ebf52a) gives the identical summary on the same machine, so those failures are the machine's toolchain, not this change. I have not run it on a machine where the suite is green.The Mac build and runs above were done on the commit before the recipe file was added; the code is the same.
Not done, and not claimed
It is used today by keys-TensorFold Studio on Apple silicon.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CPyz4HarJ7ZubrPWPjtSdX