Repository navigation
h3: MiniMax-H3-Image's transformer on Metal from a picture case (tf-h3-image) - #2766
Conversation
|
/atc exchange 20b854dd7a0171c6ba275e0b8acf4153cbadb38f9dd55f2e4085056d055beccd |
|
Rebased onto today's main (head On the new head, What's left before this lands is the three device cells in the description: cases A, B and C on an M5, gated against reference cases exported on a GB10. They need the model weights, which we haven't downloaded yet.
|
3b73752 to
0109d9b
Compare
|
/atc exchange b8cf2b3af2f02659faba26805a811de44a933a6da1a6f3c9fe617f66157e669b |
89c65f2 to
e2fb21d
Compare
…mage A case without audio's input projection is read as a picture's: it may carry no audio tensor and no audio rows, and the forward dispatches no audio projection. A clip's case is read and run as before.
MiniMax-H3-Image's distilled checkpoint replaces the output layer with a head per sampling step. A picture's case may hold them as video_out [steps, width, hidden] and [steps, width]; step i reads head i, and a run with another step count is refused. A clip's case keeps its one head.
…3-image) picture.zig holds the picture's rules on the host: the canvas a size is drawn on, the distilled schedule from pdd_config.json through float32 timesteps, plain Euler, each row's centred 3D position and the rotary table from rope.inv_freq, the latent's 2 x 2 packing, the dense tile map, and the model folder's checks. tf-h3-image builds the transformer's case from a picture case and runs the six steps, each first on the reference's own input and gated, then from the noise.
e2fb21d to
e8fc221
Compare
What this changes
Before: the H3 tools ran clips only. A case without audio was refused (
MissingTensor, orH3EmptyMediafor zero audio rows), and every step shared one output head. After: the H3 case reader also admits a picture's case for MiniMax-H3-Image. A picture's case carries no audio tensor and no audio rows, and may hold an output head per step. A new tool,tf-h3-image, runs MiniMax-H3-Image's transformer on Metal from a picture case. It makes the canvas, the distilled schedule, each row's 3D position and rotary table, the dense tile map and the AdaLN tables natively. It then runs the six steps, each first on the reference's own input (teacher-forced) and gated, then from the noise. A clip's case is read and run as before: the same tensors, the same dispatches and the same errors.docs/recipes/minimax-h3-image-metal.mdand under Receipt below. The behaviour was adapted clean-room:efecc3717c) and SGLang's merged support, and wrote a behavioural spec in prose.copy_scanagainst hashes of every upstream file read finds no run of 12 or more tokens, in the whole diff or in any new file.14dea6c6ad).atc overlap --json: the snapshot reports itself incomplete (its PR and file limits). 9 pull requests are clean, the rest untested, and none conflicts. No open pull request toucheszig/src/families/h3/,zig/build/h3_host.zigor the H3 recipe. Of the 36 open pull requests that editzig/build/metal_targets.zig, each head merges with this branch exactly as it merges with main: 7 clean, and 29 that already conflict with main.Checks on this head
9692b83d53on main14dea6c6ad.python3 tools/zig/lean_check.py, on the base and on this head: 386 on the base and 386 on this head, 0 new.tools/pr_check.py: 0 errors. Its one advisory warning is the Unreleased line, which is in the lead's lines file for this PR.zig build test-h3-geometry test-h3-modulation-bf16 compile-h3-host --summary all: 57 passed, 0 failed, 0 skipped. That is 56 H3 host tests (21 of them new) plus the modulation rounding test.geometry.zig, withMissingTensorandH3EmptyMedia. The other new tests exercise functions main does not have.video_out.weight. Clips now keepH3BadTensorShape; only a picture's case reads rank 3 as step heads.zig build compile-h3-library: builds.zig fmt --checkon the changed Zig andgit diff --check: clean.tf-h3-imageon a device. It needs an M5's tensor units, astf-h3-ditdoes, and the Mac these checks ran on has no Metal compiler: main'stf-h3-ditbuild fails there the same way.Receipt
tf-h3-image. The H3 clip tool is unchanged.9692b83d53, Zig 0.17.0, host checks on an M3 Ultra under macOS.MiniMaxAI/MiniMax-H3-Imageconfigs and headers at492fd8c4ec:transformer/, the pdd files andmodel_index.jsonare unchanged from6534ea1c97.Gates, fixed before any run (
picture.gates;tf-h3-imageexits 1 on a failure and 2 when the case has no reference to gate against):Device cells owed:
tf-h3-imagebuilt and run on an M5, case A: 2048x2048 text to image, seed 42, the release request's prompt.The cases come from a reference exporter outside the tree, running SGLang's exact path on one GB10. That needs
transformer/,vae/and the text encoder there (about 136 GB). The M5 needstransformer/and the pdd files (about 66 GB).Checklist
The inference checklist does not apply:
tf-h3-imageis a denoiser tool beside the engine, and no token path changes.