Skip to content
How-to GuideUnreviewed

Compare Phonsa acoustic backbones

Fine-tune and evaluate Whisper, XEUS, and PhoneticXEUS inside the Phonsa acoustic training pipeline on identical onset/rime splits locally or on Modal.

Before starting, prepare these prerequisites:

Each backbone is fine-tuned with its native audio frontend, the shared onset/rime inventory, the upstream Phonsa framewise classifier, phoneme CE and CTC objectives, and a 20 ms prediction clock without loading lyrics. Decoding follows upstream Phonsa, including merging adjacent identical labels. The syllable_preserving decoder and temporal attention are separate experimental configurations whose metrics are not directly interchangeable with the upstream framewise baseline.

Train and evaluate locally

Supply the same --validation-manifest to every run so all annotation budgets share identical validation and test recordings. Keep the annotation selections and remaining settings unchanged when comparing Whisper variants (for example, --backbone whisper --whisper-model turbo).

Train a backbone sequentially by setting --backbone to whisper, xeus, or phoneticxeus:

PYTHONPATH=research/phone-recognition/src uv run --no-project \
  --python local/third_party/phonespam-env/bin/python \
  -m phone_recognition.phonsa.worker train \
  local/data/phone-recognition/few-shot/5m-seed42/manifest.json \
  --validation-manifest local/data/phone-recognition/few-shot/30m-seed42/manifest.json \
  --backbone whisper

The command prints the run directory and selected checkpoint, logging parameters and metrics through ml_tracking while keeping checkpoints local. To resume an interrupted run, keep the same manifests and backbone and pass --resume local/runs/phone-recognition/phonsa-whisper. Resuming loads the latest checkpoint from that directory and restores optimizer, scheduler, and random number states (best checkpoints retain the same states).

Evaluate a trained checkpoint on the shared held-out test split:

PYTHONPATH=research/phone-recognition/src uv run --no-project \
  --python local/third_party/phonespam-env/bin/python \
  -m phone_recognition.phonsa.worker evaluate \
  local/data/phone-recognition/few-shot/5m-seed42/manifest.json \
  --validation-manifest local/data/phone-recognition/few-shot/30m-seed42/manifest.json \
  --checkpoint local/runs/phone-recognition/phonsa-whisper/best_model.pt \
  --split test

Preview on a sample bundle

Append a checkpoint’s prediction track to an existing sample bundle, then publish or push that track by following Run phone recognition inference and alignment:

PYTHONPATH=research/phone-recognition/src uv run --no-project \
  --python local/third_party/phonespam-env/bin/python \
  -m phone_recognition.phonsa.worker infer \
  local/data/phone-recognition/opencpop/manifest.json \
  --checkpoint local/runs/phone-recognition/phonsa-whisper/best_model.pt \
  --track-id "Phonsa acoustic Whisper 5m"

Train on Modal

Before running cloud training, confirm that your Modal runtime (infra/runtime/modal.toml), input and run Volumes, and tracking Secret are configured. Cloud resources and batching live in research/phone-recognition/configs/phonsa-modal.toml, which uses BF16, batches of eight recordings (with gradient accumulation configured separately), and four persistent data workers with cached Mel inputs.

Submit a Phonsa Whisper training job to Modal, evaluate on the common test split, and append predictions to a local preview bundle:

uv run --project research/phone-recognition --extra modal phone-recognition modal train \
  local/data/phone-recognition/few-shot/30m-seed42/manifest.json \
  --validation-manifest local/data/phone-recognition/few-shot/30m-seed42/manifest.json \
  --runtime infra/runtime/modal.toml \
  --whisper-model turbo \
  --preview local/data/phone-recognition/opencpop/manifest.json

The command uploads only the selected recordings, annotations, and cached Whisper checkpoint, streams metrics to the configured Dashboard, and keeps checkpoints and metric journals on the Modal run Volume without uploading artifacts. Resume an interrupted cloud run by passing --resume with its reported experiment and run path.

Type to search…

↑↓ navigate↵ selectEsc close