From 3d04ce81ad9d1e831f9a45b608330e8f365e8829 Mon Sep 17 00:00:00 2001 From: Alexander Miroshnichenko Date: Thu, 12 Nov 2026 21:41:56 +0300 Subject: [PATCH] feat(crucible): Add Strix Halo inference package --- .beads/issues.jsonl | 1 + README.md | 19 +++++ _lib/llm-packages.nix | 3 + packages/crucible-strix-halo/default.nix | 5 ++ packages/crucible-strix-halo/package.nix | 92 ++++++++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 packages/crucible-strix-halo/default.nix create mode 100644 packages/crucible-strix-halo/package.nix diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 263b3e0..8ede3d9 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -16,6 +16,7 @@ {"_type":"issue","id":"nix-overlay-a9m","title":"Fix haivemind startup after MainScreen mount","description":"Restore deferred engine startup while preserving MainScreen widget lookup fix.","status":"closed","priority":1,"issue_type":"bug","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-08-20T11:20:36Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-08-20T11:21:43Z","started_at":"2026-08-20T11:20:43Z","closed_at":"2026-08-20T11:21:43Z","close_reason":"Restored engine startup after MainScreen mount and verified package build.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"nix-overlay-bjd","title":"Add nftables-analyzer CLI package","description":"Add python3Packages.buildPythonApplication derivation for reinaldosaraiva/nftables-analyzer (CLI only). Pin to main commit 5fc78d0c9ce173e3baa80a5655bcadb1b2f78493 (no tags upstream). sourceRoot=source/backend, hatchling build system. Category: Networking. Frontend excluded - upstream repo missing frontend/src/lib modules.","status":"closed","priority":2,"issue_type":"task","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-08-07T04:48:07Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-08-07T04:50:25Z","started_at":"2026-08-07T04:48:10Z","closed_at":"2026-08-07T04:50:25Z","close_reason":"Package added, built, smoke-tested, committed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"nix-overlay-bju","title":"codeaf: build furrow from source instead of embedding the upstream release binary","description":"The codeaf package embeds the upstream Agent-Field/furrow release asset (fetchurl -\u003e cmd/fetch -from -\u003e go:embed). Those bytes are glibc-dynamic and never patched, so the copy codeaf extracts to ~/.codeaf/bin/furrow-0.1.0 dies on NixOS with 'Could not start dynamically linked executable ... stub-ld'. Build furrow (Rust, Apache-2.0, same version as internal/furrowbin/pin.json) from source in this overlay and hand it to codeaf through CODEAF_FURROW, which internal/furrow lookBinary prefers over the embedded copy.","status":"closed","priority":2,"issue_type":"task","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-10-07T07:44:58Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-10-07T08:33:54Z","started_at":"2026-10-07T07:45:20Z","closed_at":"2026-10-07T08:33:54Z","close_reason":"Shipped in ff1fecc0edc4: packages/codeaf/furrow.nix builds furrow 0.1.0 from source, codeaf wraps its binary with CODEAF_FURROW and no longer stages the upstream release asset.","dependency_count":0,"dependent_count":0,"comment_count":0} +{"id":"nix-overlay-bo0","title":"Add crucible-strix-halo package","description":"Package Crucible engine and server for gfx1151, document use, verify build and GPU checks, commit and merge to main.","status":"closed","priority":2,"issue_type":"feature","assignee":"minder","created_at":"2026-11-12T18:32:23.813387090Z","created_by":"minder","updated_at":"2026-11-12T18:41:52.838705822Z","closed_at":"2026-11-12T18:41:52.836329254Z","close_reason":"Completed: Crucible 0.37.0 official gfx1151 release engine packaged with TheRock ROCm 10.0 runtime and matching Python server. Nix build, install/version checks, formatting, and flake evaluation pass. All 36 selected installed API/template/HTTP tests pass; upstream argmax numerical GPU test passes on Radeon 8060S. Full model inference not exercised.","source_repo":"nix-overlay","compaction_level":0,"original_size":0} {"id":"nix-overlay-c5y","title":"chore: update packages to latest upstream versions","description":"Bump all packages in packages/ to their latest upstream release where appropriate; recompute source/npm/cargo hashes and verify builds.","status":"closed","priority":2,"issue_type":"chore","assignee":"minder","created_at":"2026-10-24T08:00:40.304835399Z","created_by":"minder","updated_at":"2026-10-24T11:10:02.842081264Z","closed_at":"2026-10-24T11:10:02.830616733Z","close_reason":"Bumped all stale packages (awg-tool, awgen, codeaf, ds4, freebuff, graphify, hipengine, kubernetes-mcp-server, kyojin, marmel, omniroute, open-code-review, pilotdeck, radar, traycer), removed llama-cpp, and verified every bumped package with nix build; kyojin.tests.jit passes. Remaining packages are already current; freetoken 0.2.0 stays blocked on newer torch (nix-overlay-qcg).","source_repo":"nix-overlay","compaction_level":0,"original_size":0} {"_type":"issue","id":"nix-overlay-du9","title":"Add kyojin package (Yamz-Labs/kyojin, ExLlamaV3 fork for Strix Halo)","description":"Package https://github.com/Yamz-Labs/kyojin: Yamz inference engine, a fork of ExLlamaV3 targeting AMD Strix Halo (gfx1151) on ROCm 7. Build the python package with the ROCm build of torch from nixpkgs and compile the HIP extension for gfx1151.","notes":"re-pinned to release tag v1.3 (latest GitHub release; v1.1 was stale), version = \"1.3\", updateScript uses tags; rebuilt from v1.3 sources, wrappers --help verified","status":"closed","priority":2,"issue_type":"feature","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-10-07T08:44:23Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-10-07T15:14:30Z","started_at":"2026-10-07T08:49:12Z","closed_at":"2026-10-07T15:14:30Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"nix-overlay-dv3","title":"Fix Config screen crash on F2","description":"F2 opens ConfigScreen then Textual raises InvalidSelectValueError because _refresh_aggregator_dropdown assigns Select.BLANK, resolved as False, instead of clearing selection.\\n\\nAcceptance: Config screen opens with saved consensus configuration; regression covers no selected aggregator; targeted tests pass.","status":"closed","priority":1,"issue_type":"bug","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-08-20T11:34:03Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-08-20T11:37:47Z","started_at":"2026-08-20T11:34:07Z","closed_at":"2026-08-20T11:37:47Z","close_reason":"Replaced invalid Select.BLANK handling; built haivemind and verified ConfigScreen headlessly.","dependency_count":0,"dependent_count":0,"comment_count":0} diff --git a/README.md b/README.md index 4d5700b..0aac306 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ A custom Nix overlay and flake providing additional packages not found in upstre | `xrt-amdxdna` | XRT with the amdxdna plugin, built against gufo's nixpkgs | AI Inference | | `therock-rocm` | TheRock 10.0 SDK for gfx1151 | AI Inference | | `strata` | Strata inference engine, API server and CPU vision encoder with ROCm 10 HIP support for gfx1151 | AI Inference | +| `crucible-strix-halo` | Crucible EXL3 inference engine and OpenAI-compatible server for gfx1151 with the ROCm 10 runtime | AI Inference | | `pwilkin-llama-cpp` | pwilkin llama.cpp fork with ROCm for gfx1151 | AI Inference | | `strix-llama-cpp` | halo-box llama.cpp fork with Vulkan | AI Inference | | `loop` | Corporate messenger for your team | Communication | @@ -149,6 +150,24 @@ uses `exe`, `args`, `cwd`, `tokenizer` and `model_name`. Set `exe` to the packag The ROCm 7.14.1 hipBLASLt tuning table from the reference recipe is not enabled with ROCm 10; the engine falls back to hipBLAS when no matching table is supplied. +Crucible ships `crucible-server` (also `nix run .#crucible-strix-halo`) and +`crucible-engine`. It uses upstream's release engine compiled with ROCm 7.2.4, +patched to use this overlay's TheRock ROCm 10.0 runtime. Upstream requires the +7.2.4 compiler for source builds. The Python server comes from the matching tag. +The package targets the Ryzen AI Max+ 395 / Radeon 8060S (`gfx1151`) with 128 GB +RAM. Supply a compatible Qwen3.8-Flash-Next EXL3 pack separately: + +```bash +nix run .#crucible-strix-halo -- /path/to/exl3-pack --ctx 32768 +``` + +Use `--help` for serving options; the default endpoint is `http://127.0.0.1:8790`. +Automatic release checks are disabled by default; update through Nix. The +upstream checkout-management CLI (`setup`, `update`, and service installation) +is not included. Model downloads and conversation state belong outside the Nix +store. See the upstream [setup guide](https://github.com/jaedync/crucible-strix-halo/blob/v0.37.0/docs/QUICKSTART.md) +for GPU memory configuration and model requirements. + ### nftablesbuilder Runtime Notes `nftablesbuilder` is a web interface for managing nftables. It consists of a diff --git a/_lib/llm-packages.nix b/_lib/llm-packages.nix index 851c693..2a61567 100644 --- a/_lib/llm-packages.nix +++ b/_lib/llm-packages.nix @@ -26,6 +26,9 @@ builtins.mapAttrs ) { inherit hipfire therock-rocm gufo; + crucible-strix-halo = pkgs.callPackage ../packages/crucible-strix-halo/package.nix { + therockRocm = therock-rocm; + }; strata = pkgs.callPackage ../packages/strata/package.nix { therockRocm = therock-rocm; }; diff --git a/packages/crucible-strix-halo/default.nix b/packages/crucible-strix-halo/default.nix new file mode 100644 index 0000000..fa33bed --- /dev/null +++ b/packages/crucible-strix-halo/default.nix @@ -0,0 +1,5 @@ +{ pkgs, inputs, ... }: +(import ../../_lib/llm-packages.nix { + inherit inputs; + system = pkgs.stdenv.hostPlatform.system; +}).crucible-strix-halo diff --git a/packages/crucible-strix-halo/package.nix b/packages/crucible-strix-halo/package.nix new file mode 100644 index 0000000..a5e4b78 --- /dev/null +++ b/packages/crucible-strix-halo/package.nix @@ -0,0 +1,92 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchurl, + autoPatchelfHook, + makeWrapper, + python3, + therockRocm, +}: +let + python = python3.withPackages (ps: [ + ps.numpy + ps.jinja2 + ps.tokenizers + ps.pillow + ]); +in +stdenv.mkDerivation (finalAttrs: { + pname = "crucible-strix-halo"; + version = "0.37.0"; + + src = fetchFromGitHub { + owner = "jaedync"; + repo = "crucible-strix-halo"; + tag = "v${finalAttrs.version}"; + hash = "sha256-Uv7/bM0zLc01hciLSdvY9fHJdpSYoOrgSK6WwyWHnWQ="; + }; + + # Upstream requires the ROCm 7.2.4 compiler for source builds, but supports + # running its release engine on ROCm 10. Keep the official gfx1151 code objects. + engine = fetchurl { + url = "https://github.com/jaedync/crucible-strix-halo/releases/download/v${finalAttrs.version}/crucible-engine-v${finalAttrs.version}-gfx1151-rocm7.2-linux-x86_64.gz"; + hash = "sha256-U6P7SRFB86QgXQljvBQwTm8dNFHV5OrPEb/JkxX6Uzo="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + buildInputs = [ + therockRocm + stdenv.cc.cc.lib + ]; + dontBuild = true; + dontStrip = true; + + doCheck = true; + checkPhase = '' + runHook preCheck + ${python}/bin/python -m unittest server.tests.test_api server.tests.test_template + runHook postCheck + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/share/crucible/build/engine + gzip -dc $engine > $out/share/crucible/build/engine/crucible + chmod +x $out/share/crucible/build/engine/crucible + ln -s ../share/crucible/build/engine/crucible $out/bin/crucible-engine + cp -r server $out/share/crucible/ + cp VERSION LICENSE NOTICE $out/share/crucible/ + makeWrapper ${python}/bin/python $out/bin/crucible-server \ + --add-flags "-m server" \ + --prefix PYTHONPATH : $out/share/crucible \ + --set-default CRUCIBLE_NO_UPDATE_CHECK 1 + runHook postInstall + ''; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + $out/bin/crucible-engine --version | grep -Fx 'crucible ${finalAttrs.version}' + $out/bin/crucible-server --version | grep -Fx 'crucible ${finalAttrs.version}' + $out/bin/crucible-server --help > /dev/null + runHook postInstallCheck + ''; + + passthru = { + rocm = therockRocm; + category = "AI Inference"; + }; + + meta = { + description = "Crucible EXL3 inference engine and OpenAI-compatible server for AMD Strix Halo"; + homepage = "https://github.com/jaedync/crucible-strix-halo"; + license = lib.licenses.asl20; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + platforms = [ "x86_64-linux" ]; + mainProgram = "crucible-server"; + }; +})