Audio-to-Audio
Moshi
English
contextspan
full-duplex
spoken-dialogue
speech-to-speech
retrieval
retrieval-augmented-generation
tool-calling
context-spanning
personaplex
Instructions to use mindlogicinc/context-spanning-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Moshi
How to use mindlogicinc/context-spanning-7b with Moshi:
# pip install moshi # Run the interactive web server python -m moshi.server --hf-repo "mindlogicinc/context-spanning-7b" # Then open https://localhost:8998 in your browser
# pip install moshi import torch from moshi.models import loaders # Load checkpoint info from HuggingFace checkpoint = loaders.CheckpointInfo.from_hf_repo("mindlogicinc/context-spanning-7b") # Load the Mimi audio codec mimi = checkpoint.get_mimi(device="cuda") mimi.set_num_codebooks(8) # Encode audio (24kHz, mono) wav = torch.randn(1, 1, 24000 * 10) # [batch, channels, samples] with torch.no_grad(): codes = mimi.encode(wav.cuda()) decoded = mimi.decode(codes) - Notebooks
- Google Colab
- Kaggle
Commit ·
9b3801e
0
Parent(s):
Super-squash branch 'main' using huggingface_hub
Browse filesCo-authored-by: jaeho-mindlogic <jaeho-mindlogic@users.noreply.huggingface.co>
- .gitattributes +37 -0
- README.md +219 -0
- assets/figures/architecture.png +3 -0
- assets/figures/context_span.png +3 -0
- context_spanning_7b.pt +3 -0
- voices/f0.pt +3 -0
- voices/f1.pt +3 -0
- voices/f2.pt +3 -0
- voices/f3.pt +3 -0
- voices/m0.pt +3 -0
- voices/m1.pt +3 -0
- voices/m2.pt +3 -0
- voices/m3.pt +3 -0
- voices/seonghyeon.pt +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/figures/architecture.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/figures/context_span.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: nvidia-open-model-license
|
| 4 |
+
license_link: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/
|
| 5 |
+
base_model: nvidia/personaplex-7b-v1
|
| 6 |
+
pipeline_tag: audio-to-audio
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
library_name: contextspan
|
| 10 |
+
# TODO(jaeho): thumbnail: <absolute URL of assets/figures/architecture.png once the repo is public>
|
| 11 |
+
tags:
|
| 12 |
+
- full-duplex
|
| 13 |
+
- spoken-dialogue
|
| 14 |
+
- speech-to-speech
|
| 15 |
+
- retrieval
|
| 16 |
+
- retrieval-augmented-generation
|
| 17 |
+
- tool-calling
|
| 18 |
+
- context-spanning
|
| 19 |
+
- moshi
|
| 20 |
+
- personaplex
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Context Spanning · DuetaSpan-7B
|
| 24 |
+
|
| 25 |
+
> [!Note]
|
| 26 |
+
> This repository holds the **DuetaSpan v7 (step 8000)** weights described in
|
| 27 |
+
> *Context Spanning: A Communication Framework for Full-Duplex Speech Models and External LLM Backends*
|
| 28 |
+
> (Go, Kim, Cha, Shin — Mindlogic, 2026). The inference and training code lives at
|
| 29 |
+
> [mindlogic-ai/ContextSpanning](https://github.com/mindlogic-ai/ContextSpanning); the weights load only
|
| 30 |
+
> through that package.
|
| 31 |
+
|
| 32 |
+
<!-- TODO(seonghyeon): replace XXXX.XXXXX with the arXiv id -->
|
| 33 |
+
[](https://arxiv.org/abs/XXXX.XXXXX) [](https://github.com/mindlogic-ai/ContextSpanning) [](https://huggingface.co/nvidia/personaplex-7b-v1) [](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/) [](https://github.com/mindlogic-ai/ContextSpanning/blob/main/LICENSE)
|
| 34 |
+
|
| 35 |
+
A full-duplex speech model that keeps listening and talking while it calls an external backend. When the
|
| 36 |
+
model emits `<ret>`, the recent user audio is transcribed, a tool router (with an LLM for knowledge
|
| 37 |
+
questions) returns one reference, and that reference is written into the model's own context stream
|
| 38 |
+
**as-is** as a *Context Span* block. The frame clock never waits, and the model reads exact values
|
| 39 |
+
(time, weather, prices, distances) instead of a latent summary.
|
| 40 |
+
|
| 41 |
+
<p align="center">
|
| 42 |
+
<img src="assets/figures/architecture.png" alt="Context Spanning architecture: the full-duplex frontend streams user speech, agent speech and agent text on one timeline; on the ret token the backend runs ASR, an LLM over the Context Memory DB and a tool, and the result is written back into the stream as a Context Span." width="100%">
|
| 43 |
+
</p>
|
| 44 |
+
|
| 45 |
+
<!-- assets/figures/architecture.png is uploaded to this model repo together with the card -->
|
| 46 |
+
|
| 47 |
+
## Highlights
|
| 48 |
+
|
| 49 |
+
- **One primitive for retrieval, tools and memory.** Everything the backend returns comes back through the
|
| 50 |
+
same `<sos> … <eos>` span in the text row, so the model verbalises precise values without information loss.
|
| 51 |
+
- **No stall.** The span is prefilled in a single KV pass after the acoustic delay; the model only updates
|
| 52 |
+
its cache and keeps stepping at the 80 ms frame clock.
|
| 53 |
+
- **Real tools.** The shipped bank is 60 tools whose result is something a voice assistant says — time,
|
| 54 |
+
weather, prices, web search, places and routes, SGD-seeded bookings — plus four MCP servers.
|
| 55 |
+
- **Eight released voices** (`f0`-`f3` female, `m0`-`m3` male) and PersonaPlex-style persona prompts carrying
|
| 56 |
+
the user's name and city.
|
| 57 |
+
|
| 58 |
+
## Files
|
| 59 |
+
|
| 60 |
+
| file | content |
|
| 61 |
+
|---|---|
|
| 62 |
+
| `context_spanning_7b.pt` | `{"model": state_dict}` in bf16, loadable with `main.py infer --checkpoint` or fetched automatically |
|
| 63 |
+
| `voices/{f0,f1,f2,f3,m0,m1,m2,m3}.pt` | voice prompts (`{"codes": LongTensor[8, P]}`, agent-voice Mimi codes; 8 s each) |
|
| 64 |
+
| `assets/figures/` | the paper's figures used by this card |
|
| 65 |
+
|
| 66 |
+
Mimi and the text tokenizer are taken from the PersonaPlex repository at load time; the `moshi` package is
|
| 67 |
+
vendored in the code repository (`contextspan/moshi/`).
|
| 68 |
+
|
| 69 |
+
## Model Overview
|
| 70 |
+
|
| 71 |
+
- Type: full-duplex speech-to-speech model (Moshi architecture, PersonaPlex fork)
|
| 72 |
+
- Base model: [`nvidia/personaplex-7b-v1`](https://huggingface.co/nvidia/personaplex-7b-v1), all trainable parameters fine-tuned
|
| 73 |
+
- Parameters: 7B
|
| 74 |
+
- Audio codec: Mimi, 12.5 Hz, 8 codebooks per channel (user and agent)
|
| 75 |
+
- Frame clock: 80 ms per step
|
| 76 |
+
- Sequence convention: `<ret>` = 4, span open = 12, span close = 13 (`CS_SPAN_CLOSE_ID`; checkpoints trained before 2026-09-08 used 12 on both sides), text pad = 3
|
| 77 |
+
- Training data: `manifest_v6h` — 823,659 dialogues, ~10,009 h indexed; every dialogue passed a frame-level audio QA and a full-text QA
|
| 78 |
+
- Training objective: masked cross-entropy on the text row and on the audio codebooks as in PersonaPlex, with the span and prefix columns masked out
|
| 79 |
+
- Optimisation: 8-bit AdamW, context 3,000 frames, lr 2e-6 (temporal transformer) / 4e-6 (depth transformer), 32 dialogues per update, 4× NVIDIA RTX Pro 6000
|
| 80 |
+
- Released checkpoint: DuetaSpan v7, step 8000 (2026-09-11)
|
| 81 |
+
- Backends the numbers were measured with: router `google/gemma-4-26B-A4B-it` on vLLM, ASR Qwen3-ASR-1.7B
|
| 82 |
+
- Language: English
|
| 83 |
+
|
| 84 |
+
## Benchmark Results
|
| 85 |
+
|
| 86 |
+
Numbers as reported in the paper (Tables 1 and 2). Rows marked † are reprinted from the original benchmark papers
|
| 87 |
+
(Full-Duplex-Bench) or from MoshiRAG (spoken QA and math). Arrows give the direction of better.
|
| 88 |
+
|
| 89 |
+
<!-- TODO(seonghyeon): confirm these are the camera-ready numbers -->
|
| 90 |
+
|
| 91 |
+
<div style="max-width:960px;margin:0 auto">
|
| 92 |
+
<table style="width:100%;border-collapse:collapse;font-size:13px">
|
| 93 |
+
<thead>
|
| 94 |
+
<tr>
|
| 95 |
+
<th style="padding:10px 8px;text-align:left;border-bottom:2px solid #1F65FF;color:#1F65FF">Full-Duplex-Bench</th>
|
| 96 |
+
<th style="padding:10px 8px;text-align:left;border-bottom:2px solid #1F65FF;color:#1F65FF">Metric</th>
|
| 97 |
+
<th style="padding:10px 8px;text-align:center;border-bottom:2px solid #1F65FF;color:#1F65FF;background:rgba(31,101,255,.08)">Ours</th>
|
| 98 |
+
<th style="padding:10px 8px;text-align:center;border-bottom:2px solid #1F65FF;color:#1F65FF">PersonaPlex†</th>
|
| 99 |
+
<th style="padding:10px 8px;text-align:center;border-bottom:2px solid #1F65FF;color:#1F65FF">Moshi†</th>
|
| 100 |
+
<th style="padding:10px 8px;text-align:center;border-bottom:2px solid #1F65FF;color:#1F65FF">Gemini†</th>
|
| 101 |
+
</tr>
|
| 102 |
+
</thead>
|
| 103 |
+
<tbody>
|
| 104 |
+
<tr><td colspan="6" style="padding:8px 12px;font-weight:600;color:#1F65FF;background:rgba(31,101,255,.10);border-bottom:1px solid rgba(31,101,255,.2)">v1 — turn-taking</td></tr>
|
| 105 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Pause Handling</td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">TOR (candor) ↓</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.866</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.431</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.980</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.310</td></tr>
|
| 106 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">TOR (synthetic) ↓</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.956</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.358</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.985</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.255</td></tr>
|
| 107 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Backchannel</td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">TOR ↓</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.673</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.273</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">1.000</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.091</td></tr>
|
| 108 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Freq ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)"><strong>0.184</strong></td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.042</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.001</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.012</td></tr>
|
| 109 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">JSD ↓</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.700</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.662</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.957</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.896</td></tr>
|
| 110 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Smooth Turn-Taking</td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">TOR ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)"><strong>1.000</strong></td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.908</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.941</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.655</td></tr>
|
| 111 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Latency ↓</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)"><strong>0.145</strong></td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.170</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.265</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">1.301</td></tr>
|
| 112 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">User Interruption</td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">TOR ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.970</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.950</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">1.000</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.891</td></tr>
|
| 113 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">GPT-4o score ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">4.17</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">4.290</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.765</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">3.376</td></tr>
|
| 114 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Latency ↓</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.771</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.240</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.257</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">1.183</td></tr>
|
| 115 |
+
<tr><td colspan="6" style="padding:8px 12px;font-weight:600;color:#1F65FF;background:rgba(31,101,255,.10);border-bottom:1px solid rgba(31,101,255,.2)">v3 — tool calling under disfluency</td></tr>
|
| 116 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Tool Use</td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Pass@1 ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)"><strong>0.56</strong></td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.540</td></tr>
|
| 117 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Tool Selection ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)"><strong>0.910</strong></td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.817</td></tr>
|
| 118 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Arg. Accuracy ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)"><strong>0.653</strong></td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.588</td></tr>
|
| 119 |
+
<tr><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)"></td><td style="padding:7px 8px;border-bottom:1px solid rgba(128,128,128,.15)">Resp. Quality ↑</td><td style="padding:7px 8px;text-align:center;background:rgba(31,101,255,.06);border-bottom:1px solid rgba(128,128,128,.15)">0.242</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">–</td><td style="padding:7px 8px;text-align:center;border-bottom:1px solid rgba(128,128,128,.15)">0.718</td></tr>
|
| 120 |
+
</tbody>
|
| 121 |
+
</table>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
**Spoken QA and math reasoning (accuracy, %).** `ref.` = the reference document is provided; `resp.` = the
|
| 125 |
+
model's response. Our router is Gemma 4.
|
| 126 |
+
|
| 127 |
+
| Model | LlamaQ ref. | LlamaQ resp. | WebQ ref. | WebQ resp. | TriviaQA ref. | TriviaQA resp. | HaluEval ref. | HaluEval resp. |
|
| 128 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 129 |
+
| GLM-4-Voice† | | 64.7 | | 32.2 | | 39.1 | | 21.2 |
|
| 130 |
+
| STITCH-S† | | 73.3 | | 50.2 | | 50.0 | | – |
|
| 131 |
+
| MoshiRAG (Gemma 3)† | 83.0 | 80.3 | 71.5 | 67.2 | 73.7 | 69.6 | 42.0 | 36.3 |
|
| 132 |
+
| MoshiRAG (GPT-4.1)† | 87.8 | 80.6 | 77.7 | 68.9 | 86.8 | 78.2 | 61.2 | 51.3 |
|
| 133 |
+
| MoshiRAG (Tavily)† | 84.6 | 78.2 | 73.5 | 66.1 | 84.9 | 77.5 | 54.3 | 47.0 |
|
| 134 |
+
| Vanilla Moshi† | | 62.3 | | 26.6 | | 22.8 | | 10.5 |
|
| 135 |
+
| **Ours (Gemma 4)** | **88.3** | **81.7** | 60.0 | 48.3 | 86.7 | 38.3 | 46.7 | 26.7 |
|
| 136 |
+
|
| 137 |
+
| Model | AddSub ref. | AddSub resp. | MultiArith ref. | MultiArith resp. | SinglEq ref. | SinglEq resp. | SVAMP ref. | SVAMP resp. | GSM8K ref. | GSM8K resp. |
|
| 138 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 139 |
+
| GLM-4-Voice† | | 59.4 | | 62.0 | | 71.0 | | 4.0 | | 29.0 |
|
| 140 |
+
| STITCH-S† | | 81.7 | | 87.9 | | 91.7 | | 72.2 | | 56.7 |
|
| 141 |
+
| MoshiRAG (Gemma 3)† | 76.6 | 61.7 | 87.1 | 69.0 | 83.2 | 68.2 | 74.1 | 55.0 | 66.2 | 33.9 |
|
| 142 |
+
| MoshiRAG (GPT-4.1)† | 87.9 | 64.8 | 87.1 | 76.0 | 89.6 | 72.9 | 80.5 | 61.1 | 70.8 | 43.2 |
|
| 143 |
+
| Vanilla Moshi† | | 8.3 | | 9.8 | | 18.4 | | 9.7 | | 2.1 |
|
| 144 |
+
| **Ours (Gemma 4)** | 75.0 | 50.0 | 65.0 | 55.0 | 65.0 | 55.0 | 60.0 | 25.0 | 35.0 | 30.0 |
|
| 145 |
+
|
| 146 |
+
The step-8000 checkpoint in this repository was measured again after the paper runs on the `semi`
|
| 147 |
+
protocol (120 items per set): HaluEvalAudio resp 0.642 / ref 0.725 / P(resp | ref) 0.851, math word
|
| 148 |
+
problems (40) P(resp | ref) 1.00, `<ret>` rate 0.925. Protocols and scorers:
|
| 149 |
+
[`eval/README.md`](https://github.com/mindlogic-ai/ContextSpanning/blob/main/eval/README.md).
|
| 150 |
+
|
| 151 |
+
## Quickstart
|
| 152 |
+
|
| 153 |
+
The weights load through the `contextspan` package; there is no `transformers` loader.
|
| 154 |
+
|
| 155 |
+
```bash
|
| 156 |
+
git clone https://github.com/mindlogic-ai/ContextSpanning && cd ContextSpanning
|
| 157 |
+
pip install torch --index-url https://download.pytorch.org/whl/cu128
|
| 158 |
+
pip install -e .
|
| 159 |
+
export HF_TOKEN=<token with access to nvidia/personaplex-7b-v1 and this repo>
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
+
Start the two backends (router LLM and ASR; two GPUs by default, one 96 GB GPU with the flags in the
|
| 163 |
+
repo README), then:
|
| 164 |
+
|
| 165 |
+
```bash
|
| 166 |
+
bash scripts/backends.sh start && source scripts/env.sh
|
| 167 |
+
|
| 168 |
+
# a wav through the model; out.wav is stereo, L = user, R = agent
|
| 169 |
+
python main.py infer --input-wav assets/test/question.wav --output-wav out.wav --voice f0 \
|
| 170 |
+
--output-text out.json --user-name Priya --user-city Sydney
|
| 171 |
+
|
| 172 |
+
# live conversation in the browser (microphone needs https or localhost)
|
| 173 |
+
python main.py serve --voice f0 --host 0.0.0.0 --port 8080 --token <value>
|
| 174 |
+
```
|
| 175 |
+
|
| 176 |
+
Any OpenAI-compatible server replaces the router and any `POST /transcribe -> {"text"}` endpoint replaces
|
| 177 |
+
the ASR. Servers, GPU layout, vLLM flags and environment variables:
|
| 178 |
+
[`docs/BACKENDS.md`](https://github.com/mindlogic-ai/ContextSpanning/blob/main/docs/BACKENDS.md).
|
| 179 |
+
|
| 180 |
+
## Intended Use and Limitations
|
| 181 |
+
|
| 182 |
+
- English, spoken conversation with a voice assistant persona. Not trained for other languages.
|
| 183 |
+
- The model's factual accuracy is bounded by the backend: it says what the span says. Run it with a
|
| 184 |
+
router and tools you trust.
|
| 185 |
+
- Context Spans occupy one text token per frame, so long references spend context; see the paper's
|
| 186 |
+
limitations section.
|
| 187 |
+
- Out of scope: text-only use, batch transcription, or any use of the voice prompts to imitate a real
|
| 188 |
+
person. The eight released voices come from volunteers who released their recordings under CC0; do not condition on a real person's voice without
|
| 189 |
+
their consent.
|
| 190 |
+
|
| 191 |
+
## License
|
| 192 |
+
|
| 193 |
+
- **Weights (this repository):** [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/),
|
| 194 |
+
inherited from the PersonaPlex weights they are fine-tuned from. (PersonaPlex was initialised from
|
| 195 |
+
`kyutai/moshiko-pytorch-bf16`, CC-BY-4.0; that attribution is carried, it is not the license of this model.)
|
| 196 |
+
- **Voice prompts** (`voices/*.pt`) are built from CC0 recordings of the [Kyutai Unmute Voice Donation](https://huggingface.co/kyutai/tts-voices)
|
| 197 |
+
project (volunteers who released their voice under CC0; no attribution or consent condition attaches).
|
| 198 |
+
- **Code:** [mindlogic-ai/ContextSpanning](https://github.com/mindlogic-ai/ContextSpanning) is MIT; the
|
| 199 |
+
vendored `contextspan/moshi/` carries Kyutai's own license files.
|
| 200 |
+
<!-- TODO(seonghyeon): decide gated: true / extra_gated_prompt before the repo goes public -->
|
| 201 |
+
|
| 202 |
+
## Citation
|
| 203 |
+
|
| 204 |
+
<!-- TODO(seonghyeon): fill in the arXiv id / venue once known -->
|
| 205 |
+
|
| 206 |
+
```bibtex
|
| 207 |
+
@article{go2026contextspanning,
|
| 208 |
+
title = {Context Spanning: A Communication Framework for Full-Duplex Speech Models and External LLM Backends},
|
| 209 |
+
author = {Go, Seonghyeon and Kim, Yongwoo and Cha, Hyeonjin and Shin, Jaeho},
|
| 210 |
+
journal = {arXiv preprint arXiv:XXXX.XXXXX},
|
| 211 |
+
year = {2026}
|
| 212 |
+
}
|
| 213 |
+
```
|
| 214 |
+
|
| 215 |
+
## Acknowledgements
|
| 216 |
+
|
| 217 |
+
Fine-tuned from [PersonaPlex-7B](https://huggingface.co/nvidia/personaplex-7b-v1) (NVIDIA), which builds
|
| 218 |
+
on [Moshi](https://github.com/kyutai-labs/moshi) and the Mimi codec (Kyutai). Retrieval pipeline, data
|
| 219 |
+
generation and the RAG-suite protocol follow MoshiRAG (Chien et al., 2026).
|
assets/figures/architecture.png
ADDED
|
Git LFS Details
|
assets/figures/context_span.png
ADDED
|
Git LFS Details
|
context_spanning_7b.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32a4dec8ea8feb28d20ce485f0e49a09b118413aaaebdd182379db41cd441fcc
|
| 3 |
+
size 16743028866
|
voices/f0.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6061fbb0f6e4af08d36df931d0e31faa8dcf29e905bbeec98b69867a23c97e7
|
| 3 |
+
size 3014
|
voices/f1.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51e3b550db035f5bf20d96548c48ef813330dff91f97669ee6fcc8039896657d
|
| 3 |
+
size 3014
|
voices/f2.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c9f1e8871ef271aa4b7e4e53e7386bc3e373d290836584f787ffe427a8f9dc9
|
| 3 |
+
size 3014
|
voices/f3.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14a36e14c2187df3779e44c7de59f8fbb348e449d9370be7ebb5e36cf68cfdda
|
| 3 |
+
size 3014
|
voices/m0.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd70fa115dbfec896e5d8984df10da34bb65ef9e254e02d2b5ba616366a4d4c7
|
| 3 |
+
size 3014
|
voices/m1.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44839c4f73c0ef0a3f9abd67e9145f7bfd00089d05f1082654df27ff1a80b48e
|
| 3 |
+
size 3014
|
voices/m2.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef4e75f292940a9c89690921da94940394bd682f27ae35f93c33e636d834de6d
|
| 3 |
+
size 3014
|
voices/m3.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52d5cf5f831f12c08d63b03accd04a8a20dcd57c4454783d8ac803c23f248578
|
| 3 |
+
size 3014
|
voices/seonghyeon.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:83aa916e3ad1b4a8edb38626d2697f6c6c12b25c7ca104bddb36e74e176d442c
|
| 3 |
+
size 3198
|