🟒 Stock-Compatible: Works out-of-the-box in LM Studio / Ollama / stock llama.cpp β€” The 2.68 GiB language backbone (Kenzan-Haru-4B-PinGrid-M6-16G.gguf, qwen35 standard Q4_K_M/Q6_K/Q8_0) works out-of-the-box; the continuous MeanFlow + VibeVoice audio engine runs via audio_engine/haru_audio_loader.py (PyTorch MPS/CUDA).

Kenzan-Haru-4B-PinGrid-GGUF

Kenzan-Haru-4B-PinGrid-GGUF

β˜• Support Local AI Development: Help me acquire a Mac mini 24GB/32GB to optimize and test local MoE models up to 80B parameters. Donate via Ko-fi β†’

Kenzan-Haru-4B-PinGrid β€” "275.76x Outliers Tamed, One-Step MeanFlow Intact, 3.80 GiB Total on a 16 GB Mac mini." Dissected autonomously by Kenzan-Surgeon-27B across 1,022 tensors: we separated the 32-layer hybrid GatedDeltaNet + GQA language backbone (2.68 GiB GGUF) from the 1-Step MeanFlow + 24 kHz VibeVoice continuous audio engine (1.12 GiB W8A16/BF16), pinned the OR = 93.93 anchor query and tied 248K embeddings, and slashed WikiText-2 Perplexity by -2.48 points (-14.3%) over naive Q4_K_M while cruising at 1,376 t/s prompt ingest and 39.2 t/s generation on Apple M6.


Model Summary

Kenzan-Haru-4B-PinGrid (3.80 GiB Split-Engine Bundle: 2.68 GiB GGUF LM + 1.12 GiB PinGrid Audio Engine) β€” Surgical mixed-precision compression of higurashi-ai/Haru-4B (5.27B parameters, 10.54 GB BF16 across 1,022 tensors) engineered for Apple Silicon 16 GB Unified Memory (Mac mini M6).

Unlike stock BF16 (9.83 GiB), which triggers Metal kIOGPUCommandBufferCallbackErrorOutOfMemory during autoregressive generation on a 16 GB Mac mini due to its massive 248,320-vocab tied logit head (1.27 GB) and 24 recurrent GatedDeltaNet state buffers, Kenzan-Haru-4B-PinGrid compresses the entire multimodal system by $2.62\times$ down to 3.80 GiB while protecting every single extreme outlier tensor identified by our autonomous Kenzan-Surgeon-27B profiler.


1. Model Overview & Kenzan Pin-Grid Architecture

1.1. Dissecting higurashi-ai/Haru-4B (1,022 Tensors, 5.27B Params)

Full-tensor streaming analysis (haru_4b_analysis.json / MODEL_PASSPORT.md) revealed four distinct subsystems with vastly different quantization physics:

| Subsystem | Tensors | Params | BF16 Size | Max Outlier Ratio ($\text{OR} = \max|W|/\text{RMS}$) | Kenzan Target Format | Compressed Size | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | | lm.* (qwen3_5_text Backbone) | 426 | 4.21B (79.8%) | 7.85 GiB | 93.93 (blk.3.attn_q) | PinGrid GGUF (5.45 bpw) | 2.68 GiB | | codec.* (VibeVoice 24 kHz Codec) | 552 | 687.4M (13.0%) | 1.28 GiB | 62.82 | Hybrid BF16 Stems + W8A16 Conv | 0.72 GiB | | head.* (1-Step MeanFlow ODE) | 32 | 363.4M (6.9%) | 0.68 GiB | 275.76 (t_embed.fc2 / ada) | BF16 (ada/embed/final) + W8A16 (ffn) | 0.38 GiB | | user/model_audio_proj.* + Latents | 12 | 13.5M (0.3%) | 0.03 GiB | 82.35 (model_audio_proj.fc2) | Exact BF16 | 0.025 GiB | | Total Multimodal Complex | 1,022 | 5.27B (100%) | 9.84 GiB | 275.76 | Split-Engine PinGrid | 3.805 GiB |

1.2. Language Backbone Pin-Grid (Kenzan-Haru-4B-PinGrid-M6-16G.gguf)

The 32-layer qwen3_5_text backbone uses an interleaved [linear_attention Γ— 3, full_attention Γ— 1] Γ— 8 architecture (24 GatedDeltaNet recurrent layers + 8 GQA 16:4 full-attention layers at indices 3, 7, 11, 15, 19, 23, 27, 31 with interleaved mrope). Naive 4-bit quantization (Q4_K_M) severely degrades perplexity (17.3480) due to three structural bottlenecks that our PinGrid recipe surgically anchors:

  1. Tied 248K Vocabulary & Logit Classifier (token_embd.weight $[2560, 248320]$ $\to$ Q6_K): Because tie_word_embeddings = true, token_embd.weight simultaneously acts as the output lm_head. Crushing it to Q4_K corrupts all 248,320 logit dot products (including speech control tokens 248044..248076). Anchoring token_embd.weight in Q6_K preserves logit phase geometry.
  2. First Full-Attention Anchor (blk.3.attn_q.weight $\to$ Q8_0, attn_k/v $\to$ Q6_K): Layer 3 is the first global Softmax attention layer following three GatedDeltaNet recurrent layers (0, 1, 2) and exhibits the highest outlier ratio in the entire language model ($\text{OR} = 93.93$, $\max |W| = 21.50$). We pin blk.3.attn_q.weight in Q8_0, all 8 layers' attn_k and attn_v in Q6_K, tail layer blk.31.attn_q/output in Q6_K, and remaining attn_q/output in Q5_K.
  3. GatedDeltaNet Recurrent Gates & Output Projections (ssm_alpha/beta $\to$ Q8_0, ssm_out $\to$ Q8_0/Q6_K): In the GatedDeltaNet state update $\mathbf{S}t = \alpha_t \mathbf{S}{t-1}(\mathbf{I} - \beta_t \mathbf{k}_t \mathbf{k}_t^\top) + \beta_t \mathbf{v}_t \mathbf{k}_t^\top$, A_log, dt_bias, conv1d, and ssm_norm stay in exact F32, ssm_alpha (in_proj_a) and ssm_beta (in_proj_b) are pinned in Q8_0, and ssm_out (out_proj, reaching $\text{OR} = 82.69$ on blk.0 and $71.91$ on blk.1) is pinned in Q8_0 (blk.0, 1) and Q6_K (blk.2..30).
  4. Tail SwiGLU Down-Projections (ffn_down $\to$ Q8_0/Q6_K): Layers 28 ($\text{OR} = 80.88$) and 31 ($\text{OR} = 87.95$) are pinned in Q8_0, while high-outlier layers 0, 21, 22, 23, 24, 25, 26, 27, 29, 30 ($\text{OR} \in [48.8, 77.4]$) are anchored in Q6_K.

1.3. Continuous Audio Engine (audio_engine/Kenzan-Haru-4B-Audio-PinGrid.safetensors)

Because Haru-4B synthesizes 24 kHz speech via a 1-Step MeanFlow ODE generator (num_steps = 1) coupled with the VibeVoice continuous acoustic codec ($3200\times$ upsampling, $7.5\text{ Hz}$ frame rate, $\text{latent_dim} = 64$), there are zero iterative denoising steps to average out quantization error:

  • All 493 sensitive tensors β€” including head.t_embed.* ($\text{OR} = 275.76$), head.h_embed.* ($\text{OR} = 143.54$), head.omega_embed.* ($\text{OR} = 134.96$), head.layers.0..3.ada.weight ($\text{OR} = 89.95..129.57$), head.final.*, user_audio_proj.* ($\text{OR} = 72.25$), model_audio_proj.* ($\text{OR} = 82.35$), and codec stems/norms β€” are preserved in exact native BF16.
  • The 103 heavy internal matrices/convolutions (head.layers.*.ffn.* and internal codec.* stages) are compressed to per-channel symmetric W8A16 (INT8 weights + BF16 scales) achieving a verified 38.73 dB mean SQNR (32.61 dB min SQNR) and shrinking the audio engine from 2.13 GB to 1.12 GiB.

2. Verified Benchmarks (Apple Silicon Mac mini M6, 16 GB Unified Memory)

Evaluated using /Users/agent/bonsai/llama-clover (build ed26f2f, Apple Metal4 + SME2) on wt2_holdout_128k.txt (-c 1024 -b 256 -ub 256 --chunks 8 -ngl 99 -fa on) and llama-bench (-p 512 -n 128 -ngl 99 -fa on):

Model Variant LM GGUF Size Total Multimodal Footprint Prompt Processing (pp512) Token Generation (tg128) WikiText-2 Holdout Perplexity (PPL) 16 GB Mac mini M6 Status
higurashi-ai/Haru-4B (Stock BF16) 7.85 GiB 9.84 GiB 1,321.06 ± 1.99 t/s OOM (Metal Status 5) OOM on 1024-ctx eval ❌ Crashes on tg in 16 GB RAM
Haru-4B-LM (Naive Q4_K_M, unpinned) 2.52 GiB 4.51 GiB 1,384.10 t/s 41.69 t/s 17.3480 ± 0.76551 ⚠️ Severe logit/outlier degradation
Kenzan-Haru-4B-PinGrid-M6-16G (Ours) 2.68 GiB 3.80 GiB 1,376.46 t/s 39.18 t/s 14.8695 Β± 0.64803 (-2.48 PPL / -14.3%) βœ… Rock-solid inside 16 GB RAM

3. Repository Contents

  • Kenzan-Haru-4B-PinGrid-M6-16G.gguf (2.68 GiB) β€” PinGrid-quantized 32-layer Qwen3.5 hybrid language backbone (general.architecture = qwen35).
  • haru4b_imatrix.gguf (7.26 MB) β€” Calibration importance matrix across all 248 linear/attention/MLP weight tensors.
  • audio_engine/Kenzan-Haru-4B-Audio-PinGrid.safetensors (1.12 GiB) β€” PinGrid-compressed MeanFlow 1-step audio head + VibeVoice 24 kHz codec + audio projections (38.73 dB mean SQNR).
  • audio_engine/haru_audio_loader.py β€” Zero-dependency PyTorch (mps/cuda/cpu) loader that transparently dequantizes W8A16 tensors on load.
  • audio_engine/audio_pingrid_manifest.json β€” Compression and SQNR telemetry for the audio engine.
  • recipes/tensor_types_haru_pingrid.txt β€” Exact --tensor-type regex recipe used for llama-quantize.
  • MODEL_PASSPORT.md & MODEL_PASSPORT.json β€” Autonomous structural inspection passport generated by Kenzan-Surgeon-27B.

4. Quick Start & Recommended Deployment (Apple Silicon 16 GB)

1. Download the Split-Engine Release

huggingface-cli download kabcnd/Kenzan-Haru-4B-PinGrid-GGUF \
  Kenzan-Haru-4B-PinGrid-M6-16G.gguf \
  audio_engine/Kenzan-Haru-4B-Audio-PinGrid.safetensors \
  audio_engine/haru_audio_loader.py \
  --local-dir ./Kenzan-Haru-4B-PinGrid

2. Launch the Qwen3.5 Hybrid Language Backbone (llama-server)

Requires a llama.cpp build with QWEN35 (gated_delta_net) support (such as llama-clover or recent upstream llama.cpp):

llama-server \
  -m ./Kenzan-Haru-4B-PinGrid/Kenzan-Haru-4B-PinGrid-M6-16G.gguf \
  --host 127.0.0.1 --port 11442 \
  -ngl 99 --no-host -fa on \
  -c 32768 --cache-type-k q8_0 --cache-type-v q8_0 \
  -np 1 -b 512 -ub 512 -t 4 \
  --jinja --metrics \
  --temp 0.60 --top-p 0.95 --top-k 40 --min-p 0.05 \
  --repeat-penalty 1.05 \
  --alias kenzan-haru:4b

3. Load the Continuous Audio Engine (MeanFlow + VibeVoice) in Python (Apple Metal mps)

import torch
from audio_engine.haru_audio_loader import load_haru_audio_engine

audio_state_dict = load_haru_audio_engine(
    "./Kenzan-Haru-4B-PinGrid/audio_engine/Kenzan-Haru-4B-Audio-PinGrid.safetensors",
    device="mps",
    dtype=torch.bfloat16,
)
print(f"Loaded {len(audio_state_dict)} audio engine tensors on Apple Metal (MPS)!")

Acknowledgements & Inspiration

  • Inspired by Bonsai-2 & Prism ML: Deep gratitude and inspiration go to the creators of Bonsai-2 at Prism ML (huggingface.co/prism-ml) for pioneering ternary quantization (PTQ1_0/PQ2_0), blockwise Hadamard phase stabilization, and proving that frontier-class models can thrive on consumer unified memory.
  • Special Thanks to Misha: Sincere gratitude to Misha for unwavering support and financial assistance, which made the hardware testing, autonomous Kenzan-Surgeon-27B harness runs, calibration sweeps, and open-weights releases in the Kenzan series possible.
  • Base Model & Ecosystem: Built upon higurashi-ai/Haru-4B and the open-source llama.cpp Metal ecosystem.

Support the Project & Funding Goals

All Kenzan weights, calibration recipes, Metal patches, and kenzan_router.py tooling are released openly and free of charge for the local AI community. If this model saved you cloud API costs or helped you run multimodal and reasoning models locally on a base Mac, please consider supporting future releases:

β˜• Donate via Ko-fi β†’

What Your Donations Directly Fund

  1. Upgrading to a Mac mini 24 GB / 32 GB (Apple Silicon): Breaking past the 16 GB ceiling to quantize, calibrate, and benchmark 70B–80B ternary-hybrid MoE and multimodal models with wider pin grids at 70–100+ t/s.
  2. Cloud GPU Compute for I-Matrix & Calibration Sweeps: Covering cloud VRAM hours needed for full-precision importance-matrix (imatrix) generation, leave-one-out (LOO) layer sensitivity sweeps, and multi-corpus perplexity verification.
  3. Open-Source Metal Kernels & Autonomous Surgeon Tooling: Funding continued development of fused Metal kernels, llama.cpp patches, and the autonomous Kenzan-Surgeon model-engineering harness for the local-first community.
Downloads last month
497
GGUF
Model size
4B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for kabcnd/Kenzan-Haru-4B-PinGrid-GGUF

Quantized
(9)
this model

Collection including kabcnd/Kenzan-Haru-4B-PinGrid-GGUF