VAULT-PRIMAL-VITS-29M (16.52 MB 4-Bit Prime-Harmonic & 8.75 MB 2-Bit 1D-CNN Speech Model)

End-to-end VITS (29.04M active inference parameters β€” 87.5% 1D Dilated Conv1d WaveNet Normalizing Flow + 9.2% ConvTranspose1d HiFi-GAN Vocoder) compressed 7.03x to 16.52 MB (V3_P4_0) and 13.27x to 8.75 MB (V3_Q2_0 + PRIMAL)!

  • Requires ZERO exotic libraries: Uses only standard Hugging Face transformers (VitsModel, VitsTokenizer), torch, safetensors, and soundfile β€” packages almost every AI developer already has installed!
  • True cold-start compression: Builds the VitsModel skeleton from config.json and loads ONLY the 16.52 MB or 8.75 MB .safetensors file β€” never downloads Meta's 145 MB FP32 checkpoint.
  • Works everywhere: Runs natively on NVIDIA CUDA, AMD ROCm, Apple Silicon (mps), and CPU.

Listen First (Side-by-Side Audio Samples)

Prompt: "Hello! This is a full text to speech quantization benchmark running locally on consumer hardware." (16 kHz)

Checkpoint True File Size Compression Play Sample
Upstream FP32 (facebook/mms-tts-eng) 116.14 MB 1.00x Download .wav
Standard Uniform Q4_0 Baseline 16.52 MB 7.03x Download .wav
vits_v3_p4_0.safetensors (Recommended) 16.52 MB 7.03x Download .wav
vits_v3_q2_0_primal.safetensors (Extreme 2-Bit) 8.75 MB 13.27x Download .wav

Which Checkpoint Should I Pick?

Variant Flag File in Repo Size Best For
--variant p4_0 (Default) vits_v3_p4_0.safetensors 16.52 MB Daily / Clean Speech Use: Matches FP32 Character Error Rate (7.20% CER) and beats standard uniform Q4_0 at the exact same byte size (-10.4% lower Log-Mel spectral distortion: 4.097 dB vs 4.573 dB)!
--variant q2_0 vits_v3_q2_0_primal.safetensors 8.75 MB 2-Bit Edge Research Showcase: Raw 2-bit VITS collapses into 145.2% WER unintelligible gibberish; 120 steps of Multi-Resolution STFT PRIMAL rescued -121.5 percentage points of WER (23.73% WER, -9.40 dB spectral recovery) inside 8.75 MB (audible vocoder grain, intelligible words).

60-Second Quickstart (Copy & Paste)

Option A β€” 1-Command CLI (Only Standard transformers + torch Needed!)

pip install torch transformers safetensors soundfile huggingface_hub numpy
git clone https://huggingface.co/batteryphil/VAULT-PRIMAL-VITS-29M
cd VAULT-PRIMAL-VITS-29M

# 1. Speak with the clean 16.52 MB 4-bit Prime-Harmonic CNN model:
python infer.py "Prime harmonic quantization places finer resolution near zero while capturing heavy filter outliers." -o vits_p4.wav

# 2. Test the extreme 8.75 MB 2-bit PRIMAL-healed model:
python infer.py "Discrete integer optimization rescued two-bit VITS from total gibberish!" --variant q2_0 -o vits_q2.wav

Option B β€” 4-Line Python API (Auto-Downloads 16.52 MB Directly From Hugging Face)

import importlib.util
from huggingface_hub import hf_hub_download

spec = importlib.util.spec_from_file_location(
    "vault_tts", hf_hub_download("batteryphil/VAULT-PRIMAL-VITS-29M", "vault_tts.py")
)
vault_tts = importlib.util.module_from_spec(spec); spec.loader.exec_module(vault_tts)

tts = vault_tts.load_vits(variant="p4_0")  # 16.52 MB (or "q2_0" for 8.75 MB!)
tts.speak("Hello! Running quantized VITS with standard Hugging Face transformers.", out_path="hello_vits.wav")

Objective Benchmark Results (Pure 1D-CNN / Flow / HiFi-GAN Test)

Evaluated across 12 held-out spoken prompts (177 words total, 0 overlap with the 24 calibration sentences) using openai/whisper-small.en round-trip ASR:

Variant Active Size Eff. bpw Whisper WER % $\downarrow$ Whisper CER % $\downarrow$ Log-Mel Dist (dB) $\downarrow$ STFT Spectral Conv. $\downarrow$
Upstream FP32 (facebook/mms-tts-eng, weight_norm folded) 116.14 MB 32.00 14.69% 7.20% 0.000 0.0000
Standard Uniform Q4_0 PTQ 16.52 MB 4.55 12.99% 7.56% 4.573 1.0830
V3_P4_0 Prime-Harmonic LUT (4-bit) 16.52 MB 4.55 12.99% 7.20% 4.097 (-10.4% err) 1.0435
V3_Q2_0 2-Bit Raw PTQ (Before PRIMAL) 8.75 MB 2.41 145.20% (Gibberish) 107.56% 15.594 1.0014
V3_Q2_0 + Multi-Res STFT PRIMAL (2-bit) 8.75 MB 2.41 23.73% (-121.5%!) 12.60% 6.199 (-9.40 dB!) 1.0004

Why V3_P4_0 Beats Uniform Q4_0 on 1D CNNs & Flows

  1. Offline weight_norm Folding + Training-Only posterior_encoder Pruning: Stock VITS wraps nearly every Conv1d in WaveNet Normalizing Flows and every ConvTranspose1d in the HiFi-GAN decoder inside dynamic weight_norm(g, v) parametrizations, plus ships a posterior_encoder used only during training. Folding w = g * v / ||v|| offline and dropping posterior_encoder isolates the 29.04M active inference parameters (99.55% quantized).
  2. Leptokurtic Dilated Conv1d Kernels: WaveNet dilated residual convolutions (dilation = 1, 2, 4, ...) concentrate dense tap weights near zero alongside sharp center-tap outliers. At identical 18 bytes / 32 weights (4.50 bpw), V3_P4_0's Prime-Harmonic non-linear grid reduces Log-Mel spectral distortion by 10.4% compared to uniform Q4_0.
  3. 2-Bit Multi-Resolution STFT PRIMAL Healing: Keeping the tiny stochastic duration_predictor in V3_P4_0 and training the remaining Conv1d / ConvTranspose1d / Linear blocks directly in 2-bit V3_Q2_0 under Multi-Resolution STFT (FFT = {256, 512, 1024, 2048}) + latent flow L1 supervision (0 shadow weights) rescues speech intelligibility from complete collapse (145.2% -> 23.7% WER).

Cache-Resident CPU Inference (device="cpu")

On CPU (python infer.py "..." --device cpu), vault_tts.py builds a torch.device("meta") skeleton (0.23s cold start) and runs vault_cpu_engine.py + vault_tts_cpu.c (AVX2 bit-packed WaveNet/Transformer + shared-activation in-place VitsHifiGan), keeping the entire model inside CPU L3 cache (0.0 waveform numerical drift vs. unpacked FP32):

Checkpoint Disk Size Live CPU RAM (vs 116.1 MB FP32) Cold Load CPU Synth Speed (Intel Xeon 6136) Speedup vs Unpacked CPU
vits_v3_p4_0.safetensors 16.63 MB 19.07 MB (6.09x less β€” 100% in L3!) 0.23s (3.4x faster) 14.25x Real-Time (0.447s / 6.4s audio) +29% faster
vits_v3_q2_0_primal.safetensors 8.86 MB 11.49 MB (10.11x less β€” 100% in L3!) 0.24s (3.8x faster) 14.50x Real-Time (0.454s / 6.6s audio) +42% faster

Companion VAULT + PRIMAL Releases


License

  • Upstream Base Weights (facebook/mms-tts-eng): CC-BY-NC-4.0 (Meta AI β€” Non-Commercial research/personal use).
  • VAULT + PRIMAL Code, Loader & Codec: Free (0%) for individuals & non-commercial use; 5% profit share for commercial entities when applied to commercially-licensed base checkpoints (see LICENSE and NOTICE).
Downloads last month
36
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for batteryphil/VAULT-PRIMAL-VITS-29M

Finetuned
(6)
this model