Gepard Hindi voice catalog
This repository stores one shared Hindi Gepard base checkpoint and LoRA voice adapters, including two Anjana repair/DPO variants. The page is visible; model downloads require owner approval through Hugging Face's manual gate. The models are custom Gepard checkpoints, not a stock Transformers text-to-speech pipeline.
| Voice | Adapter | Source run | SFT learning rate | Epoch |
|---|---|---|---|---|
| Rekha | adapters/rekha | finance persona (payal3) | 5e-6 | 6 |
| Jaya | adapters/jaya | finance persona (sanskriti) | 5e-6 | 6 |
| Annie | adapters/annie | Rea (rea2_part1) | 2e-4 | 6 |
| Shikha | adapters/shikha | Anjana (anjana1) | 2e-4 | 6 |
base/model.safetensors contains the shared Hindi model. Each adapters/<voice>/adapter.safetensors contains only LoRA A/B weights; metadata.json records its training settings, and speaker_reference.npz supplies codec tokens for one example voice reference. For Annie and Shikha, cloning_reference.wav is the original 16 kHz mono source recording used by VoxCPM2 to synthesize their training speech (Rea rea2_part1 for Annie; Anjana anjana1 for Shikha). These WAVs are for listening and cloning provenance; the Gepard inference example below uses the separate codec-token reference. The original four adapters remain alternatives on the shared base. The new anjana_dpo is the documented exception: it requires anjana_new first, plus its trained stop-head replacement. catalog.json is the machine-readable index. The Anjana incremental DPO adapter and its trained stop head are now included; full merged voice weights are not duplicated.
Load a voice
Install the dependencies described in gepard-runtime.tar.gz and its README.md. RUNTIME_LICENSE and RUNTIME_NOTICE cover that runtime; NVIDIA codec weights must be obtained separately. Once the runtime and codec are available:
from pathlib import Path
import numpy as np
import torch
import soundfile as sf
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from gepard.inference import GepardRunner
from gepard.inference.codec_wrapper import UnfoldedCodecModel
from gepard.model.lora import inject_lora, load_lora_state_dict
voice = "annie" # "shikha", "rekha", or "jaya"
root = Path(snapshot_download("routsourav1729/gepard-hindi-1.0"))
runner = GepardRunner.from_checkpoint(str(root / "base"), device="cuda")
inject_lora(runner.model.model, ["q_proj", "k_proj", "v_proj", "o_proj"],
rank=16, alpha=32, dropout=0.0, last_n_layers=14)
adapter = load_file(str(root / "adapters" / voice / "adapter.safetensors"), device="cpu")
load_lora_state_dict(runner.model, adapter)
runner.model.eval()
with np.load(root / "adapters" / voice / "speaker_reference.npz", allow_pickle=False) as data:
reference = torch.from_numpy(data["ref_codes"]).long().cuda()
codec = UnfoldedCodecModel.from_pretrained(
"nvidia/nemo-nano-codec-22khz-1.89kbps-21.5fps").cuda().eval()
with torch.inference_mode():
codes = runner.generate("आपकी एस आई पी अगले महीने शुरू होगी।", ref_codes=reference,
temperature=0.4, cfg_scale=1.25, top_k=0,
max_frames=600, use_null_reference=False)
wav, lengths = codec.decode_from_codes(
codes.unsqueeze(0), torch.tensor([codes.shape[1]], device="cuda"))
audio = wav[0, :int(lengths[0])].float().cpu().numpy()
audio *= min(1.0, 0.98 / max(float(np.max(np.abs(audio))), 1e-8))
sf.write("speech.wav", audio, 22050)
The base and adapters use the project's custom LoRA format. LoRA rank is 16, alpha 32, and the adapters target Q/K/V/O projections in the last 14 backbone layers. Training dropout was 0.05; inference uses 0.0. Speaker references contain codec tokens, not source WAV files. Output sample rate is 22,050 Hz.
These are experimental synthetic-voice adaptations. Normalize numbers and abbreviations to the intended spoken wording before generation; reject capped, incomplete, or incorrect output. Automated speech scores alone do not establish naturalness or financial-content correctness. The voice labels are aliases and do not assert a real speaker's identity.
Anjana repaired SFT and DPO handoff (2026-10-28)
- SFT:
adapters/anjana_new= shared Hindi base → repaired-v3 SFT. - DPO challenger:
adapters/anjana_dpo= shared Hindi base →anjana_new→ incremental DPO LoRA and stop-head replacement. Applying DPO to the bare base is incorrect. - Both new variants use CFG1 / temperature0.3 and text repetition disabled, matching their training and benchmark. Do not use the older generic example's settings to reproduce their results.
- Assemble either with
assemble_anjana.py. ReadANJANA_HANDOFF.mdfor loading commands, data, hyperparameters, all completed sweep/repetition results, benchmark limitations and artifact verification. anjana_newis the conservative SFT candidate; seed29 DPO has the best hard-200 point estimate. Neither is certified as a production winner.