Views
No views yet
mamba_moe_layers pattern — every other layer is a pure Mamba1 SSM block, the rest are pure MoE SwiGLU FFN blocks (never both in the same layer). 30 layers, hidden size 1152, 8 experts per MoE layer.scripts/blackmamba_to_gguf.py (standalone BlackMamba → GGUF converter, since no upstream GGUF export exists for this architecture) shipped with three genuine correctness bugs, caught by cross-checking a new CPU reference tool (tools/blackmamba_cpu_reference.cpp) against a real PyTorch forward pass using the official reference implementation (github.com/Zyphra/BlackMamba):nibble - 8 = value, not value & 0xF) — this silently scrambled nearly every quantized weight matrix in the model. The shared reader's own code has a comment noting this exact bug pattern already bit this codebase once before in different code..reshape() misuse — reshape reinterprets a flat buffer with new dimensions, it does not transpose; the wrong target shape silently scrambled which (channel, kernel-tap) pair each value belonged to.| Prompt | Prompt len | Prefill | Decode | Spread |
|---|---|---|---|---|
| Short | 2 | 24.4 ms/tok | 42.7 tok/s | 42.6–46.4 |
| Medium | 10 | 23.7 ms/tok | 42.8 tok/s | 42.6–42.8 |
| Long | 30 | 23.5 ms/tok | 42.4 tok/s | 42.2–42.5 |
tools/blackmamba_cpu_reference.cpp, F32, scalar, single-threaded, reading this repo's GGUF directly. Median of 3 runs, 60-token decode:engine/npu/'s npu_engine_universal/onebp_loader.cpp has no Mamba/SSM support, and the Mamba1 GPU kernels that do exist (src/mamba1_engine.hip) aren't wired into any build target or loader that understands this checkpoint's MoE-expert tensor layout. Until that's built, the only way to actually run this model in this repo is the reference implementation used to produce the numbers above:1git clone https://github.com/bong-water-water-bong/1bit-systems
2cd 1bit-systems
3g++ -std=c++23 -O2 -Iinclude -Isrc tools/blackmamba_cpu_reference.cpp src/gguf_reader.cpp -o blackmamba_cpu_reference
4# Note: reads the GGUF directly (F32 dequant), not this repo's .1bp file --
5# the 1BP loader doesn't have Mamba support wired in yet either.
6python3 scripts/blackmamba_to_gguf.py Zyphra/BlackMamba-1.5B blackmamba-1.5b.gguf
7./blackmamba_cpu_reference blackmamba-1.5b.gguf 20