À propos
Haru : un modèle de dialogue vocal multilingue, à faible latence et en duplex intégral
Autres projetsProgression mesurée des étoiles
- in 24h
- +95
- in 7 days
- +287
- in 15 days
- +390
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalHaru
Haru is a low-latency and multilingual full-duplex spoken dialogue model: it listens and speaks at the same time, the way people do on a phone call. This repository contains the inference code for Haru-4B, a pretrained base model, and Haru-122B-A10B-Preview, a mixture-of-experts model with 10B active parameters (also as NVFP4 and GGUF), continually pretrained from Qwen3.5-122B-A10B and fine-tuned for stability, with four implementations and a web demo.
- Native full-duplex at 7.5 Hz. Every 133 ms the model takes one frame of the user's audio and produces one frame of its own audio and text. User audio, model audio and model text are summed into a single position of the language model, so listening and speaking never wait for each other.
- Continuous audio, one sampling step. Audio is a 64-dimensional latent per frame. A small MLP head with MeanFlow sampling produces it in one step from the language model's hidden state; there is no separate audio transformer and there are no discrete audio tokens.
- Character and voice control. A text card sets the character, a short reference clip sets the voice.
- Multilingual. English, Spanish, Portuguese, German, French, Chinese, Japanese, Russian and Korean.
Release
- 🔥 2026-12-03: Haru-122B-A10B-Preview is out! Haru-122B-A10B-Preview a mixture-of-experts model, also as NVFP4 for a Blackwell GPU and GGUF for llama.cpp with the experts in host memory; see Haru-122B to run it.
- 🎉 2026-11-13: Haru-4B is out! Haru-4B, with the code in this repository.
How it works
- The text stream carries the model's words in chunks. Frames without text hold a padding token, and an end-of-padding token on the frame before the model starts to speak.
- The audio codec is the causal VibeVoice acoustic tokenizer: 24 kHz audio to and from one latent per 3200 samples.
- The prompt is the character card as a system turn, followed by the voice reference as audio on the model's stream.
Repository
| Directory | What it is |
|---|---|
haru/ |
PyTorch implementation, web demo server, offline inference |
haru_mlx/ |
MLX implementation for Apple silicon, with a native macOS app |
haru_vllm/ |
Plugin that serves Haru with vLLM-Omni |
haru_llama/ |
Haru-122B with its language model in llama.cpp, the experts in host memory |
client/ |
Web client of the demo (React); a built copy ships inside haru |
haru, haru_mlx and haru_vllm read the same checkpoint,
higurashi-ai/Haru-4B.
haru, haru_vllm and haru_llama run Haru-122B, see Haru-122B.
Haru-4B is also supported outside this repository:
| Project | What it offers |
|---|---|
| vLLM-Omni | Built in since 0.34.0, no plugin needed: vllm serve higurashi-ai/Haru-4B --omni |
| mlx-audio | Apple silicon, as one of its speech-to-speech models |
| speech.cpp | C++ with a GGUF conversion, sakasegawa/Haru-4B-GGUF |
Quick start
Haru-4B, with an NVIDIA GPU of about 12 GB (for Haru-122B, see Haru-122B):
pip install -e ./haru
python -m haru.server --hf-repo higurashi-ai/Haru-4B
Open http://localhost:8998, pick a character, give the model a voice, and
talk. A browser only gives a page microphone access on localhost or over
HTTPS.
For low latency, we recommend wired headphones and a wired microphone. Bluetooth devices add 100 ms or more.
To let someone else try it, add --share (pip install -e "./haru[share]"): the
server prints a public HTTPS link that tunnels to it. Anyone with the link can
use the demo, and the traffic passes through Gradio's share servers.
Bring your own voice. Haru ships without voice clips. In the demo, upload
or record a clip of the voice the model should speak with: one speaker, 3
seconds to 3 minutes, clean speech. In Python, pass it as reference. Only
use voices you have the right to use.
To give the demo a default voice, save a clip as
haru/haru/assets/voices/<language>.flac (en.flac, ja.flac, ...) and
restart the server: the demo then offers it as the default voice of that
language. Without the file, the demo does not show the option.
On a Mac with Apple silicon, build the native app (see
haru_mlx/swift):
cd haru_mlx
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
cd swift && ./build_app.sh # then open build/Haru.app
Python
from haru import DuplexSession, HaruModel
from haru.audio import load_audio, prepare_reference
model = HaruModel.from_pretrained("higurashi-ai/Haru-4B")
voice = prepare_reference(load_audio("voice.wav"))
session = DuplexSession(model, system_prompt=card, reference=voice)
frame = session.start() # the model's first 133 ms: frame.audio, frame.text
while not frame.done:
frame = session.step(user_audio) # 3200 samples at 24 kHz in, 3200 out
The model is one frame ahead of the user: start() returns frame 0, and each
step() with user frame k returns model frame k + 1.
The system prompt
Haru reads its character from a card with a fixed layout. Build one with render_card:
from haru.prompt import card_templates, render_card
card = render_card(
{
"persona": "Haru is a 29-year-old nurse in Denver. She is warm, chatty and laughs easily.",
"name": "Haru",
"gender": "female",
"other_name": "Sam",
"relationship": "Old friends from high school.",
"situation": "A phone call to catch up after a long time.",
},
card_templates()["templates"]["en"],
)
How Haru behaves depends a lot on the card and on the voice reference: who speaks first, how much it talks, how quickly it responds and how it sounds all change with them. If a conversation does not go the way you want, try another persona or situation, or a different reference clip.
Offline
haru-inference user.wav reply.wav --reference voice.wav --system-prompt "$(cat card.txt)" --stereo
Haru-122B
Haru-122B-A10B-Preview has a mixture-of-experts backbone (122B parameters, 10B active per token) and comes in three forms. Pick the one that fits your machine:
| Checkpoint | Memory | Runs with |
|---|---|---|
Haru-122B-A10B-Preview (bfloat16) |
about 250 GB of GPU memory: one GPU such as a B300, or several | haru_vllm (tensor parallelism over several GPUs), haru (--device auto, not real time) |
Haru-122B-A10B-Preview-NVFP4 |
one Blackwell GPU (RTX PRO 6000, B200, B300, DGX Spark (GB10)) | haru_vllm |
Haru-122B-A10B-Preview-GGUF |
NVFP4: about 20 GiB of GPU memory (CUDA, e.g. RTX 4090) and 64 GB of RAM; IQ2_S-IQ4_XS: about 14 GiB and 48 GB | haru_llama: llama.cpp with the experts in host memory |
# NVFP4 on one Blackwell GPU
pip install -e ./haru -e ./haru_vllm
vllm serve higurashi-ai/Haru-122B-A10B-Preview-NVFP4 --omni --deploy-config "$(python -m haru_vllm.deploy haru_122b_nvfp4)"
python -m haru.server --backend vllm --vllm-url http://localhost:8000
# GGUF on a smaller GPU
pip install -e ./haru -e ./haru_llama
python -m haru_llama.build
haru-llama-server # --quant IQ2_S-IQ4_XS for the smaller build
The GGUF setup was tested on an RTX 4090 (24 GB) with 64 GB of RAM, with the
default settings of haru_llama.
haru_mlx does not support Haru-122B.
Serving with vLLM-Omni
For many concurrent conversations and the lowest latency on a GPU server, see
haru_vllm/. The web demo can use it as its engine:
python -m haru.server --backend vllm --vllm-url http://localhost:8000
Custom kernels
The hot paths of a frame have hand-written kernels, alongside plain implementations that give the same results:
| Where | Kernel | What it speeds up |
|---|---|---|
haru (NVIDIA GPUs) |
Triton kernels replayed from CUDA graphs (haru/haru/codec_triton) |
The audio codec: about 0.7 ms instead of 6 ms to encode or decode a frame. Opt-in with DuplexConfig(codec_backend="triton") or --codec-backend triton |
haru_vllm |
The same Triton codec, used automatically | Audio encode and decode inside the engine step |
haru_mlx (Apple silicon) |
Metal kernels (gated_delta.py, vibevoice_codec.py) |
The Gated DeltaNet recurrence of the language model and the depthwise convolutions of the codec |
Limitations
Haru-4B is a pretrained base model and Haru-122B-A10B-Preview a continually pretrained and fine-tuned preview, both released for research. They hold a natural conversation, but they are not a reliable source of facts and do not follow instructions the way an assistant does. They can imitate the voice of a reference clip; only use voices you have the right to use.
License
The code and the Haru-4B and Haru-122B-A10B-Preview weights are released under
the Apache License 2.0.
See THIRD_PARTY_NOTICES.md for the third-party work
they include.
Acknowledgments
Haru builds on the work of many open-source projects. We are grateful to their authors and communities.
- Qwen — the Qwen3.5 language models that Haru-4B and Haru-122B-A10B-Preview start from.
- VibeVoice — the causal acoustic tokenizer Haru uses as its audio codec, and the idea of next-latent generation at 7.5 Hz.
- Moshi — the pioneering full-duplex speech model. Our web client is derived from the Moshi web client.
- Improved MeanFlow — the one-step generative modeling framework behind the audio head.
- vLLM and
vLLM-Omni — the serving engine
and its full-duplex realtime framework, which
haru_vllmplugs into. - llama.cpp — the inference engine
haru_llamaruns the Haru-122B language model in. - MLX,
mlx-lm and
mlx-audio — the array framework and
the model code
haru_mlxbuilds on.
Explorer des projets similaires
Chargement…