Downloads · 30 days
8
11% of all-time downloads
tidelganesh/svara-tts-v1-bf16
svara-tts-v1-bf16 is a text-to-speech model from tidelganesh. Use it when you need text read aloud. The card lists the license as mit.
bf16 re-upload of kenpath/svara-tts-v1. Weights cast from the original fp32/fp16 checkpoint to bfloat16; no quantization-aware training, no calibration. Quality is lossless relative to the upstream model.
Downloads · 30 days
8
11% of all-time downloads
All-time downloads
76
Public
Parameters
3.3B
6.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.6 GB · 100%
From the Hugging Face model README
bf16 re-upload of kenpath/svara-tts-v1. Weights cast from the original fp32/fp16 checkpoint to bfloat16; no quantization-aware training, no calibration. Quality is lossless relative to the upstream model.
| fp32 (upstream) | bf16 (this repo) | |
|---|---|---|
| VRAM | ~32 GB | ~16 GB |
| Throughput vs fp32 | 1.0× | ~1.8–2.2× on Ampere/Ada/Hopper |
| Quality | baseline | indistinguishable |
| Bitsandbytes / calibration | n/a | not required |
bf16 is the sweet spot for serving TTS on a single 24 GB+ GPU. If you need to push VRAM further, see the int8 sister repo.
| GPU | bf16 fit | Notes |
|---|---|---|
| A100 40/80 GB | ✅ comfortable | best throughput |
| A40 48 GB | ✅ very comfortable | plenty of headroom for concurrency |
| L4 24 GB | ✅ tight | use attn_implementation="flash_attention_2" |
| RTX 4090 24 GB | ✅ tight | same |
| T4 16 GB | ❌ | use int8 instead |
| RTX 3090 24 GB | ⚠️ | may OOM on long contexts; use int8 |
Software: CUDA ≥ 11.8, PyTorch ≥ 2.3, transformers >= 4.45, accelerate, flash-attn (strongly recommended).
import torch
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained(
"tidelganesh/svara-tts-v1-bf16",
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="cuda",
attn_implementation="flash_attention_2",
)
tokenizer = AutoTokenizer.from_pretrained(
"tidelganesh/svara-tts-v1-bf16",
trust_remote_code=True,
)
trust_remote_code=True is required because the upstream model ships custom modeling code in modeling_svara.py.
This repo is intended to back a self-hosted Svara-TTS FastAPI server. Point the server's model loader at this repo instead of the upstream one:
- model = AutoModel.from_pretrained("kenpath/svara-tts-v1", trust_remote_code=True)
+ model = AutoModel.from_pretrained(
+ "tidelganesh/svara-tts-v1-bf16",
+ trust_remote_code=True,
+ torch_dtype=torch.bfloat16,
+ device_map="cuda",
+ attn_implementation="flash_attention_2",
+ )
Server contract (POST /v1/text-to-speech, 24 kHz PCM16 mono) is unchanged.
pip install -U "transformers>=4.45" accelerate "huggingface_hub[cli]" hf_transfer
pip install -U flash-attn --no-build-isolation
export HF_HUB_ENABLE_HF_TRANSFER=1
huggingface-cli login
export HF_TOKEN=hf_xxx...
python backend/quantize_and_push_svara.py # ~10–20 min on A40
python backend/verify_svara_bf16.py # round-trip check
The script:
kenpath/svara-tts-v1 in bf16 with Flash-Attention 2.safe_serialization=True (safetensors) sharded at 2 GB.tokenizer / preprocessor / *.py files so trust_remote_code still works.model.push_to_hub + tokenizer.push_to_hub to this repo.kenpath/svara-tts-v1 updates its modeling_svara.py, this repo must be re-pushed.kenpath/svara-tts-v1transformers, accelerate, bitsandbytes (not used for this repo), huggingface_hub, flash-attntidelganesh/svara-tts-v1-bnb-8bit — bitsandbytes int8 weights (~50% of bf16 VRAM, minimal quality loss on TTS, listen-test before production).Inherits the upstream license. Please refer to kenpath/svara-tts-v1 for terms.