Archived
minimaxh3: adaln_t_table curve-form checkpoints + an R4D_DIT_SEL step dump
The DaSiWa overlay ships its modulation curve as a precomputed table (adaln_t_table [1025,8]): timestep_embed gains a curve mode -- y[m] = the table linearly sampled at the timestep, no sinusoid, no MLP -- in the HIP, AVX and ref tiers, and the arch drives the four timestep rows (video, audio, and each re-embedded with its reference pin) through it with the ada projections as plain bf16 K=8 lines. The dasiwa-w8a8 recipe carries the overlay. Device-verified at 512: T2VA, I2VA and FL2VA complete clean and the T2VA re-run is bit-identical; the fried look PERSISTS on the exact finetune the reference clips rendered from, which kills the checkpoint-style theory and pins the fork to Radiance's forward. For the value-parity localisation: R4D_DIT_SEL (env, driver and plugin) declares f32 PERSIST shadows of the stream entering block 0, the timestep table and the step-0 modulation, and the driver reads those plus the velocity head back on a plain request's step 0 into R4D_ENC_DUMPDIR, for the CPU reference DiT replay to diff against. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
3a7a79fb47
commit
cfbccb46dc
16 files changed
+631
-92
No files matched your search
@@ -0,0 +1,69 @@
|
||||
# minimax-h3-dasiwa-w8a8.recipe -- the DaSiWa curve-form finetune, DiT linears at int8 (W8A8).
|
||||
#
|
||||
# minimax-h3-w8a8.recipe with its one modulation rule dropped. A curve-form checkpoint
|
||||
# (config's adaln_curve_grid set) replaces the timestep sinusoid + MLP with the shipped
|
||||
# adaln_t_table, and every modulation projection becomes a K=8 read of that table: an
|
||||
# 8-column GEMM has nothing for a 128x128 E4M3 block to bite on, so the plugin declares
|
||||
# the ada weights plain bf16 (arch/minimaxh3/minimaxh3.cpp, declare_tables' curve branch)
|
||||
# and they must store as the checkpoint holds them. That is the ONLY rule difference --
|
||||
# the four per-token DiT linears stay symmetric int8 on a per-row 128-column grid, the
|
||||
# text encoder and token refiner stay E4M3, and what is read once a step stays f32 or
|
||||
# bf16, exactly as in minimax-h3-w8a8.recipe. Serve with the W8A8 DiT path.
|
||||
#
|
||||
# rad-convert <pipeline directory whose transformer/ is the re-laid finetune> \
|
||||
# --recipe data/recipes/minimax-h3-dasiwa-w8a8.recipe -o minimax-h3-dasiwa-w8a8.rad
|
||||
#
|
||||
# From a container of the base model nothing but the DiT changes, so reuse the rest:
|
||||
#
|
||||
# rad-convert <that directory> --recipe data/recipes/minimax-h3-dasiwa-w8a8.recipe \
|
||||
# --reuse <minimax-h3-ref2va-uncensored-w8a8.rad> \
|
||||
# --changed <every transformer. tensor name, one a line> \
|
||||
# -o minimax-h3-dasiwa-w8a8.rad
|
||||
#
|
||||
# The finetune itself is a ComfyUI-format convrot-int8 single file; convert-ref2va/
|
||||
# overlay-dasiwa.py dequantises it to the HF names and dtypes this recipe and the plugin
|
||||
# expect, writes config.json with the two curve meta keys, and emits the --changed list.
|
||||
# The directory otherwise needs the usual text-to-video-and-audio components:
|
||||
# text_encoder/, vae/, audio_vae/, the processor or tokenizer, both scheduler folders and
|
||||
# latent_upscaler/ -- transformer_ref/ and the original-layout FL2VA/ and Ref2VA/ are not
|
||||
# read.
|
||||
te.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.attn_norm.weight cast dtype=f32
|
||||
te.blk.*.ffn_norm.weight cast dtype=f32
|
||||
ref.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
ref.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
ref.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
ref.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.attn_qkv.weight rtn codes=i8 group=128 scale=bf16 clamp=sym
|
||||
dit.blk.*.attn_output.weight rtn codes=i8 group=128 scale=bf16 clamp=sym
|
||||
dit.blk.*.ffn_gate_up.weight rtn codes=i8 group=128 scale=bf16 clamp=sym
|
||||
dit.blk.*.ffn_down.weight rtn codes=i8 group=128 scale=bf16 clamp=sym
|
||||
vae.blk.*.attn_qkv.weight cast dtype=bf16
|
||||
vae.blk.*.attn_out.weight cast dtype=bf16
|
||||
vae.blk.*.ffn_up.weight cast dtype=bf16
|
||||
vae.blk.*.ffn_down.weight cast dtype=bf16
|
||||
vae.proj_out.* cast dtype=bf16
|
||||
aud.*.weight cast dtype=f32
|
||||
# The audio encoder's strided downsamplers and its attention/MLP pre-block run in a bf16 island
|
||||
# inside the f32 chain (arch/minimaxh3/minimaxh3.cpp, declare_aenc): conv1d, layernorm and gemm
|
||||
# pin every operand to one dtype, so their weights cast; the chain's own f32 weights are stored
|
||||
# folded from the checkpoint's weight-norm pairs.
|
||||
aenc.d*.w cast dtype=bf16
|
||||
aenc.d*.b cast dtype=bf16
|
||||
aenc.pb.* cast dtype=bf16
|
||||
aenc.b*.u*.c1.weight cast dtype=f32
|
||||
aenc.b*.u*.c2.weight cast dtype=f32
|
||||
aenc.cin.weight cast dtype=f32
|
||||
aenc.fin.weight cast dtype=f32
|
||||
# The video encoder: the implicit-GEMM kernel stores its 3x3x3 weights bf16 tap-major, so those
|
||||
# four name classes cast; conv_in (3 input channels) and the k=1 shortcut/quant convs run on the
|
||||
# reference kernel with their f32 weights as they are, and the norms and biases need no rule.
|
||||
venc.l*.b*.c1w cast dtype=bf16
|
||||
venc.l*.b*.c2w cast dtype=bf16
|
||||
venc.l*.dnw cast dtype=bf16
|
||||
venc.cout.weight cast dtype=bf16
|
||||
ups.embed.* cast dtype=f32
|
||||
ups.*.emb_layers.* cast dtype=f32
|
||||
Reference in new issue
Block a user