Repository navigation
Zyphra BlackMamba on Vulkan - #118
Conversation
third_party/llama.cpp-vulkan -> 1bit/vulkan-upstream f6261222 (ee6e4e0d + one commit of ours): model: BlackMamba (Zyphra/BlackMamba-1.5B, -2.8B). Mamba-1 layers alternate with a Switch MoE (router with bias -> sigmoid -> top-1, scaled by its probability; gated erf-GELU experts); RMSNorm per layer, a biased LayerNorm at the end, output tied. The converter reads the Megatron-style checkpoint and uses the built-in GPT-NeoX vocab. BlackMamba-1.5B on Strix Halo: teacher-forced top-1 vs Zyphra's own PyTorch code (FP32, CPU) 96/96, identical greedy text and prompt tokens; Q8_0 pp256 10136, tg64 369 tok/s. registry: BlackMambaForCausalLM -> vulkan. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Docs7 for 1bit-monster/engine
Commit |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
…s 449a809e (#13: v_f16 ABI + f16-V read fixes) Fixes this PR's first hw-gate run (ops 618/649, Coder-30B HTTP 500). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ily (#480) * serve: the placement report covers every graph, not just the warmup --placement-report passed GGML_HRX_REPORT=1, and the backend's 1 is the first graph only, so serve printed a clean report for a model that leaves nodes on the CPU in later graphs: the 20 Oct census found LFM2 --parallel 4 (20 nodes, 5 splits) and ZAYA1-8B (1-3 nodes) reading "all nodes on HRX". Ask for every graph (2), keep the worst one instead of the last, and print serve's line again whenever a graph is worse than every graph before it, with the graph count. --strict-device reads the same worst graph. Without --placement-report serve keeps 1, so no log volume is added by default. tests/hrx_placement_test.cpp covers a clean warmup followed by a par4 graph and a later clean graph. Co-Authored-By: Claude Opus 5 <[email protected]> * serve: --strict-device reads the report it needs --strict-device only passed GGML_HRX_STRICT=1 to the backend. It did not pass GGML_HRX_REPORT=2 and it did not add the -lv 4 that lets llama-server's log level carry the placement report through, so the graph that would have been refused was never reported and serve fell through to "the backend printed no placement line" while starting normally. Both flags are now treated the same way: GGML_HRX_REPORT=2 and -lv 4 whenever either is set, so the refusal reads the same worst graph that --placement-report prints. Found on device: `1bit serve ... --strict-device --parallel 4` (LFM2-1.2B) answered requests instead of refusing, with that "no placement line" message in its log. Co-Authored-By: Claude Opus 5.5 <[email protected]> * serve: --parallel on qwen35 / qwen35moe / qwen3next These architectures were refused with "--parallel on --device hrx does not run <arch> yet (no multi-sequence gated delta-net on HRX)". That was true when the HRX gated-delta-net matchers held kMaximumSequences 3; they hold 8 now (llama.cpp 1bit/hrx-gdn-multi-sequence), and a four-sequence run keeps every node on the device. Measured on Qwen3.8-27B UD-Q4_K_XL, `--parallel 4`, four concurrent chats: 4 of 4 answered, placement "all 3655 nodes on HRX, 1 graph splits", zero error lines. The forced `-np 1` for these architectures when --parallel is not given stays: llama-server's own default opens several slots, and that is a different question from the explicit flag. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Pin llama.cpp cefbfc07 (fork #117, G9) and gpu-kernels 421d7a4e (G7 #11, G8 #12); --parallel on qwen35 family Co-Authored-By: Claude Opus 5.5 <[email protected]> * registry: regenerated at llama.cpp cefbfc07 Co-Authored-By: Claude Opus 5.5 <[email protected]> * Pin llama.cpp dcf8c1ec (fork #118: narrower GDN claim) and gpu-kernels 449a809e (#13: v_f16 ABI + f16-V read fixes) Fixes this PR's first hw-gate run (ops 618/649, Coder-30B HTTP 500). Co-Authored-By: Claude Opus 5.5 <[email protected]> * registry: regenerated at llama.cpp dcf8c1ec Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: bcloud <bcloud@localhost> Co-authored-by: Claude Opus 5 <[email protected]> Co-authored-by: bcloud <[email protected]> Co-authored-by: bong-water-water-bong <[email protected]>
…ad (#2944) engine's pin was 280f2e003733 -- the #116 revert -- whose parent de5b280493 added the IQ1_S kernels from gpu-kernels#118. Those kernels register names the compiled code object does not contain, and the add-on refuses to load AT ALL for every model: hip kernel kqt_mm_iq1s_t16 (kquant_tokens_q8, gfx1151): the code object has no kernel of that name 1 HIP kernel registration(s) do not match their compiled code objects; every launch would fail reachable from create_tensor -> select_weight_buft -> device_supports, i.e. before any inference. gpu-kernels#121 fixes it ("the IQ1_S dispatch names only the kernels that exist") and merged as bc3051d5e9c6; this moves the pin to it. Verified: 'git merge-base --is-ancestor 280f2e0037 bc3051d5e9c6' is true, so this is a forward move and 'Submodule pins only move forward' is satisfied; the dispatch source now carries 6 IQ1 mentions against a code object that names them, which is the property #118's review did not check. Nothing else is staged: one line in one config file. Co-authored-by: phyb5 <bcloud@local>
…te a fresh kernel set (engine#3237) (#3265) The decode gate merged into npu-dx twice today -- `addons/npu-dx/scripts/decode-gate.sh` (#117, the check itself plus its hardening) and the `layer1.py` row-tile padding fix with the `tpc 6` golden rows (#118) -- and **neither is reachable from the release path**, because the engine still pins `3949f18e`. Measured on the tree, not assumed: a real `scripts/fetch-private.sh` run of the current config produced an `addons/` checkout with `npu-dx/scripts/build-kernels.sh` and **no `decode-gate.sh`**, i.e. `release-kernels.sh` in that tree is the pre-gate version and a weekly build that missed the kernel cache would again ship a set nobody decoded. So this is the same lag I filed against a fork pin this morning (engine#3192), on this lane's own work: merged upstream, inert downstream until the pin moves. config/npu-kernels.config: sha=3949f18e826e99a84ec5e6e2e3041300215ddb61 -> 4e6261b7df9f4326a72fd1d8efef449b9ab24518 require=CMakeLists.txt register.cpp release-kernels.sh -> … release-kernels.sh npu-dx/scripts/decode-gate.sh The delta carries exactly the four files this issue needed: `decode-gate.sh` (+112), `addons/release-kernels.sh` (+35, the call and the cache/verdict hardening), `npu_dx/designs/layer1.py` (+5/-1, the per-phase padding) and `tests/golden/dx_layout_perm.tsv` (+2, the tpc 6 rows). The `require=` addition is the part that keeps this true: the gate lives under `addons/`, and a pin that loses it would otherwise fetch a tree whose release simply has no gate. Verified both ways with the engine's own fetch: current config + this pin fetch rc 0, addons/npu-dx/scripts/decode-gate.sh PRESENT (6663 B), addons/release-kernels.sh carries 5 decode-gate references require= with a bad path fetch rc 1, naming the missing file Refs engine#3237. Co-authored-by: bong-water-water-bong <[email protected]>
Next step of Zyphra-family support.
third_party/llama.cpp-vulkan→1bit/vulkan-upstreamf6261222(the currentee6e4e0d+ one commit of ours): model: BlackMamba (Zyphra/BlackMamba-1.5B, -2.8B), our code insrc/models/blackmamba.cpp/conversion/blackmamba.py.ggml_geglu_erf_split; the config saysswiglubut the activation isF.gelu).{"model": state_dict}, config.json withoutarchitectures), soconversion/base.pyroutes onmamba_moe_layers(next to the existingssm_cfgcase) and the converter uses the built-in GPT-NeoX vocab.Registry:
BlackMambaForCausalLM → vulkan. It is a base model, so there is no registry_check row (that check asks a chat question).🤖 Generated with Claude Code