Skip to content

serve: --device auto keeps Vulkan for architectures HRX does not map, --mtp and --mmproj - #271

Merged
bong-water-water-bong merged 1 commit into
mainfrom
auto-arch-guard
Oct 1, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
auto-arch-guard

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

This follows up #270, where review found a blocker: --device auto returned HRX for every .gguf.

The problem

registry/architectures.json maps 17 GGUF architectures (23 HF classes) to the Vulkan build but not to HRX. Among them:

  • Qwen3.8-Flash-Next (qwen4exp);
  • Zyphra Zamba, Zamba2 and BlackMamba.

Under auto, those files would have started on HRX0, which can't load them.

Changes

--device auto now stays on Vulkan in these cases:

docs/serve.md lists these exceptions. It also gives today's HRX prompt speed (pp512 97-99 tok/s on Qwen3.8-27B), which holds until llama.cpp fork #55 is pinned.

Tests

tests/device_route.sh gains four checks:

  • auto keeps a qwen4exp file on Vulkan0;
  • auto keeps --mtp on Vulkan0;
  • auto keeps --mmproj on Vulkan0;
  • serve.cpp's list matches the registry, so the test fails when the registry changes and the list doesn't.

Results:

  • The test passes on a build without HRX.
  • It also passes on a build compiled with ONEBIT_HRX_SERVER defined: a plain file goes to HRX0, the cases above to Vulkan0.
  • ctest -LE gpu: 19/19 pass.

🤖 Generated with Claude Code

… --mtp and --mmproj

Follow-up to #270. auto_gguf_device() returned hrx for every .gguf, but
registry/architectures.json maps 17 GGUF architectures (23 HF classes) to
the Vulkan build and not HRX, among them Qwen3.8-Flash-Next (qwen4exp) and
Zyphra Zamba, Zamba2 and BlackMamba. auto now keeps those on Vulkan
(hrx_missing_arch), and keeps --mtp (HRX drafts at 65-78% of Vulkan) and
--mmproj (an open RFC #213 gate) on Vulkan too.

tests/device_route.sh: auto keeps a qwen4exp file, --mtp and --mmproj on
Vulkan0, and serve.cpp's list matches the registry. It passes on this
build (no HRX) and on one compiled with ONEBIT_HRX_SERVER defined (plain
file -> HRX0, the rest -> Vulkan0). ctest -LE gpu: 19/19.

docs/serve.md states the auto exceptions and the HRX prompt speed until
llama.cpp fork #55 is pinned.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@context7

context7 Bot commented Oct 1, 2026

Copy link
Copy Markdown

Docs7 for 1bit-monster/engine

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit f9a8e1f

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect Architecture List

The hrx_missing_arch function in app/serve.cpp contains a hardcoded list of GGUF architectures that HRX does not support. This list must be kept in sync with registry/architectures.json to ensure correct device routing. The test tests/device_route.sh includes a check to validate this list matches the registry, but if the list is not updated when the registry changes, it could lead to incorrect device selection for models that should use Vulkan but are incorrectly routed to HRX.

// The GGUF architectures a pinned Vulkan llama.cpp maps and the HRX one does not
// (registry/architectures.json: "vulkan" in backends, "hrx" not). tests/device_route.sh checks
// this list against the registry, so regenerate both together.
bool hrx_missing_arch(const std::string& arch) {
    static const char* const archs[] = {
        "bailingmoe3", "blackmamba", "dots3note", "granite_swa", "graniteswitch", "hrm_text",
        "hy_v4",       "kimi-k3",    "maple",     "minimax-01",  "muse-glimmer",  "pockettts",
        "qwen3tts",    "qwen4exp",   "spark2_5",  "zamba",       "zamba2"};
    for (const char* a : archs)
        if (arch == a) return true;
    return false;
}
Conditional Logic for Device Selection

The auto_gguf_device function in app/serve.cpp introduces conditional logic to determine device selection based on model architecture and flags like --mtp and --mmproj. While this is intended to improve routing, the logic must be carefully validated to ensure it correctly handles all edge cases and does not inadvertently route models to the wrong device, especially in builds where HRX is not available.

std::string auto_gguf_device(const Options& o) {
#if defined(_WIN32)
    (void)o;
    return "cpu";  // no GPU route on Windows yet (docs/windows.md)
#elif defined(ONEBIT_HRX_SERVER)
    if (o.moe_slots != 0 || !o.mtp.empty() || !o.mmproj.empty()) return "vulkan";
    const std::string arch = gguf_architecture(o.model);
    if (hrx_missing_arch(arch)) return "vulkan";
    if (o.parallel > 1 && (arch == "qwen35" || arch == "qwen35moe" || arch == "qwen3next")) return "vulkan";
    return "hrx";

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Review (PR-Agent duty): this resolves the #270 blocker.

  • hrx_missing_arch covers the 17 GGUF architectures (23 HF classes) the registry maps to Vulkan and not HRX, including qwen4exp, zamba, zamba2 and blackmamba.
  • --mtp, --mmproj and --moe-slots stay on Vulkan under auto.
  • The hard-coded list is pinned to registry/architectures.json by tests/device_route.sh, so a registry regeneration that changes HRX coverage fails the test until the list follows. That's the right trade over parsing the registry at startup.

Merging when checks pass.

@bong-water-water-bong
bong-water-water-bong merged commit 0d772d8 into main Oct 1, 2026
11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the auto-arch-guard branch October 1, 2026 21:07
bong-water-water-bong added a commit that referenced this pull request Oct 5, 2026
…mfyUI; move site and kernel out) (#306)

* HRX only (RFC #213 stage 3): drop the Vulkan and ROCm llama.cpp builds

The engine builds one llama.cpp: the HRX pin (third_party/llama.cpp), for
HRX0 and the CPU. Per the owner's 2026-10-01 direction (HRX + Loom or HIP
kernels, zero Vulkan, zero ROCm); Lemonade ships its own llamacpp backends
for Vulkan and ROCm.

Vulkan:
- third_party/llama.cpp-vulkan, cmake/vulkan.cmake, ONEBIT_VULKAN and
  .github/workflows/bump-llama-vulkan.yml are gone.
- The HRX build no longer turns on GGML_VULKAN (cmake/hrx.cmake); it also
  builds llama-quantize, which tools/hadamard_q4_0.py now uses.
- The Windows CPU llama-server is built from third_party/llama.cpp with
  GGML_HRX=OFF (scripts/build-windows.sh).
- registry/architectures.json loses its vulkan column: tools/registry_build.py
  reads only the HRX fork and ZINC; check_models.tsv and checked.json drop
  their vulkan rows; census.json is recomputed from its stored sweep.

ROCm:
- third_party/llama.cpp-rocmfpx, cmake/lean.cmake, ONEBIT_LEAN /
  ONEBIT_LEAN_ROCM and .github/workflows/bump-rocmfpx.yml are gone, with the
  long_route test (--long-model ran on the lean ROCm build).

Packaging, the weekly run, NOTICE and tools/weekly_changes.py follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* serve: HRX only; drop the Vulkan and ROCm routes and their features

`1bit serve` runs a .gguf on HRX0 or the CPU (and ZINC, DwarfStar, ONNX,
MLX, the NPU as before). RFC #213 stage 3.

Removed, each refused with the reason when asked for:
- --device vulkan and --device rocm (Lemonade's own llamacpp backend serves
  both);
- --prefill-device / --prefill-min-tokens (Vulkan decode with HRX prefill);
- --lean (ROCmFPX formats), --adaptive / --adaptive-at (Vulkan + ROCm
  overflow), --long-model / --long-from (the W4A4 long-prompt route);
- the DFlash2 one-server route: the ROCm recipes rotated-moe-ub1024 and
  rocm-dflash-p-min-0.4 (--dflash itself stays, on HRX and the CPU).

--device auto (what engine #271 kept on Vulkan):
- a plain .gguf: HRX0 where the build has HRX, else the CPU (CI, Windows);
- --mtp: HRX0 (it drafts there now, slower than Vulkan did);
- --mmproj: the CPU, with a note (HRX vision is an open RFC #213 gate;
  --device hrx asks for it);
- --parallel N > 1 on a gated delta-net model: refused (HRX runs one
  sequence; the CPU is no stand-in);
- an architecture our llama.cpp does not map (hrx_missing_arch: qwen4exp,
  zamba, zamba2, blackmamba and 13 upstream-only ones): refused on every
  device, pointing at Lemonade's llamacpp backend;
- a Hadamard-rotated Q4_0 (H32): auto's route (was the lean ROCm build).

--moe-slots is kept, code included: in a build without
ONEBIT_MOE_STREAMING_HRX it says it is not in this build and moves to HRX
with Qwen3.8-Flash-Next. The streamer lives only in the removed Vulkan pin.

The RAG servers (--embed / --rerank) run on HRX0, else the CPU. Laya offers
hrx (or cpu) and zinc. Tests follow: smoke_serve, parallel_args and
bench_selftest use --device cpu; device_route checks the new auto rules and
every refusal; hadamard_route, prism_route, recipes_route, laya_gguf_route
and laya_route_e2e drop their Vulkan and ROCm expectations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: HRX only (RFC #213 stage 3)

The docs, site, README and issue templates follow the build: no Vulkan or
ROCm llama.cpp, no --lean, --adaptive, --long-model or --prefill-device.
docs/vulkan.md and docs/lean.md are removed; the posts that link to them
point at their copies at 0baf286 (post text unchanged).

- serve.md: the device table, what --device auto does where HRX has no
  route, the removed devices and flags and what serve says for each,
  --moe-slots kept but not in this build.
- lemonade.md: Vulkan and ROCm are Lemonade's own llamacpp backends; the
  fork's onebit backend still lists vulkan (a follow-up there).
- registry.md: the vulkan column is gone; hrx also means the CPU route.
- hrx.md, moe-streaming.md, laya.md, recipes.md, releases.md, windows.md,
  onnx.md, PORTING.md: the same change where they named the removed builds.
- tools/site.py, context7.json, .pr_agent.toml, the issue templates and the
  issue agent's prompt: the device lists drop vulkan and rocm, add cpu.

Measurements taken on the removed builds are kept where they explain a
decision and are labelled as such.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* serve: owner decisions on stage 3 (auto, H32, refused architectures, recipes)

Owner decisions of 2026-10-03 on the open questions of this branch.

- --mmproj under --device auto runs on HRX0. Unverified: vision on HRX is
  an open RFC #213 gate, to be checked on ZAYA1-VL; if it fails there, auto
  sends --mmproj back to the CPU. Comment and docs say so.
- --parallel N > 1 on a gated delta-net model (qwen35, qwen35moe,
  qwen3next) under auto: HRX0 with one slot and a warning on stderr (no
  multi-sequence delta-net on HRX yet), instead of a refusal. --device cpu
  still honors --parallel.
- H32 (Hadamard-rotated Q4_0, onebit.hadamard_q4_0) is dropped:
  tools/hadamard_q4_0.py, its serve route, the hadamard_q4_0 recipe match
  key and tests/hadamard_route.sh are removed, and serve refuses such a file
  by name. PrismML's own rotation (prism.hadamard, Ternary Bonsai) is a
  different route and keeps working (prism_route passes). The HRX build no
  longer needs llama-quantize.
- The refused architectures are generated, not listed by hand:
  tools/registry_build.py records every GGUF architecture the pinned fork's
  runtime builds (registry/architectures.json, gguf_architectures.hrx, 141
  at f5b7f4a), CMakeLists.txt compiles it into serve (hrx_archs.h), and
  serve refuses any other architecture on hrx and cpu.
- config/recipes.json has no built-in recipes: dflash-p-min-0 was a no-op
  on HRX (default p-min 0) and measured on the removed ROCm build.
  recipes_route now tests the mechanism with a recipe file.
- README: the census figures are the recomputed 94.71% mapped / 64.2%
  checked (334,413 models with an architecture).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* tests: retire npu_lane_e2e

The fast-lane end-to-end test ran kernels derived from FastFlowLM and
compared against reference logits that are lost (owner, 2026-10-03).
tests/npu_lane_e2e.sh and its ctest registration (ONEBIT_NPU_REFERENCE)
are removed. The NPU check is now the private dx add-on's from-source
check, which is not in this repository.

docs/npu.md gets a "Checking the NPU" section; docs/kernel.md,
docs/PORTING.md and the bump-xdna / bump-linux PR text point at it instead
of the retired script. The kernel-free NPU tests (npu_full_elf_md5,
npu_q4nx, npu_pack_test, tokenizer_test) still run in CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* 1bit OS: build the image around HRX

The image carried the Vulkan llama-server and Mesa RADV; the engine has no
Vulkan build since RFC #213 stage 3. Owner decision 2026-10-03: rebuild it
around HRX.

os/mini/mkimage.sh:
- copies the HRX llama-server (build/hrx/llama/bin, at its build path, with
  every library it links) and the TheRock HSA runtime the build was
  configured with (ONEBIT_HRX_LIBHSA from CMakeCache.txt, at its path; 1bit
  has both compiled in), plus libdrm's amdgpu.ids where TheRock has one;
- drops RADV, the Vulkan loader and lavapipe;
- test images only: LLAMA_SERVER=<CPU llama-server> stands in for the HRX
  build and NO_XRT=1 leaves XRT out, for machines without TheRock or XRT;
- VMLINUZ= overrides the kernel image (where /boot is root-only).

os/mini/init.sh exports IREE_HAL_AMDGPU_LIBHSA_PATH and keeps HRX's Loom
kernel cache on the stick (GGML_HRX_JIT_CACHE_DIR=/data/cache/hrx-jit), so
only the first boot of an image compiles kernels; serves with --device auto
by default; the 1bit.check boot checks the HSA runtime. vmtest.sh serves
with --device cpu (the VM has no Radeon GPU). os/README.md lists what only
the hardware can check.

VM test on ryzen (CPU-only test image: LLAMA_SERVER from the HRX pin with
GGML_HRX=OFF, NO_XRT=1, kernel 7.0.0-34): UEFI boot from the USB image, SSH
in 9 s, data partition and HRX JIT cache dir mounted, 1bit serve
--device cpu answered "Paris." VMTEST PASS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs/lemonade.md: the fork branch that drops onebit's vulkan backend

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* npu: remove the xclbin paths; the engine runs full ELFs only

The NPU xclbin route was a comparison backend and nothing serves from it.
`1bit serve --device npu` (GGUF on the NPU) already called the forward with
full ELFs only, so this changes no served model or flag.

- I8Ctx (npu/forward/engine-src): drop init() (xrt::xclbin +
  register_xclbin + per-design instruction .txt), init_with_generator(),
  the xrt::kernel/instruction-BO launch branches, the HOST_ONLY group BOs
  and NPU_WBO_FLAGS. init_elf() is the only init.
- Q4nxNpuForward: drop the use_elf argument, the final_i8_*.xclbin /
  insts_i8_*.txt resolver and NPU_INFER_TAG.
- common.h: drop the FastFlowLM xclbin tables (XCLBIN_PATHS pointed at
  ~/amd-oss/fastflowlm), the full-ELF A/B name table and the xclbin
  kernel-argument/opcode constants. Nothing referenced them.
- device.h: removed. Never included and never implemented; its hwctx API
  configured a context from an xclbin path.
- model_config.h: drop the unused xclbin_* geometry fields.
- Comments, CMake help text and docs: say full ELF; the xclbin numbers in
  docs/npu.md stay as history and are labelled so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 1/5 (Vulkan): drop the last engine-side Vulkan remnants

RFC #213 stage 3 already removed third_party/llama.cpp-vulkan, docs/vulkan.md, the bump
workflow and the Vulkan routes. What was left: tool examples naming Vulkan0, the Laya fetch
comment, and the long record of the removed --prefill-device split in docs/hrx.md (now a pointer
to its last version at 0baf286). serve still refuses --device vulkan/rocm and the removed flags
with the reason (Lemonade's llamacpp backend serves Vulkan and ROCm). The Windows package keeps
its CPU llama-server (GGML_VULKAN=OFF).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 2/5 (ROCm/ROCmFPX lean): KernelForge tasks no longer point at the ROCm build

RFC #213 stage 3 already removed third_party/llama.cpp-rocmfpx, ONEBIT_LEAN(_ROCM), docs/lean.md,
--lean/--device rocm/--long-model, the ROCm DFlash2 route, tools/hadamard_q4_0.py and the
ROCm recipes (config/recipes.json is empty). The one engine-side reference left was KernelForge's
README sending kept kernels back into ROCmFPX; they now go into an HIP kernel dispatched through
HRX. The ROCmFPX measurements stay as the record. TheRock (/opt/rocm-therock), which HRX itself
needs, stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 3/5 (ZINC): remove ZINC

Owner decision 2026-10-04: the engine is HRX + HIP kernels + the NPU; Lemonade's own backends
serve other GPUs. Removed: third_party/zinc, ONEBIT_ZINC(_BACKEND), scripts/build-zinc.sh,
docs/zinc.md, bump-zinc.yml, serve's --device zinc / --zinc route, the zinc registry column
(tools/registry_build.py, architectures.json, check_models.tsv, checked.json, census), the zinc
package and weekly build steps, the site nav entry, and NOTICE's ZINC attribution.

serve now refuses --device zinc and --zinc with the reason, as it does vulkan and rocm
(tests/device_route.sh checks both). With ZINC gone, Laya's .gguf candidates are hrx and cpu in
a build with HRX and cpu alone without; the Laya route tests use a code->hrx, rest->cpu policy.
architectures.json was edited in place (the zinc source, backends and counts dropped; the same
output tools/registry_build.py now writes); registry_pins and registry_gaps pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 4/5 (CUDA): no CUDA build left in the engine

With ZINC gone, the engine's last CUDA build was DwarfStar's cuda backend. DwarfStar itself stays
(owner, 2026-10-04); only that backend leaves: ONEBIT_DS4_BACKEND and scripts/build-ds4.sh take
rocm (Strix Halo, the default), metal or cpu, and the Linux package no longer looks for a ds4 cuda
build. The ROCm backend is DwarfStar's own HIP code against TheRock's hipBLAS(Lt)/rocBLAS/rocWMMA/
hipCUB; it needs no engine-built ROCm llama.cpp.

Left on purpose: GGML_CUDA=OFF in cmake/hrx.cmake (it says the HRX build has no CUDA backend),
torch.cuda in the KernelForge drivers (PyTorch's device API, which ROCm torch implements on
HIP), and upstream ds4's own description. The Lemonade fork's onebit cuda backend entry lives
in that repository.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 5/5 (ComfyUI): remove ComfyUI.cpp and 1bit comfy

Removed: third_party/comfyui.cpp (GPL-3.0, never linked), ONEBIT_COMFYUI, scripts/build-comfyui.sh,
docs/comfyui.md, the `1bit comfy` command (both the POSIX fexecve and the Windows spawn paths,
and the includes only they used), the weekly bump-comfyui check and fetch, the weekly-post and
site-nav entries, and NOTICE's ComfyUI.cpp attribution. The Windows package keeps serve (CPU,
ONNX) and route. The CMake banner that sat above ONEBIT_ONNX now describes ONNX.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 6: move the site and the kernel build out of the engine

The site and the kernel build now live in their own repositories (owner, 2026-10-04):
github.com/1bit-MONSTER/site (public, serving 1bit.gg; it builds README.md and docs/ from an engine
checkout, so those stay here) and github.com/1bit-MONSTER/kernel.

Removed: site/, blog/, tools/site.py, .github/workflows/pages.yml, third_party/linux (submodule
and .gitmodules entry), scripts/build-kernel.sh, config/kernel/, docs/kernel.md,
.github/workflows/bump-linux.yml, the weekly bump-linux check and linux fetch, the linux pin in
tools/weekly_changes.py, and blog/site entries in context7.json and .gitignore. README points to
both repositories; PORTING marks the kernel step as moved.

1bit OS keeps working unchanged: os/mini/mkimage.sh never used third_party/linux; it takes the
running kernel (or KVER=/VMLINUZ=). Only its comment and os/README.md now say the kernel packages
come from 1bit-MONSTER/kernel. NOTICE keeps the Linux kernel, now under 'Shipped in the 1bit OS
image only (built outside this repository)'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 7: DwarfStar builds on HIP only

Owner, 4 Oct: DwarfStar is full HIP. ONEBIT_DS4 always builds DwarfStar's HIP backend
for gfx1151 (make strix-halo) into build/ds4/hip; the Metal and CPU options are gone
(CUDA went in core strip 4). build-ds4.sh takes only the prefix; weekly.sh's bump test
and package-linux.sh follow the new path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 8: Windows --device onnx runs Lemonade's ryzenai-server.exe

Owner, 4 Oct: use what Lemonade builds. Lemonade installs ryzenai-server.exe for its
ryzenai-server backend on Windows, so build-windows.sh no longer cross-builds one (nor
fetches Microsoft's ONNX Runtime GenAI / ONNX Runtime zips). 1bit.exe finds it under
$LEMONADE_CACHE_DIR, else %USERPROFILE%\.cache\lemonade, in bin\ryzenai-server\npu, then
on PATH; ONEBIT_ONNX_SERVER still overrides. Lemonade publishes that server for Windows
only, so Linux keeps building it from third_party/ryzenai-server (ONEBIT_ONNX).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* build-ds4.sh: honour CMAKE_BUILD_PARALLEL_LEVEL

DwarfStar's make ran with every core regardless of the caller's job cap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
bong-water-water-bong added a commit that referenced this pull request Oct 5, 2026
)

* HRX only (RFC #213 stage 3): drop the Vulkan and ROCm llama.cpp builds

The engine builds one llama.cpp: the HRX pin (third_party/llama.cpp), for
HRX0 and the CPU. Per the owner's 2026-10-01 direction (HRX + Loom or HIP
kernels, zero Vulkan, zero ROCm); Lemonade ships its own llamacpp backends
for Vulkan and ROCm.

Vulkan:
- third_party/llama.cpp-vulkan, cmake/vulkan.cmake, ONEBIT_VULKAN and
  .github/workflows/bump-llama-vulkan.yml are gone.
- The HRX build no longer turns on GGML_VULKAN (cmake/hrx.cmake); it also
  builds llama-quantize, which tools/hadamard_q4_0.py now uses.
- The Windows CPU llama-server is built from third_party/llama.cpp with
  GGML_HRX=OFF (scripts/build-windows.sh).
- registry/architectures.json loses its vulkan column: tools/registry_build.py
  reads only the HRX fork and ZINC; check_models.tsv and checked.json drop
  their vulkan rows; census.json is recomputed from its stored sweep.

ROCm:
- third_party/llama.cpp-rocmfpx, cmake/lean.cmake, ONEBIT_LEAN /
  ONEBIT_LEAN_ROCM and .github/workflows/bump-rocmfpx.yml are gone, with the
  long_route test (--long-model ran on the lean ROCm build).

Packaging, the weekly run, NOTICE and tools/weekly_changes.py follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* serve: HRX only; drop the Vulkan and ROCm routes and their features

`1bit serve` runs a .gguf on HRX0 or the CPU (and ZINC, DwarfStar, ONNX,
MLX, the NPU as before). RFC #213 stage 3.

Removed, each refused with the reason when asked for:
- --device vulkan and --device rocm (Lemonade's own llamacpp backend serves
  both);
- --prefill-device / --prefill-min-tokens (Vulkan decode with HRX prefill);
- --lean (ROCmFPX formats), --adaptive / --adaptive-at (Vulkan + ROCm
  overflow), --long-model / --long-from (the W4A4 long-prompt route);
- the DFlash2 one-server route: the ROCm recipes rotated-moe-ub1024 and
  rocm-dflash-p-min-0.4 (--dflash itself stays, on HRX and the CPU).

--device auto (what engine #271 kept on Vulkan):
- a plain .gguf: HRX0 where the build has HRX, else the CPU (CI, Windows);
- --mtp: HRX0 (it drafts there now, slower than Vulkan did);
- --mmproj: the CPU, with a note (HRX vision is an open RFC #213 gate;
  --device hrx asks for it);
- --parallel N > 1 on a gated delta-net model: refused (HRX runs one
  sequence; the CPU is no stand-in);
- an architecture our llama.cpp does not map (hrx_missing_arch: qwen4exp,
  zamba, zamba2, blackmamba and 13 upstream-only ones): refused on every
  device, pointing at Lemonade's llamacpp backend;
- a Hadamard-rotated Q4_0 (H32): auto's route (was the lean ROCm build).

--moe-slots is kept, code included: in a build without
ONEBIT_MOE_STREAMING_HRX it says it is not in this build and moves to HRX
with Qwen3.8-Flash-Next. The streamer lives only in the removed Vulkan pin.

The RAG servers (--embed / --rerank) run on HRX0, else the CPU. Laya offers
hrx (or cpu) and zinc. Tests follow: smoke_serve, parallel_args and
bench_selftest use --device cpu; device_route checks the new auto rules and
every refusal; hadamard_route, prism_route, recipes_route, laya_gguf_route
and laya_route_e2e drop their Vulkan and ROCm expectations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: HRX only (RFC #213 stage 3)

The docs, site, README and issue templates follow the build: no Vulkan or
ROCm llama.cpp, no --lean, --adaptive, --long-model or --prefill-device.
docs/vulkan.md and docs/lean.md are removed; the posts that link to them
point at their copies at 0baf286 (post text unchanged).

- serve.md: the device table, what --device auto does where HRX has no
  route, the removed devices and flags and what serve says for each,
  --moe-slots kept but not in this build.
- lemonade.md: Vulkan and ROCm are Lemonade's own llamacpp backends; the
  fork's onebit backend still lists vulkan (a follow-up there).
- registry.md: the vulkan column is gone; hrx also means the CPU route.
- hrx.md, moe-streaming.md, laya.md, recipes.md, releases.md, windows.md,
  onnx.md, PORTING.md: the same change where they named the removed builds.
- tools/site.py, context7.json, .pr_agent.toml, the issue templates and the
  issue agent's prompt: the device lists drop vulkan and rocm, add cpu.

Measurements taken on the removed builds are kept where they explain a
decision and are labelled as such.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* serve: owner decisions on stage 3 (auto, H32, refused architectures, recipes)

Owner decisions of 2026-10-03 on the open questions of this branch.

- --mmproj under --device auto runs on HRX0. Unverified: vision on HRX is
  an open RFC #213 gate, to be checked on ZAYA1-VL; if it fails there, auto
  sends --mmproj back to the CPU. Comment and docs say so.
- --parallel N > 1 on a gated delta-net model (qwen35, qwen35moe,
  qwen3next) under auto: HRX0 with one slot and a warning on stderr (no
  multi-sequence delta-net on HRX yet), instead of a refusal. --device cpu
  still honors --parallel.
- H32 (Hadamard-rotated Q4_0, onebit.hadamard_q4_0) is dropped:
  tools/hadamard_q4_0.py, its serve route, the hadamard_q4_0 recipe match
  key and tests/hadamard_route.sh are removed, and serve refuses such a file
  by name. PrismML's own rotation (prism.hadamard, Ternary Bonsai) is a
  different route and keeps working (prism_route passes). The HRX build no
  longer needs llama-quantize.
- The refused architectures are generated, not listed by hand:
  tools/registry_build.py records every GGUF architecture the pinned fork's
  runtime builds (registry/architectures.json, gguf_architectures.hrx, 141
  at f5b7f4a), CMakeLists.txt compiles it into serve (hrx_archs.h), and
  serve refuses any other architecture on hrx and cpu.
- config/recipes.json has no built-in recipes: dflash-p-min-0 was a no-op
  on HRX (default p-min 0) and measured on the removed ROCm build.
  recipes_route now tests the mechanism with a recipe file.
- README: the census figures are the recomputed 94.71% mapped / 64.2%
  checked (334,413 models with an architecture).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* tests: retire npu_lane_e2e

The fast-lane end-to-end test ran kernels derived from FastFlowLM and
compared against reference logits that are lost (owner, 2026-10-03).
tests/npu_lane_e2e.sh and its ctest registration (ONEBIT_NPU_REFERENCE)
are removed. The NPU check is now the private dx add-on's from-source
check, which is not in this repository.

docs/npu.md gets a "Checking the NPU" section; docs/kernel.md,
docs/PORTING.md and the bump-xdna / bump-linux PR text point at it instead
of the retired script. The kernel-free NPU tests (npu_full_elf_md5,
npu_q4nx, npu_pack_test, tokenizer_test) still run in CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* 1bit OS: build the image around HRX

The image carried the Vulkan llama-server and Mesa RADV; the engine has no
Vulkan build since RFC #213 stage 3. Owner decision 2026-10-03: rebuild it
around HRX.

os/mini/mkimage.sh:
- copies the HRX llama-server (build/hrx/llama/bin, at its build path, with
  every library it links) and the TheRock HSA runtime the build was
  configured with (ONEBIT_HRX_LIBHSA from CMakeCache.txt, at its path; 1bit
  has both compiled in), plus libdrm's amdgpu.ids where TheRock has one;
- drops RADV, the Vulkan loader and lavapipe;
- test images only: LLAMA_SERVER=<CPU llama-server> stands in for the HRX
  build and NO_XRT=1 leaves XRT out, for machines without TheRock or XRT;
- VMLINUZ= overrides the kernel image (where /boot is root-only).

os/mini/init.sh exports IREE_HAL_AMDGPU_LIBHSA_PATH and keeps HRX's Loom
kernel cache on the stick (GGML_HRX_JIT_CACHE_DIR=/data/cache/hrx-jit), so
only the first boot of an image compiles kernels; serves with --device auto
by default; the 1bit.check boot checks the HSA runtime. vmtest.sh serves
with --device cpu (the VM has no Radeon GPU). os/README.md lists what only
the hardware can check.

VM test on ryzen (CPU-only test image: LLAMA_SERVER from the HRX pin with
GGML_HRX=OFF, NO_XRT=1, kernel 7.0.0-34): UEFI boot from the USB image, SSH
in 9 s, data partition and HRX JIT cache dir mounted, 1bit serve
--device cpu answered "Paris." VMTEST PASS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs/lemonade.md: the fork branch that drops onebit's vulkan backend

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* npu: remove the xclbin paths; the engine runs full ELFs only

The NPU xclbin route was a comparison backend and nothing serves from it.
`1bit serve --device npu` (GGUF on the NPU) already called the forward with
full ELFs only, so this changes no served model or flag.

- I8Ctx (npu/forward/engine-src): drop init() (xrt::xclbin +
  register_xclbin + per-design instruction .txt), init_with_generator(),
  the xrt::kernel/instruction-BO launch branches, the HOST_ONLY group BOs
  and NPU_WBO_FLAGS. init_elf() is the only init.
- Q4nxNpuForward: drop the use_elf argument, the final_i8_*.xclbin /
  insts_i8_*.txt resolver and NPU_INFER_TAG.
- common.h: drop the FastFlowLM xclbin tables (XCLBIN_PATHS pointed at
  ~/amd-oss/fastflowlm), the full-ELF A/B name table and the xclbin
  kernel-argument/opcode constants. Nothing referenced them.
- device.h: removed. Never included and never implemented; its hwctx API
  configured a context from an xclbin path.
- model_config.h: drop the unused xclbin_* geometry fields.
- Comments, CMake help text and docs: say full ELF; the xclbin numbers in
  docs/npu.md stay as history and are labelled so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 1/5 (Vulkan): drop the last engine-side Vulkan remnants

RFC #213 stage 3 already removed third_party/llama.cpp-vulkan, docs/vulkan.md, the bump
workflow and the Vulkan routes. What was left: tool examples naming Vulkan0, the Laya fetch
comment, and the long record of the removed --prefill-device split in docs/hrx.md (now a pointer
to its last version at 0baf286). serve still refuses --device vulkan/rocm and the removed flags
with the reason (Lemonade's llamacpp backend serves Vulkan and ROCm). The Windows package keeps
its CPU llama-server (GGML_VULKAN=OFF).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 2/5 (ROCm/ROCmFPX lean): KernelForge tasks no longer point at the ROCm build

RFC #213 stage 3 already removed third_party/llama.cpp-rocmfpx, ONEBIT_LEAN(_ROCM), docs/lean.md,
--lean/--device rocm/--long-model, the ROCm DFlash2 route, tools/hadamard_q4_0.py and the
ROCm recipes (config/recipes.json is empty). The one engine-side reference left was KernelForge's
README sending kept kernels back into ROCmFPX; they now go into an HIP kernel dispatched through
HRX. The ROCmFPX measurements stay as the record. TheRock (/opt/rocm-therock), which HRX itself
needs, stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 3/5 (ZINC): remove ZINC

Owner decision 2026-10-04: the engine is HRX + HIP kernels + the NPU; Lemonade's own backends
serve other GPUs. Removed: third_party/zinc, ONEBIT_ZINC(_BACKEND), scripts/build-zinc.sh,
docs/zinc.md, bump-zinc.yml, serve's --device zinc / --zinc route, the zinc registry column
(tools/registry_build.py, architectures.json, check_models.tsv, checked.json, census), the zinc
package and weekly build steps, the site nav entry, and NOTICE's ZINC attribution.

serve now refuses --device zinc and --zinc with the reason, as it does vulkan and rocm
(tests/device_route.sh checks both). With ZINC gone, Laya's .gguf candidates are hrx and cpu in
a build with HRX and cpu alone without; the Laya route tests use a code->hrx, rest->cpu policy.
architectures.json was edited in place (the zinc source, backends and counts dropped; the same
output tools/registry_build.py now writes); registry_pins and registry_gaps pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 4/5 (CUDA): no CUDA build left in the engine

With ZINC gone, the engine's last CUDA build was DwarfStar's cuda backend. DwarfStar itself stays
(owner, 2026-10-04); only that backend leaves: ONEBIT_DS4_BACKEND and scripts/build-ds4.sh take
rocm (Strix Halo, the default), metal or cpu, and the Linux package no longer looks for a ds4 cuda
build. The ROCm backend is DwarfStar's own HIP code against TheRock's hipBLAS(Lt)/rocBLAS/rocWMMA/
hipCUB; it needs no engine-built ROCm llama.cpp.

Left on purpose: GGML_CUDA=OFF in cmake/hrx.cmake (it says the HRX build has no CUDA backend),
torch.cuda in the KernelForge drivers (PyTorch's device API, which ROCm torch implements on
HIP), and upstream ds4's own description. The Lemonade fork's onebit cuda backend entry lives
in that repository.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 5/5 (ComfyUI): remove ComfyUI.cpp and 1bit comfy

Removed: third_party/comfyui.cpp (GPL-3.0, never linked), ONEBIT_COMFYUI, scripts/build-comfyui.sh,
docs/comfyui.md, the `1bit comfy` command (both the POSIX fexecve and the Windows spawn paths,
and the includes only they used), the weekly bump-comfyui check and fetch, the weekly-post and
site-nav entries, and NOTICE's ComfyUI.cpp attribution. The Windows package keeps serve (CPU,
ONNX) and route. The CMake banner that sat above ONEBIT_ONNX now describes ONNX.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 6: move the site and the kernel build out of the engine

The site and the kernel build now live in their own repositories (owner, 2026-10-04):
github.com/1bit-MONSTER/site (public, serving 1bit.gg; it builds README.md and docs/ from an engine
checkout, so those stay here) and github.com/1bit-MONSTER/kernel.

Removed: site/, blog/, tools/site.py, .github/workflows/pages.yml, third_party/linux (submodule
and .gitmodules entry), scripts/build-kernel.sh, config/kernel/, docs/kernel.md,
.github/workflows/bump-linux.yml, the weekly bump-linux check and linux fetch, the linux pin in
tools/weekly_changes.py, and blog/site entries in context7.json and .gitignore. README points to
both repositories; PORTING marks the kernel step as moved.

1bit OS keeps working unchanged: os/mini/mkimage.sh never used third_party/linux; it takes the
running kernel (or KVER=/VMLINUZ=). Only its comment and os/README.md now say the kernel packages
come from 1bit-MONSTER/kernel. NOTICE keeps the Linux kernel, now under 'Shipped in the 1bit OS
image only (built outside this repository)'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 7: DwarfStar builds on HIP only

Owner, 4 Oct: DwarfStar is full HIP. ONEBIT_DS4 always builds DwarfStar's HIP backend
for gfx1151 (make strix-halo) into build/ds4/hip; the Metal and CPU options are gone
(CUDA went in core strip 4). build-ds4.sh takes only the prefix; weekly.sh's bump test
and package-linux.sh follow the new path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* core strip 8: Windows --device onnx runs Lemonade's ryzenai-server.exe

Owner, 4 Oct: use what Lemonade builds. Lemonade installs ryzenai-server.exe for its
ryzenai-server backend on Windows, so build-windows.sh no longer cross-builds one (nor
fetches Microsoft's ONNX Runtime GenAI / ONNX Runtime zips). 1bit.exe finds it under
$LEMONADE_CACHE_DIR, else %USERPROFILE%\.cache\lemonade, in bin\ryzenai-server\npu, then
on PATH; ONEBIT_ONNX_SERVER still overrides. Lemonade publishes that server for Windows
only, so Linux keeps building it from third_party/ryzenai-server (ONEBIT_ONNX).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* build-ds4.sh: honour CMAKE_BUILD_PARALLEL_LEVEL

DwarfStar's make ran with every core regardless of the caller's job cap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* cmake: -DONEBIT_GPU_PRIVATE builds the private HIP kernels into HRX

ONEBIT_GPU_PRIVATE=<gpu-kernels checkout> (needs ONEBIT_HRX) forwards
GGML_HRX_HIP_ADDON_DIR=<checkout>/addons/hip-hrx to the HRX llama.cpp
external project, which compiles that add-on's kernels and matchers into
ggml-hrx. Configure fails if the checkout has no addons/hip-hrx/kernels
or the llama.cpp pin has no GGML_HRX_HIP_ADDON_DIR hook. Without the
option nothing changes. docs/hrx.md: "Private HIP kernels".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Opus 5.5 <[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