Views
No views yet
| Group | Params | Precision |
|---|---|---|
transformer_blocks.*.attn.to_{q,k,v}, attn.to_out.0, ff.net.0.proj, ff.net.2 | 19.27 B (300 layers) | INT4, group 128, symmetric |
transformer_blocks.*.adaln_proj.linear | 13.01 B (50 layers) | BF16 |
proj_in, proj_out, audio_proj_in, audio_proj_out, context_embedder, time_embedder, token_refiner.*, norm_out.linear | ~0.7 B | BF16 |
adaln_proj is deliberately left alone, and it is the reason the file is 37.76 GB and
not ~12 GB. It is 13.0 B of the model's 33.1 B parameters, and quantizing it is a bad
trade: its input is the timestep embedding, whose row count is
num_timesteps * MODALITY_NUM rather than the token count, so it costs almost nothing
to compute no matter the precision. Meanwhile the diffusers implementation notes that a
rounding applied before its SiLU biases every block's modulation parameters identically
at every sampling step, so the error accumulates coherently along the denoising
trajectory instead of averaging out.iters=0, disable_opt_rtn=True, so no
calibration data was used at all and quality is round-to-nearest, comparable to a
GGUF Q4_K_M produced without an importance matrix. A calibrated run needs
calibration inputs for a DiT (hidden_states, temb, adaln_indices, rotary_emb),
which AutoRound's diffusion driver cannot produce for H3 today: it detects diffusion
models by model_index.json and H3 ships modular_model_index.json, and its loader
goes through AutoPipelineForText2Image, which has no H3 mapping.1import torch
2from diffusers import AutoRoundConfig, MiniMaxH3Transformer3DModel, ModularPipeline
3
4transformer = MiniMaxH3Transformer3DModel.from_pretrained(
5 "Ar4ikov/MiniMax-H3-transformer-W4A16-RTN",
6 quantization_config=AutoRoundConfig(backend="auto"),
7 dtype=torch.bfloat16,
8)
9
10pipe = ModularPipeline.from_pretrained("MiniMaxAI/MiniMax-H3")
11pipe.update_components(transformer=transformer)
12pipe.load_components(dtype=torch.bfloat16)pip install "git+https://github.com/huggingface/diffusers.git@refs/pull/14355/head"
pip install "auto-round>=0.13.0"gptqmodel>=5.8.0 and pass
AutoRoundConfig(backend="marlin").1from auto_round import AutoRound
2
3# layer_config maps every Linear outside the 6 targeted leaves of each block
4# (and every adaln_proj.linear) to {"bits": 16, "act_bits": 16}
5ar = AutoRound(
6 model=transformer, # MiniMaxH3Transformer3DModel, bf16
7 scheme="W4A16",
8 group_size=128,
9 sym=True,
10 layer_config=layer_config,
11 to_quant_block_names="transformer_blocks",
12 low_gpu_mem_usage=True,
13 batch_size=1,
14 iters=0,
15 disable_opt_rtn=True,
16)
17ar.quantize_and_save(out_dir, format="auto_round", inplace=True)quantize_and_save raises AttributeError: 'FrozenDict' object has no attribute 'save_pretrained' at the very end on this path: AutoRound's LLM export calls
model.config.save_pretrained(...), which a diffusers config does not implement, and its
diffusion export path is not reached because H3 is not detected as a diffusion model. The
shards are already written when this happens; config.json, quantization_config.json
and the diffusers shard names were written afterwards, with the layer lists in
extra_config read back from the tensors actually present in the shards.auto_round 0.14.2, diffusers 0.40.0.dev0 (PR 14355), torch 2.11.0+cu128.LICENSE. NOTICE states
which files were modified and how, as the license requires. Anyone receiving these
weights receives them under that same agreement.LICENSE rather than taking this paragraph as a summary of it.