# 🇨🇳 MiniMax-H3-Rung-Omega (`5.976 BPW`, `14.98 GiB` Joint-tANS / `16.22 GiB` Raw Base-243) + TheoremFlow-Ω (`8.92x` 推理加速引擎)

🌐 Language / 언어 / 语言 / 言語:   🇺🇸 English  |  🇰🇷 한국어  |  🇨🇳 中文 (简体)  |  🇯🇵 日本語

Buy Me A Coffee KakaoPay QR NH농협 352-1556-0640-33 (윤여원) Community Discussions

KakaoPay QR Transfer (윤여원)

🏦 국내 계좌이체 후원 (Korean Bank Transfer): NH농협(농축협) 352-1556-0640-33 (예금주: 윤여원)  |  💛 카카오페이 QR 송금  |  ☕ Buy Me a Coffee

> ☕ **支持开源量化与推理加速研究**:**`MiniMax-H3-Rung-Omega`** 权重与 **`TheoremFlow-Ω`** 推理加速引擎完全开源公开(无需申请审批即可直接下载使用)。如果本项目帮您节省了 GPU 显存与视频生成时间,欢迎通过 [**Buy Me a Coffee (`buymeacoffee.com/tripleyoung`)**](https://buymeacoffee.com/tripleyoung) 请我们喝杯咖啡! **`yeowon/MiniMax-H3-Rung-Omega`** 提供针对 **MiniMax-H3 FL2VA (首尾帧生视频+音频,总参数 33.1B / 激活参数 20.11B)** 多模态 Diffusion Transformer 的 **50-Block 纯 `Rung Ω` 平衡三进制 (`4-Trit`, Base-243 5-in-4-byte) 量化权重** 以及 **`TheoremFlow-Ω` 数学下界推理加速引擎 (`8.92x` 端到端加速)**。 * **零回退 (`200 / 200` 线性层全部采用纯 `TensorCoreRungOmegaTernaryLayout`)**:全部 50 个 DiT 模块 (`blocks.0` .. `blocks.49`) 中的 200 个线性投影层 (`attn.qkv_proj`, `attn.out_proj`, `mlp.fc1`, `mlp.fc2`) 均采用 `Rung Ω` 4-Trit 平衡三进制格 (`[-40, +40]`,`group_size=128` FP16 缩放因子与 `convrot_groupsize=256` 正交 Hadamard 旋转),**0 层回退至 NVFP4**。 * **比官方排名第一的推荐量化版 `int8_convrot` (`19.53 GiB`) 更小且精度更高 (`14.98 GiB` Joint-tANS / `16.22 GiB` Raw)**:相比 `BF16` 教师模型 (`37.46 GiB`) 实现 **`2.50x` 压缩**,相比 `int8_convrot` (`19.53 GiB`) 节省 **`4.57 GiB` (`1.30x` 压缩)**,同时在 **Video Spatial Top-1 (`+5.20%p`)** 与 **Audio Patch Top-1 (`+4.17%p`)** 速度场一致性上超越 `int8_convrot`。 * **`TheoremFlow-Ω` (`8.92x` 端到端采样加速)**:将 20 步视频 (`864×480`, `124` 帧 @ 24fps) + 立体声音频 (`32kHz`) 联合生成时间从 **`625.4 秒` 缩短至 `70.11 秒` (`8.92 倍` 加速)**,同时保持 **`99.58%` 视频潜空间余弦相似度 (`20.80 dB` SNR)** 与清晰的多语言(中文、韩语、英语、日语)语音同步。 --- ## 🎬 生成演示 (由纯 50-Block `Rung Ω` + `TheoremFlow-Ω` 在 `70.11s` 内生成) ![Keyframes Preview](./assets/MiniMax_H3_TheoremFlow_Omega_Champion_keyframes.png) ### 🎬 Side-by-Side Audio & Video Comparison: Official int8_convrot (19.53 GiB, 434.1s) vs Ours Rung-Omega + TheoremFlow-Omega (14.96 GiB, 70.1s — Turn Sound ON 🔊)

* **完整视频 + 同步语音演示 (`.mp4`)**: [`assets/MiniMax_H3_TheoremFlow_Omega_Champion.mp4`](./assets/MiniMax_H3_TheoremFlow_Omega_Champion.mp4) * **纯 50-Block 20 步基准视频 (`.mp4`)**: [`assets/MiniMax_H3_Rung_Omega_50blk_Champion.mp4`](./assets/MiniMax_H3_Rung_Omega_50blk_Champion.mp4) * **32kHz 立体声音轨 (`.wav`)**: [`assets/MiniMax_H3_TheoremFlow_Omega_Champion_audio.wav`](./assets/MiniMax_H3_TheoremFlow_Omega_Champion_audio.wav) --- ## 📊 基准测试结果与可视化图表 ![MiniMax-H3-Rung-Omega Benchmark Overview](./assets/minimax_h3_rung_omega_benchmark_hero.png) ### 1. 完整 50-Block 端到端速度场精度对比 (vs. 官方首选 `int8_convrot`) | 模型 / 格式 | 激活线性层 | 有效位宽 (BPW) | 总大小 (GiB) | 相比 BF16 压缩比 | Video Spatial Top-1 (↑) | Audio Patch Top-1 (↑) | Video Velocity Cosine (↑) | Audio Velocity Cosine (↑) | Video $R^2$ (↑) | Audio $R^2$ (↑) | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | **BF16 Teacher (`minimax_h3_fl2va_pruned_bf16`)** | 200 × BF16 | `16.000` | `37.46 GiB` | `1.00x` | `100.00%` | `100.00%` | `1.000000` | `1.000000` | `100.00%` | `100.00%` | | **官方 `#1` `int8_convrot` (`19.53 GiB`)** | 200 × INT8 | `8.003` | `19.53 GiB` | `1.92x` | `72.92%` | `77.60%` | `0.980832` | `0.985771` | `96.16%` | `97.10%` | | **`Rung Ω` 4-Trit Pareto Champion (Ours)** | **200 × 4-Trit Base-243** | **`5.967` (`6.40` raw)** | **`14.96 GiB` (`16.22 GiB` raw)** | **`2.50x`** | **`78.12%` (`+5.20%p`)** | **`81.77%` (`+4.17%p`)** | **`0.976383`** | **`0.982006`** | **`95.28%`** | **`96.43%`** | ### 2. 多轨率失真帕累托前沿 (Rate-Distortion Pareto Frontier) ![Rung Ω Rate-Distortion Pareto Frontier](./assets/minimax_h3_pareto_frontier_chart.png) | 量化轨道 | Trits / 码本 | BPW (Joint-tANS) | 总大小 (GiB) | 相比 BF16 压缩比 | Combined Top-1 (↑) | Combined SNR (dB) | Video Cosine (↑) | Audio Cosine (↑) | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | `baseline_nvfp4_rtn` | NVFP4 | `4.500` | `11.67 GiB` | `3.21x` | `97.53%` | `33.61 dB` | `0.999810` | `0.999676` | | **`omega_base15_ultra`** | 3-Trit (`[-7..+7]`, 2 w/byte) | **`3.432`** | **`9.27 GiB`** | **`4.04x`** | **`99.48%`** | **`44.31 dB`** | **`0.999984`** | **`0.999968`** | | **`omega_4trit_sub45`** | 4-Trit ECSQ (`[-40..+40]`) | **`4.488`** | **`11.64 GiB`** | **`3.22x`** | **`99.48%`** | **`47.77 dB`** | **`0.999992`** | **`0.999990`** | | **`omega_4trit_pareto` (发布权重)** | 4-Trit Full-Range (`[-40..+40]`) | **`5.977`** | **`14.98 GiB` (`16.22 GiB` raw)** | **`2.50x`** | **`99.87%`** | **`50.62 dB`** | **`0.999995`** | **`0.999996`** | | **`omega_5trit_supreme`** | 5-Trit (`[-121..+121]`) | **`7.575`** | **`18.57 GiB`** | **`2.02x`** | **`99.48%`** | **`52.60 dB`** | **`0.999997`** | **`0.999998`** | --- ## 🚀 快速开始 (Quickstart) ```bash # 1. 在 ComfyUI 中注册 TensorCoreRungOmegaTernaryLayout python3 src/register_comfyui_rung_omega.py # 2. 使用 TheoremFlow-Ω (8.92x 加速) 生成音视频 python3 src/generate_minimax_h3_rung_omega_video.py \ --unet-name minimax_h3_fl2va_pruned_rung_omega.safetensors \ --first-frame /path/to/input_frame.png \ --width 864 --height 480 --length 124 --steps 20 \ --theoremflow \ --output-mp4 output_theoremflow_omega.mp4 ``` --- ## ☕ 赞助支持与定制模型量化申请 (Buy Me a Coffee & Community) 如果您希望将其他大模型(视频/音频 DiT、LLM、多模态模型等)进行 **`Rung Ω` (`3-Trit` / `4-Trit` / `5-Trit` Base-243)** 量化并适配 **`TheoremFlow-Ω` 推理加速**: 1. **⚡ 赞助者最优先队列 (Priority Queue)**:在 [**Buy Me a Coffee (`buymeacoffee.com/tripleyoung`)**](https://buymeacoffee.com/tripleyoung) 赞助留言中写下您希望量化的模型名称(Hugging Face ID),我们将最优先为您完成量化与加速适配! 2. **💬 交流与模型申请频道 (Community Discussions)**:欢迎随时在 [**Hugging Face 社区讨论区 (`Discussions`)**](https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/discussions) 发帖申请模型或与我们直接交流。

Buy Me A Coffee

* **☕ Buy Me a Coffee (海外/全球赞助与优先量化申请)**: [https://buymeacoffee.com/tripleyoung](https://buymeacoffee.com/tripleyoung) * **💛 KakaoPay QR 转账赞助 (韩国 KakaoPay)**: [https://qr.kakaopay.com/FVgCIrWbX](https://qr.kakaopay.com/FVgCIrWbX) * **🏦 韩国银行转账赞助 (Korean Bank Transfer)**: `NH农协(농축협) 352-1556-0640-33 (户名: 윤여원)` * **💬 社区讨论与模型申请板块**: [https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/discussions](https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/discussions)

KakaoPay QR Transfer (윤여원)