Haru-4B GGUF (Quantized)
This repository provides GGUF quantized weights and extracted FP16 audio modules for higurashi-ai/Haru-4B, the open-weight continuous full-duplex spoken dialogue foundation model.
🚀 1-Click Interactive Google Colab Notebook
Try out this quantized release directly on a free Google Colab T4 GPU:
👉 Open Haru_4B_Colab_Kaggle.ipynb in Colab
🔬 Model Architecture & Quantization Strategy
Haru-4B is a full-duplex Listening-while-Speaking Language Model (LSLM) operating at 7.5 Hz (133.33 ms frame budget).
To enable CPU and low-VRAM deployment without compromising voice fidelity, this release applies a hybrid quantization approach:
- Language Model Backbone:
Qwen3.5-4Bextracted and quantized to GGUF Q4_K_M (compressed from 8.4 GB down to 2.6 GB, 67.5% memory reduction). - Audio Codec (VibeVoice): Preserved in FP16 (~1.3 GB) to maintain causal convolution acoustic fidelity and avoid metallic static artifacts.
- Audio Generation Head (MeanFlow): Preserved in FP16 (~694 MB) for smooth 1-step continuous ODE velocity trajectory prediction.
📦 Repository Contents
| File | Format | Size | Description |
|---|---|---|---|
qwen-haru-q4_k_m.gguf | GGUF Q4_K_M | 2.6 GB | 4-bit medium quantized Qwen3.5 language model backbone |
vibevoice-codec-f16.safetensors | Safetensors FP16 | 1.3 GB | Causal 1D convolution VibeVoice acoustic tokenizer |
meanflow-head-f16.safetensors | Safetensors FP16 | 694 MB | 4-layer 1-step MeanFlow ODE audio generation head |
config.json | JSON | ~2 KB | Model hyperparameter configuration (Qwen3_5ForCausalLM) |
tokenizer.json | JSON | ~20 MB | Qwen tokenizer vocabulary (248,320 tokens) |
Haru_4B_Colab_Kaggle.ipynb | Jupyter Notebook | ~8 KB | Turnkey Colab/Kaggle notebook to test GGUF & launch voice portal |
🛠️ How We Quantized It: Step-by-Step Engineering Process
1. Component Slicing & Memory Mapping
Haru's monolithic model.safetensors was sliced using safetensors.safe_open:
- All
lm.*tensors were extracted intomodel.*to construct a standardQwen3_5ForCausalLM. - Handled tied word embeddings: Set
"tie_word_embeddings": trueand omitted duplicatelm_head.weightto prevent memory duplication errors. - Extracted
codec.*intovibevoice-codec-f16.safetensorsandhead.*intomeanflow-head-f16.safetensors.
2. Base GGUF Conversion (convert_hf_to_gguf.py)
Converted the standalone Qwen3.5 backbone using llama.cpp with --no-mtp:
python llama.cpp/convert_hf_to_gguf.py extracted_backbone --outfile qwen-haru-bf16.gguf --no-mtp
Generated a 7.94 GB BF16 base GGUF file containing 291 layers.
3. 4-Bit Quantization (llama-quantize)
Applied 4-bit medium k-quantization:
llama-quantize qwen-haru-bf16.gguf qwen-haru-q4_k_m.gguf Q4_K_M
Compressed the model from 8.02 GB to 2.60 GB (3.08× smaller).
4. Verification & Benchmarking (llama-cli)
- AMD EPYC CPU (4 Dedicated Cores): Verified CPU inference at 8.4 tokens/second.
- NVIDIA Tesla T4 GPU (Colab): Verified GPU inference at 68.2 tokens/second (
-ngl 99offloads all 32 layers).
💻 Usage Instructions
Run via llama.cpp (CLI)
# 1. Download the 2.6 GB model
huggingface-cli download Jayanth-MKV/Haru-4B-GGUF qwen-haru-q4_k_m.gguf --local-dir .
# 2. Run on CPU (4 threads)
./llama-cli -m qwen-haru-q4_k_m.gguf -p "Hello! Let's talk." -n 64 -t 4
# 3. Run on GPU (-ngl 99 offloads all 32 layers)
./llama-cli -m qwen-haru-q4_k_m.gguf -p "Hello! Let's talk." -n 128 -ngl 99
Run via Python (llama-cpp-python)
from llama_cpp import Llama
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="Jayanth-MKV/Haru-4B-GGUF", filename="qwen-haru-q4_k_m.gguf")
llm = Llama(model_path=model_path, n_gpu_layers=-1, n_ctx=2048)
output = llm("Hello! How are you doing today?", max_tokens=128)
print(output["choices"][0]["text"])
📜 Citation & Credits
Original foundation model and continuous speech architecture created by higurashi-ai:
- Official Repository: github.com/higurashi-ai/Haru
- Base Model: higurashi-ai/Haru-4B
- Engineering & Quantization Toolkit: github.com/jayanth-mkv/ai_collaborations
- License: Apache-2.0