|
Download RULEBOOK_V1_6.md from ViuAI/Murli-V1.6-Code: direct link, hf CLI and curl.
- Browser
- Download file 7.36 kB
-
https://huggingface.co/ViuAI/Murli-V1.6-Code/resolve/main/RULEBOOK_V1_6.md
- Command line
-
hf download hf://ViuAI/Murli-V1.6-Code/RULEBOOK_V1_6.md
-
curl -L -o RULEBOOK_V1_6.md https://huggingface.co/ViuAI/Murli-V1.6-Code/resolve/main/RULEBOOK_V1_6.md
7.36 kB
Murli V1.6 — Strict Engineering Rulebook, Target & Work Log
Local Workspace: Murli_V1_6/ (strictly isolated from TTS_10M/, Murli_V1_5/, Murli_V2/)
Hugging Face Repo: ViuAI/Murli-V1.6-Code
Target: Studio-Grade 2026 Single-Speaker Only-Hindi TTS (syspin_male_01 (49.28h @ 53.1 dB SNR, 22 shards)), Zero Robotic Tone, Natural Prosody, Android ONNX Opset-17 Ready (max_steps = 350,000, max_epochs = 600).
1. Non-Negotiable Strict Rules (Learned from V1.0 & V1.5)
- Strict Speaker & Language Hygiene: Default V1.6 pretraining targets Single-Speaker Only-Hindi (
0 = syspin_male_01,hindi_50h,49.28h @ 53.1 dB SNR,language="hi"), while preserving explicit integerspeaker_idconditioning inProsodyAndAlignmentModuleandHybridDiTCFMVectorField(AdaLN-Zero) for optional multi-speaker runs (--all_speakers/--target_speakers). Untrained speaker IDs must be rejected at inference if absent fromcheckpoint["speaker_to_id"]. - No Flat Token-Constant F0 Staircase (V1.5 Bug #1): After duration expansion (
[B, T_mel, D]), refine prosody with a Conv1D Frame-Level Prosody Predictor / Smoother supervised against smoothed framelog_f0andenergytargets so long vowels bend naturally instead of staying flat. - 2026 Hybrid DiT + ConvNeXt-V2 CFM Backbone (V1.5 Bug #2): Replace V1.5's purely local ConvNeXt CFM (
~0.75sreceptive field) with a Hybrid ConvNeXt-V2 + RoPE Self-Attention DiT Vector Field (AdaLN-Zero) so the model shapes full-sentence storytelling intonation arcs while staying compact (~32–36Mparams) and 100% opset-17 Android ONNX exportable. - Fixed Hindi Schwa Deletion Rules (V1.5 Bug #3): Fix 3-syllable CVCV+long-vowel medial schwa retention (
मुरली → mʊɾliː,लकड़ी → ləkɽiː) BEFORE V1.6 pretraining starts, and cover them in automated unit tests. - Natural Inference & Clause Transitions (V1.5 Bug #4):
- Default ODE inference:
steps=48,cfg_scale=1.3,temperature=0.90,speed=0.92,min_frames=2(and Android configurablesteps=16–32). - Keep per-sentence splitting in
narrate.pywith subtle-68 dBroom-floor pauses (120msinter-sentence,260msinter-paragraph) — never splice0x0000dead silence and never merge multi-sentence paragraphs past punctuation (!/।).
- Default ODE inference:
- Zero-Guess Dataset & Cache Hygiene:
- Verify exact speaker counts/hours across ALL shards (
HfFileSystem) before launching GPU runs. - Maintain transcript-disjoint train/validation split,
AudioConfig+ tokenizer versioned disk cache keys, deterministic pool-based duration bucketing, andnumbaFP32 MAS.
- Verify exact speaker counts/hours across ALL shards (
- Checkpoint & Recovery Discipline:
- Count
stepby completed optimizer updates only; savemodel + optimizer + scaler + step + epoch + offset + best_val_cfm + RNGatomically. - Auto-backup checkpoints (
murli_v16_step_XXXXXX.pt+murli_v16_best.pt) and test WAVs (samples/sample_step_XXXXXX_spk*.wav) every--hf_backup_every/--sample_everysteps to Hugging Face.
- Count
- Test Before Push Rule: Run full local CPU unit, training-continuity, schwa-G2P, and ONNX Runtime parity tests (
python -m unittest discover -s tests -p "test_*.py" -v) after every change before pushing toViuAI/Murli-V1.6-Code.
2. Architecture & Task Plan
- Task 1 — Workspace & Rulebook: Create isolated
Murli_V1_6/folder and strictRULEBOOK_V1_6.md. - Task 2 — Config & Fixed Hindi G2P: Write
config.py(Speaker map0..2, Hybrid DiT+ConvNeXt dims,Natural Smoothdefaults) and fix 3-syllable medial schwa deletion indata/text_cleaner.py(मुरली → mʊɾliː,लकड़ी → ləkɽiː,लड़का → ləɽkaː). - Task 3 — 2026 Hybrid DiT + Frame-Prosody Acoustic Model (
37.75MParams):models/prosody_aligner.py:SpeakerEmbedding+FrameProsodyRefinersupervised on framef0_target&energy_target.models/flow_matching.py:HybridDiTCFMVectorField(12ConvNeXt-V2 blocks +4RoPEAdaLNZeroDiTBlocklayers conditioned ont + speaker_emb).models/tts_engine.py: Wiredspeaker_ids&frame_prosody_lossend-to-end.
- Task 4 — Multi-Speaker (
108.8+h) Dataset, Trainer & ONNX Exporter:data/dataset.py,train.py,narrate.py,export_onnx.pybuilt with deterministic duration bucketing, multi-speaker sample generation, HF checkpoint backup, and opset-17 ONNX verification.
- Task 5 — Full Verification & HF Repo Push: Passed
3/3unit, schwa-IPA, 3-speaker resume continuity, and ONNX parity tests (52.324s); pushed toViuAI/Murli-V1.6-Code.
3. Work Log (Chronological)
- 2026-12-01 (Init): Initialized isolated
Murli_V1_6/workspace and authoredRULEBOOK_V1_6.md. - 2026-12-01 (G2P & Model): Fixed medial schwa rule in
data/text_cleaner.py, builtFrameProsodyRefiner+HybridDiTCFMVectorField(37.75Macoustic params with 4 RoPEAdaLNZeroDiTBlockattention layers). - 2026-12-01 (Data & Exporter): Added 3-speaker mapping (
0=syspin_male_01,1=kalita_rasa_male_01,2=iisc_f_hindi_female_spk001), duration bucketing, multi-speaker test WAV uploader, and opset-17 Android ONNX exporter (frontend=51.99 MiB,cfm_step=82.11 MiB). - 2026-12-01 (Verify & Release):
python -m unittest discover -s tests -p "test_*.py" -v→Ran 3 tests in 52.324s — OK. Ready for108.8+htraining onViuAI/Murli-V1.6-Code. - 2026-12-01 (Speed Tuning): Removed full-tensor FP32 allocation in
ConvNeXt1DBlockGRN (layers.py) and addedprefetch_factor=4+float32_matmul_precision("high")intrain.py. - 2026-12-01 (13:19 Audit & Verification): Verified user hardening edits (
ज्ञान→gjaːn̪,मतलब→mət̪ləb,प्रगति→pɾəgət̪ɪ, English"3.5 percent",150 Hz F0non-zero separation, corrupt audio skip +--strict_dataset, batchedB>1padded synthesis,cfm_step.onnxreduced to69.71 MiB).test_v16.py→Ran 3 tests in 49.749s — OK. Pushed toViuAI/Murli-V1.6-Code. - 2026-12-01 (Host RAM Fix): Added
use_threads=False+pa.default_memory_pool().release_unused()indataset.pyand loweredprefetch_factor=2intrain.pyto eliminate 100% host RAM thrashing across DataLoader workers. - 2026-12-01 (1.0x Sequential Cache Warmup): Diagnosed random 72-shard Parquet row-group read amplification (
13% GPU / 100% Host RAMin Vast.ai dashboard). Addedwarm_cache_by_shard()(dataset.py, wired intrain.py) so each Parquet shard is read sequentially once before GPU training starts. - 2026-12-01 (Spawn Warmup Hang Fix): Fixed Linux
fork()+ PyTorch/OpenMP mutex deadlock & RAM spike insidewarm_cache_by_shardby switching tomp.get_context("spawn")(max_workers=2,torch.set_num_threads(1)) with per-shard liveas_completedlogging. - 2026-12-01 (RTX 3090 Fast & OOM-Safe Config): Kept
fused=TrueAdamW on CUDA, vectorized_foreach_*EMA updates, andPYTORCH_CUDA_ALLOC_CONF=expandable_segments:True, while disabling defaulttorch.compile(avoids 8x dynamic-shape recompiles) and usingbatch_size=32,lr=2.5e-4,warmup_steps=2000,max_steps=300,000,max_epochs=600for zero-OOM~72+ cl/sthroughput on 24GB RTX 3090.