Skip to content

A TTS that fits in your CPU (and pocket)

Python

Loader: 6 subprocesses per rank by default, add a throughput benchmark (#289)

manu-lm60d5ad6e8afa
diff --git a/training/args.py b/training/args.py
index 3c34a96..6474a4d 100644
--- a/training/args.py
+++ b/training/args.py
@@ -24,7 +24,10 @@ class DataArgs:
# <= 0 removes the window (any word boundary; full-prefix prompt).
max_voice_prompt_sec: float = 5.0
shuffle: bool = True
- loader_procs: int = 3
+ # Loader subprocesses per rank. Each one is GIL-bound at ~90 samples/s from
+ # network storage (extra IO threads do not help), and a rank consumes
+ # batch_size x steps/s: 6 keeps a small model at 35 it/s x 16 fed.
+ loader_procs: int = 6
# Precompute Mimi latents for train_jsonl on first run and train from
# them (rank 0 encodes once; other ranks wait). False keeps the
# on-the-fly audio pipeline.
diff --git a/training/dataloader/subproc.py b/training/dataloader/subproc.py
index c1b4f8b..1525525 100644
--- a/training/dataloader/subproc.py
+++ b/training/dataloader/subproc.py
@@ -49,7 +49,7 @@ class SubprocessDataLoader:
seed: int = 0,
shuffle: bool = True,
io_workers: int = 16,
- num_procs: int = 3,
+ num_procs: int = 6,
depth: int = 8,
):
ctx = torch_mp.get_context("spawn")