ThinkSpark-4.4M — ultra-lightweight multilingual "thinking-sound" predictor
4,445,809 parameters (~4.4M). Smaller than a JPEG. A byte-level dual-encoder
that predicts the human backchannel / thinking sound a voice agent should murmur
in the gap between the user's speech (STT) and the agent's reply (TTS) —
hmm, अच्छा, એક સેકન્ડ, ええと — in the right language, native script,
register and emotion.
No GPU at inference. 2–8 ms on CPU. 259-row byte vocab, zero OOV across
every script. Ships as ONNX into the Kupe voice worker (thinking_sounds.mode = "auto").
What it predicts
Given the user's current utterance (input, primary) + the past conversation (context, any language/mix), it outputs:
- language (22): hi, mr, bn, gu, pa, ta, te, kn, ml, or, as, ur, hi_en, en, es, fr, de, pt, ja, zh, ar, ru
- intent — 9 agent super-reactions: thinking, clarify, acknowledge, disagree, react_positive, empathize, soothe, impatient, silence
- register, emotion, filler_type (
sound / word / sound_word / words / none)
A curated filler dictionary then samples the actual spoken spark for
(language, intent, filler_type) — or silence when the model says no_filler.
Test metrics
| metric | value |
|---|---|
| intent acc / top-2 / macro-F1 | 0.440 / 0.640 / 0.340 |
| language acc | 0.967 |
| emotion / filler_type acc | 0.444 / 0.536 |
Usage
from huggingface_hub import snapshot_download
from thinkspark.infer import ThinkSparkPredictor
local = snapshot_download("anuj-inavlabs/ThinkSpark-4.4M")
pred = ThinkSparkPredictor(local, f"{local}/filler_dictionary.json")
pred.predict(
input_text="अरे यार फिर से वही दिक्कत",
context="User: रिफंड नहीं आया\nAgent: sir I am checking\nUser: कितनी बार बोलूँ",
)
# -> {'spark': 'माफ़ कीजिए', 'intent': 'soothe', 'language': 'hi', ...}
Architecture
Byte tokenizer (UTF-8, vocab 259) → input encoder (5 layers, d=192) + context encoder (3 layers) → input cross-attends into context (input = query, context = key/value) → 5 heads. Trained with focal loss + class-balancing; native-script language is pinned by a script guard at inference.
Generated by kupe-thinkspark; data via Sarvam. Native-speaker QA recommended for urban/code-mixed and low-resource fillers.