MisoTTS 8B, int4 + int8, for fast-misotts

MisoLabs/MisoTTS with its two transformer stacks stored in low-bit weights, for fast-misotts: the backbone in 4 bits (groups of 128, with AWQ), the depth decoder in 8 bits (a scale a row); the embeddings, norms, heads and the projection between the stacks in BF16. 5.8 GB, against 16.4 GB in BF16 and 33 GB in the original's FP32, and loaded as it is stored: the BF16 weights are never held (5.5 GiB of GPU memory once loaded, in 3 s).

Use

pip install git+https://github.com/JonnesLin/fast-misotts
import soundfile as sf
from fast_misotts import MisoTTS

tts = MisoTTS("JonesLin/misotts-8b-int4-int8w", batch=1, compile="autotune")
audio = tts.generate("Hey, did you catch the game last night?", speaker=0)
sf.write("hey.wav", audio.numpy(), tts.sample_rate)  # 24 kHz

for piece in tts.stream("And this one streams while it is made.", chunk_frames=2):
    ...  # 80 ms frames, two at a time

As with the original, the text tokenizer is Llama 3.2's, from the gated meta-llama/Llama-3.2-1B (accept its license and log in once, or pass tokenizer= a folder with its tokenizer.json), and the audio codec is Kyutai's Mimi, which moshi downloads.

Quality and speed

Next-code distributions against BF16's: KL(BF16 || this) in nats, teacher-forced on the codes BF16 samples for fast-misotts's 64 benchmark sentences (python -m fast_misotts.bench kl), for codebook 0 (the backbone's) and codebooks 1-31 (the depth decoder's). Speed: one utterance at a time with compile="autotune", Mimi's decoding included, as a multiple of the original Generator's (0.50x real time on an L40S, 0.435x on an H200):

KL, codebook 0 / 1-31 L40S H200
The original Generator (BF16) 1x 1x
MisoTTS in BF16 with fast-misotts 0 / 0 2.7x 9.6x
this checkpoint with fast-misotts 0.036 / 0.025 5.8x 10x
MisoTTS with 8-bit weights and inputs everywhere (int8) 0.013 / 0.027 3.2x
MisoTTS with 4-bit weights everywhere, rounded to nearest 0.044 / 0.491 7.3x

(MisoTTS in BF16 on the L40S, and the int8 and int4 rows, with compile=True.)

  • It moves the model's distributions about as much as 8-bit weights do, at 2.2 times BF16's speed on an L40S. On an H200 one utterance at a time waits on kernels more than on memory, so it gains 4% over BF16 there.
  • Streaming in pieces of 2 frames: the first audio after 0.08 s on an L40S (the original speaks only once it has the whole utterance: about 7 s for a 3.5 s sentence).
  • Whisper large-v3 hears no difference: on 192 utterances (the 64 sentences, three seeds) its word error rate differs from BF16's by about as much as the original's does.

How it was made

From MisoLabs/MisoTTS at revision ef6b096 (its FP32 weights rounded to BF16) with fast-misotts:

python -m fast_misotts.awq --out awq.safetensors
python -m fast_misotts.quant --quantize int4:backbone+int8w:decoder --awq awq.safetensors --out model.safetensors

AWQ (activation-aware weight quantization, AutoAWQ's recipe for Llama layers) on the backbone: input-channel scales folded into the norms and Linears before them, then each group of 128 weights clipped, both searched on the model's own inputs while it speaks 128 calibration sentences (fast_misotts/calibration_texts.json). Then the backbone's Linears rounded to 4 bits in groups of 128 (a scale and a zero point each, for PyTorch's tinygemm kernel) and the depth decoder's to 8 bits a row; q, k and v, and w1 and w3, are stored fused, one product each.

The file holds each quantized Linear's codes (*.int4: two codes a byte; *.scales_and_zeros; *.int8, *.scale) and every other tensor under the original's names; fast-misotts packs the 4-bit codes for the GPU as it loads them.

License

The weights are Miso Labs' (Kamino Learning, Inc.), quantized here, under MisoTTS's Modified MIT License (LICENSE): MIT, plus Miso Labs' condition that a commercial product or service with more than 50 million monthly active users or more than 10 million US dollars of monthly revenue display "Miso Labs" on its user interface. MisoTTS follows Sesame's CSM architecture; Mimi is Kyutai's codec; the tokenizer is Meta's Llama 3.2, under the Llama 3.2 Community License.

Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
5B params
Tensor type
BF16
路
I8
路
U8
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for JonesLin/misotts-8b-int4-int8w

Base model

MisoLabs/MisoTTS
Quantized
(2)
this model