File size: 10,100 Bytes
a35bf1c
 
ae88e5e
 
 
 
 
 
 
a35bf1c
b9db29f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a35bf1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dba5fd6
 
 
 
 
 
 
 
a35bf1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ae88e5e
 
 
b9db29f
638e39c
 
 
b9db29f
638e39c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# 🇨🇳 MiniMax-H3-Rung-Omega (`5.976 BPW`, `14.98 GiB` Joint-tANS / `16.22 GiB` Raw Base-243) + TheoremFlow-Ω (`8.92x` 推理加速引擎)

<p align="left">
  <strong>🌐 Language / 언어 / 语言 / 言語:</strong>&nbsp;&nbsp;
  <a href="./README.md"><strong>🇺🇸 English</strong></a> &nbsp;|&nbsp;
  <a href="./README_ko.md"><strong>🇰🇷 한국어</strong></a> &nbsp;|&nbsp;
  <a href="./README_zh.md"><strong>🇨🇳 中文 (简体)</strong></a> &nbsp;|&nbsp;
  <a href="./README_ja.md"><strong>🇯🇵 日本語</strong></a>
</p>

<div align="center">
  <p>
    <a href="https://buymeacoffee.com/tripleyoung" target="_blank">
      <img src="https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Priority%20Model%20Queue%20%E2%9A%A1-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black" alt="Buy Me A Coffee" />
    </a>
    <a href="https://qr.kakaopay.com/FVgCIrWbX" target="_blank">
      <img src="https://img.shields.io/badge/KakaoPay%20QR-%EC%B9%B4%EC%B9%B4%EC%98%A4%ED%8E%98%EC%9D%B4%20%EC%86%A1%EA%B8%88-FEE500?style=for-the-badge&logo=kakaotalk&logoColor=black" alt="KakaoPay QR" />
    </a>
    <img src="https://img.shields.io/badge/NH%EB%86%8D%ED%98%91(%EB%86%8D%EC%B6%95%ED%98%91)-352--1556--0640--33%20(%EC%9C%A4%EC%97%AC%EC%9B%90)-0072BC?style=for-the-badge" alt="NH농협 352-1556-0640-33 (윤여원)" />
    <a href="https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/discussions" target="_blank">
      <img src="https://img.shields.io/badge/HF%20Community-Request%20Models%20%F0%9F%92%AC-38BDF8?style=for-the-badge" alt="Community Discussions" />
    </a>
  </p>
  <p>
    <a href="https://qr.kakaopay.com/FVgCIrWbX" target="_blank">
      <img src="https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/resolve/main/assets/kakaopay_qr.jpg" width="160" alt="KakaoPay QR Transfer (윤여원)" style="border-radius: 12px; border: 1px solid #e5e7eb;" />
    </a>
  </p>
  <p>
    🏦 <b>국내 계좌이체 후원 (Korean Bank Transfer):</b> <code>NH농협(농축협) 352-1556-0640-33 (예금주: 윤여원)</code> &nbsp;|&nbsp;
    💛 <a href="https://qr.kakaopay.com/FVgCIrWbX" target="_blank"><b>카카오페이 QR 송금</b></a> &nbsp;|&nbsp;
    ☕ <a href="https://buymeacoffee.com/tripleyoung" target="_blank"><b>Buy Me a Coffee</b></a>
  </p>
</div>

> ☕ **支持开源量化与推理加速研究**:**`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 🔊)

<p align="center">
  <video controls autoplay loop muted playsinline width="100%" src="https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/resolve/main/assets/minimax_h3_viral_16x9.mp4"></video>
</p>



* **完整视频 + 同步语音演示 (`.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) 发帖申请模型或与我们直接交流。

<p align="left">
  <a href="https://buymeacoffee.com/tripleyoung" target="_blank">
    <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="50" />
  </a>
</p>

* **☕ 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)

<p align="center">
  <a href="https://qr.kakaopay.com/FVgCIrWbX" target="_blank">
    <img src="https://huggingface.co/yeowon/MiniMax-H3-Rung-Omega/resolve/main/assets/kakaopay_qr.jpg" width="160" alt="KakaoPay QR Transfer (윤여원)" style="border-radius: 12px; border: 1px solid #e5e7eb;" />
  </a>
</p>