Skip to content

DwarfStar (antirez/ds4) as a backend: 1bit serve --device ds4 - #111

Merged
bong-water-water-bong merged 1 commit into
mainfrom
dwarfstar
Sep 26, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
dwarfstar

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

DwarfStar (MIT) is a native engine for a few large MoE models (DeepSeek V4/V4.1 Flash, GLM 5.x Flash, Qwen3.8-Flash-Next) in its own GGUF layouts, with first-class Strix Halo ROCm support and SSD expert streaming. Its GGUFs are the most downloaded DeepSeek V4.1 Flash files on HF (antirez/deepseek-v4.1-flash-gguf, 940k), and llama.cpp cannot load them. This adds it as a child backend, like ZINC.

  • third_party/ds4: antirez/ds4 0aaea5a238fb; bump-ds4.yml follows upstream main daily.
  • scripts/build-ds4.sh: builds a copy of the tree (the submodule stays clean) for rocm / cuda / metal / cpu. ROCm finds TheRock's SDK and passes its include/ with -isystem (clang otherwise searches it after /usr/include, where a distro HIP of another version shadows it). DS4_TEST=1 runs DwarfStar's model-free routed-MoE GPU test.
  • -DONEBIT_DS4=ON; 1bit serve --device ds4 with --ctx-size, --ssd-streaming, --ds4 PATH. A child now carries its own readiness path: ds4-server has no /health and opens its port once the model is loaded, so serve waits on /v1/models.
  • docs/dwarfstar.md; serve.md, README (repo XDNA: pin upstream amd/xdna-driver (and its XRT), build it privately, keep it current #12) and NOTICE.

Verified on Strix Halo (TheRock ROCm):

Check Result
DS4_TEST=1 scripts/build-ds4.sh build/ds4 rocm builds; routed-MoE MXFP4 test PASS (0 failures; variants bitwise OK); submodule clean
engine -DONEBIT_DS4=ON builds; ctest 7/7
serve --device ds4 -m <missing> DwarfStar's "cannot open model", then serve exits (backend did not become ready)
--ssd-streaming on another device refused

Not yet run: a full model. DeepSeek V4 Flash Q2 is 81 GiB on disk and needs about that much free memory; the box has 89 GB of disk and ~60 GB of memory free while other work runs. Hold the merge until it answers a chat through serve --device ds4.

🤖 Generated with Claude Code

DwarfStar is a native engine for a few large MoE models (DeepSeek V4/V4.1
Flash, GLM 5.x Flash, Qwen3.8-Flash-Next) in its own GGUF layouts, with
first-class Strix Halo ROCm support and SSD expert streaming. It runs as a
child of 1bit serve, like ZINC.

- third_party/ds4 pins antirez/ds4 0aaea5a238fb (MIT); bump-ds4.yml follows
  upstream main daily.
- scripts/build-ds4.sh builds a copy of the tree (the submodule stays clean)
  for rocm, cuda, metal or cpu. For ROCm it finds TheRock's SDK and passes its
  include/ with -isystem: clang otherwise searches it after /usr/include, where
  a distro HIP of another version shadows it. DS4_TEST=1 runs DwarfStar's
  model-free routed-MoE GPU test.
- ONEBIT_DS4 builds it; serve --device ds4 starts ds4-server (--ctx-size,
  --ssd-streaming, --ds4 PATH). A child now carries its own readiness path:
  ds4-server has no /health and opens its port once the model is loaded, so
  serve waits on its /v1/models.
- docs/dwarfstar.md; serve.md, README and NOTICE updated.

Verified on Strix Halo (TheRock ROCm): builds, routed-MoE test PASS, engine
ctest 7/7, the missing-model and --ssd-streaming error paths. A full model
(DeepSeek V4 Flash Q2, 81 GiB) is still to run: no room on the box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@context7

context7 Bot commented Sep 26, 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 1a9ca1d

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

12 - Partially compliant

Compliant requirements:

  • Pin the XDNA userspace stack to upstream amd/xdna-driver with commit 5d302c9
  • Build XRT and the XDNA shim plugin privately under a prefix
  • Exclude XRT's OpenCL layer (xocl) from the build
  • Use the build with -DONEBIT_XRT_ROOT=/root for the NPU lane
  • Keep the pin current with a daily job that opens a PR when upstream moves
  • Update docs/npu.md with a section on "The XDNA stack"

Non-compliant requirements:

  • None

Requires further human verification:

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

Incorrect ready path for ds4

The ds4 device uses /v1/models as its ready path, but this path may not be consistently available or correctly indicate model readiness across different versions of the ds4-server. This could lead to incorrect startup behavior or premature readiness signaling.

l.ready_path = "/v1/models";
Missing validation for ds4 model file

The code does not validate that the model file specified for the ds4 device actually exists or is a valid DwarfStar GGUF file before attempting to launch the ds4-server. This could lead to runtime errors or unexpected behavior if an invalid model is specified.

argv = {o.ds4.empty() ? default_ds4() : o.ds4, "-m", o.model,

@bong-water-water-bong
bong-water-water-bong enabled auto-merge (squash) September 26, 2026 02:25
@bong-water-water-bong
bong-water-water-bong merged commit 53d74ce into main Sep 26, 2026
5 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the dwarfstar branch September 26, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant