Skip to content

Lean option: ROCmFP4 (Vulkan) and ROCmI4 (ROCm, W4A4) behind 1bit serve --lean - #37

Merged
bong-water-water-bong merged 3 commits into
mainfrom
lean-rocmfp4
Sep 24, 2026
Merged

bong-water-water-bong merged 3 commits into
mainfrom
lean-rocmfp4

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Adds a lean option: ROCmFPX's AMD-focused formats, which upstream llama.cpp cannot read, served by 1bit serve --lean.

Command Format Device
1bit serve -m x-ROCMFP4.gguf --lean ROCmFP4 (Q4_0_ROCMFP4_STRIX_LEAN) Vulkan0
1bit serve -m x-ROCMI4.gguf --lean --device rocm ROCmI4 (Q4_0_ROCMI4) ROCm0, gfx1151 W4A4
  • third_party/llama.cpp-rocmfpx pins ROCmFPX (MIT) at fb08d7c, the measured commit; NOTICE credits it.
  • cmake/lean.cmake: ONEBIT_LEAN builds its llama-server + llama-quantize on Vulkan; ONEBIT_LEAN_ROCM adds the ROCm build with W4A4 (ONEBIT_LEAN_ROCM_TOOLCHAIN picks TheRock).
  • serve_e2e_lean test (with ONEBIT_SERVE_TEST_LEAN_GGUF); bump-rocmfpx.yml moves the pin weekly.
  • docs/lean.md, docs/serve.md, README, site nav.

Measured on Strix Halo, Qwen3.8-27B from one BF16 (KLD vs BF16; llama-bench pp512 / tg128):

File Size Mean KLD Same top Vulkan ROCm ROCm W4A4 MTP chat
UD-Q4_K_XL (default) 16.4 GiB 0.008 95.3% 353 / 11.9 307 / 10.8 22.6 / 20.5 / 19.4
ROCmFP4 STRIX_LEAN 13.8 GiB 0.055 88.7% 348 / 14.2 411 / 13.7 27.8 / 23.3 / 24.1
ROCmI4 13.9 GiB 0.051 89.7% 6 / 4.1 397 / 13.6 465 / 13.6

Verified on Strix Halo: serve_e2e_lean (ROCmFP4, Vulkan0) PASS; serve_e2e.sh ... rocm --lean (ROCmI4, ROCm0) PASS with ROCmI4 W4A4: enabled in the server log. The ROCm build needed -DONEBIT_LEAN_ROCM_TOOLCHAIN=$HOME/therock100 there.

🤖 Generated with Claude Code

…d 1bit serve --lean

third_party/llama.cpp-rocmfpx pins charlie12345/ROCmFPX (MIT) at fb08d7c, the commit
measured on Strix Halo. cmake/lean.cmake builds its llama-server and llama-quantize on
Vulkan (ONEBIT_LEAN) and, with ONEBIT_LEAN_ROCM, a ROCm llama-server with the gfx1151
W4A4 path. `1bit serve --lean` runs a ROCmFP4 file on Vulkan0; `--lean --device rocm`
runs a ROCmI4 file on ROCm0. serve_e2e_lean tests it given ONEBIT_SERVE_TEST_LEAN_GGUF.

docs/lean.md has the Qwen3.8-27B comparison against the default UD-Q4_K_XL: ROCmFP4
decodes 19% faster on Vulkan at about 7x the KL divergence; ROCmI4 with W4A4 has the
fastest prompt processing (465 tok/s) and no Vulkan kernel. bump-rocmfpx.yml moves the
pin weekly. NOTICE, README, docs/serve.md and the site's nav name it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) September 24, 2026 12:24
@bong-water-water-bong
bong-water-water-bong merged commit 4124d89 into main Sep 24, 2026
3 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the lean-rocmfp4 branch September 24, 2026 12:27
bong-water-water-bong added a commit that referenced this pull request Oct 25, 2026
Private HIP add-on pin 744bd713d968 -> 17a882640fa88: NVFP4 + Q2_0 on every family (#33), 2..16-token verify kernels (#32) and the GEAK WMMA rewrite (#37), DFlash2 selector (#34), ZAYA lm_head + one-token kernels (#35), Bonsai ternary verify + PQ2_0 prefill (#36), IQ2_S expert prefill + decode (#38/#39). hw-gate kat goldens (7 models x 9 cases) and KLD bases re-recorded at llama.cpp e7e5cd08 + this pin; check-back 13/13 PASS on the gate box.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant