Skip to content

Getting started

AlexHe edited this page Aug 26, 2026 · 9 revisions

Getting started

Requirements

  • Linux + ROCm (hipcc, libamdhip64) and a gfx1151 GPU (Strix Halo / Radeon 8060S). Other AMD targets are untested.
  • Official BF16 checkpoint at MiniMax-H3/ (FL2VA/*, optional Ref2VA/*)
  • FFmpeg / FFprobe on PATH
  • ICU (libicu-dev)

Build

git clone https://github.com/alexhegit/h3-hip.c.git
cd h3-hip.c
make -j$(nproc) h3
./h3 --info -d /path/to/MiniMax-H3

On Linux the Makefile defaults to H3_BACKEND=hip and --offload-arch=gfx1151. Apple Metal sources (h3_gpu.m, h3_shaders.metal) stay in-tree for comparison with upstream and are not the Linux build path.

First generate (T2VA)

./h3 --profile \
  -d /path/to/MiniMax-H3 \
  -p "A red fox walks through fresh snow." \
  --width 512 --height 512 \
  --frames 22 --steps 20 \
  --layers 50 --reuse 1 \
  -o outputs/fox.mp4

First run pays model load from disk (~107 GiB on this T2VA path). Repeat runs still miss most of the page cache on a box with ~31 GiB host RAM. For timed fox-s2 / fox-fast knobs see Performance.

Tests

make -j$(nproc) test
make hip-functional

Set H3_MODEL=/path/to/MiniMax-H3 if weights are not at the Makefile default. MLX toy-block fixtures are optional; without misc/fixtures/ those parity targets are skipped.

Layout

Host / model / CLI follow antirez/h3.c. The Linux GPU path is backends/h3_gpu_hip.c, kernels/h3_kernels.hip, kernels/h3_kernels_extra.hip.

Clone this wiki locally