Skip to content

A TTS that fits in your CPU (and pocket)

Python
1.4 KB
Raw Blame
# Depth distillation: a 6-layer student learns the backbone activations of a
# trained 24-layer teacher. Same d_model, so the flow head and all non-backbone
# weights are copied from the teacher and the head stays frozen.
#
# distill_cfg_coef 2.0 bakes guidance in (the README's parity recipe);
# 1.0 = pure depth distillation.
model_config: pocket_tts/config/english.yaml   # 6-layer student
start_from_pretrained: false
distill_cfg_coef: 2.0
distill_teacher_config: pocket_tts/config/english.yaml
distill_teacher_overrides:
  flow_lm.transformer.num_layers: 24
distill_teacher_weights: runs/scratch/checkpoint_00400000.pt

data:
  train_jsonl: data/train_aligned.jsonl
  valid_jsonl: data/valid_aligned.jsonl

flow:
  type: lsd
  kwargs: {}

# No CFG dropout: the teacher's targets are always computed fully-conditioned
# (both z_cond and z_null come from dropout=False passes), and the student is
# never run with a null branch at inference. Dropping conditioning here would
# ask the student to predict the conditioned target from a null input.
text_dropout: 0.0
voice_dropout: 0.0

optim:
  lr: 4e-4  # screened {1,2,4}e-4 on full mini-cosines: 4e-4 clearly best
  schedule: cosine
  warmup_steps: 1000

run_dir: runs/depth_distill
batch_size: 64
grad_accum_steps: 1
max_steps: 200000  # WER is at parity by ~50k; sim and UTMOS climb until ~150k
ema_decay: 0.9999
log_freq: 50
valid_freq: 2500
ckpt_freq: 2500
num_ckpt_keep: 999