`train_gpu.sh` and `build_pi_runtime.sh` were committed as 100644, so a fresh
clone could not run them:
/bin/bash: line 1: ./scripts/train_gpu.sh: Permission denied
Both notebooks carried `chmod +x scripts/*.sh` to paper over it, which works
until something restores the tree from git -- a `git reset --hard` to pick up a
fix brings the mode back with it, and the next cell fails on a repository that
looks correct. The scripts added later in this session were already 100755;
this makes the original two agree.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzFQeNN
Call the CLI as a module, not through its console script
Hussein+1: Claude Opus 5 (1M context)
b37bda4
On Colab the install succeeds and then every command dies:
./scripts/train_gpu.sh: line 222: buddi-asr: command not found
Missing manifest: data/manifests/splits/test.jsonl
`pip install` writes the console script into whichever bin directory the
environment uses, and that is not on the PATH a notebook's shell inherits. The
failure is confusing precisely because installation reported success -- the
package is importable, only its wrapper is unreachable.
`python -m buddi_asr.cli` needs the package on `sys.path` and nothing else, so it
works wherever the install landed. The multi-GPU branch already invoked it this
way through `accelerate launch -m`; this makes the other seven call sites and the
benchmark sweep agree with it.
Reproduced by putting a python on PATH with the console script deliberately
absent, which is the Colab situation: the old code failed there and the new code
prepares the manifests.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-…
Stop excluding the Python that has been running this all along
Hussein+1: Claude Opus 5 (1M context)
378a466
Colab now ships 3.13, and the install refused:
ERROR: Package 'buddi-asr' requires a different Python:
3.13.15 not in '<3.13,>=3.10'
The `<3.13` cap was never justified by anything in the code. Every test run and
every local LoRA smoke in this session happened on 3.13.5 -- 46 passing, and a
real adapter written to disk. Raise the cap to `<3.14` and add the 3.13
classifier. An upper bound should record a version that was tried and failed,
not a version that had not been released yet.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzFQeNN
Let the data stage run without a GPU, and split the Colab notebook by intent
Hussein+1: Claude Opus 5 (1M context)
f8a54ab
Benchmarking needs the held-out split but not an accelerator, and `train_gpu.sh`
probed CUDA, sized batches against VRAM, and refused to continue long before it
reached the data stage. `--prepare-only` skips every GPU probe and stops once
the manifests exist, printing their record counts. Verified on a machine with no
CUDA at all: it succeeds with the flag and still refuses without it.
That unlocks the useful thing to do with a second machine while a first one is
training: score the stock checkpoints. The Colab notebook now separates setup
from two independent sections -- benchmark, which duplicates no other run, and
train, which does and says so. A closing cell puts the fine-tuned adapter in the
same table as the baselines, on the same speakers and the same drawn sample,
which is the comparison the paper had no fine-tune to make.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzFQeNN
Add a Colab path to the same artifact
Hussein+1: Claude Opus 5 (1M context)
5cd2d33
Kaggle allows 30 GPU hours a week and decides on its own which GPU a run gets;
this project has already lost one run to a P100 the image's PyTorch has no
kernels for. A second provider means a spent allowance or an unlucky allocation
stops a run, not the work.
The notebook checks the runtime against `torch.cuda.get_arch_list()` before
downloading anything, for the same reason preflight does: an hour spent
preparing 40k files should not end at the first optimizer step. It refuses a CPU
runtime outright.
Training writes into Drive rather than the container. Colab reclaims the disk
when it drops an idle session, and `--resume auto` then costs the time since the
last checkpoint instead of the whole run.
No credentials anywhere -- both repositories are public, which the Kaggle
notebook already relies on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzFQeNN
Add the Whisper sweep this repo was missing
Hussein+1: Claude Opus 5 (1M context)
6494f15
The paper at arXiv:2510.23319 contributes two things: a corpus of Levantine
child speech, and a benchmark of eight Whisper variants on it showing the best
of them at 0.66 WER against sub-0.20 on adult data. The corpus is not
obtainable -- the id the paper points at 404s and the Hub search returns nothing
-- but the benchmark is a method, and this repo already has the harder half of
it: 40,646 child utterances with splits that hold zero speaker overlap.
So score the stock checkpoints on our own held-out speakers. Every model sees
the same drawn sample, because the comparison is the whole point; results are
keyed by model so a rerun skips what it already has; and a checkpoint that
exhausts VRAM is reported and stepped over rather than discarding the models
that already succeeded.
Only the multilingual family is in the default list. The .en checkpoints cannot
emit Arabic at all, so scoring them would measure the tokenizer rather than the
model. A local path works wherever a Hub id does,…
Let evaluation run in batches and on a stratified sample
Hussein+1: Claude Opus 5 (1M context)
646b079
Reproducing the Arabic Little STT benchmark means scoring a dozen checkpoints on
the same held-out speakers, and `evaluate` transcribed one clip per forward
pass. The test split is 4,073 utterances; at that rate a single large checkpoint
is most of an hour and the sweep does not fit in a session.
Batch the generate call. Whisper pads every clip to the same 30 s window, so a
batch costs one forward pass rather than `batch_size` of them. Batches are
grouped by language first, because the language token rides in the decoder
prompt and one `generate` call carries a single prompt for the whole batch.
Verified identical: batch_size 1 and 4 produce the same WER, the same CER, and
the same hypothesis for every utterance.
`--limit` takes a speaker-stratified sample instead of the whole manifest.
Uniform sampling would let the child with the most recordings dominate a small
draw, moving the score for reasons unrelated to the model, so it draws from each
speaker in turn. Seeded, since a benchma…
Resolve tf32 against the GPU, and reject GPUs PyTorch cannot use
Hussein+1: Claude Opus 5 (1M context)
85d3028
Second GPU run got past LoRA injection and died building the trainer:
error: --tf32 requires Ampere or a newer GPU arch, cuda>=11 and torch>=1.7
The configs enable tf32 because it is free speed where it exists, but the guard
was `config.tf32 if torch.cuda.is_available() else False` -- which asks whether
there is a GPU, not whether that GPU has TF32. Anything below Ampere reaches
Transformers, which raises rather than ignoring the flag. Resolve it against the
device instead, the way the script already resolves precision, and say so when a
requested tf32 is dropped. Losing tf32 costs speed; failing the run costs the
whole run.
Preflight also let this through, and let through the larger problem behind it: a
Tesla P100 is sm_60, PyTorch 2.10 compiles for sm_70 and up, and such a GPU is
visible, reports its memory, and satisfies `is_available()` before failing at the
first kernel launch. Compare each device against `torch.cuda.get_arch_list()` and
refuse there -- preflight exists to …
Declare a torchao floor so LoRA injection survives the Kaggle image
Hussein+1: Claude Opus 5 (1M context)
c9c3030
The first real GPU run reached `get_peft_model` and died there:
ImportError: Found an incompatible version of torchao. Found version
0.10.0, but only versions above 0.16.0 are supported
PEFT's LoRA dispatcher calls `is_torchao_available()` while replacing each
target module, and that probe raises instead of returning False when an older
torchao is importable. Nothing in this project imports torchao; the Kaggle image
simply ships 0.10.0, which is enough to make every LoRA run fail. An absent
torchao is fine -- the probe returns False -- so this only bites images that
carry a stale one.
Reproduced locally against transformers 5.0.0 / peft 0.20.0 by installing
torchao 0.10.0: identical ImportError at the same dispatcher line. Upgrading to
0.18.0 and re-running completes the 2-step LoRA smoke with the same 294,912
trainable parameters as before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzF…
Cover the warmup-argument fallback with a test
Hussein+1: Claude Opus 5 (1M context)
ef7b4bf
The version-dependent choice was inline in `run_training`, which meant the only
way to exercise it was a full training run against a specific Transformers
build. Lift it into `warmup_kwargs` and test both spellings against stand-in
dataclasses, so neither branch depends on which version happens to be installed.
Verified since the previous commit that the fallback is load-bearing in both
directions: 5.0.0 still has `warmup_ratio`, 5.16.1 has only `warmup_steps`, and
a 2-step LoRA run now completes on both. Kaggle shipped 5.0.0 at the time of the
failing log, so the extras keep the `<6` ceiling rather than pinning to one.
The helper also rejects a ratio of 1.0 on the newer spelling. `warmup_steps`
reads a value >= 1 as a literal step count, so passing it through would turn a
full-length warmup into a single step -- a quality regression with no error.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uis9uRynosX69gefzFQe…
Make GPU training run on the Kaggle image
Hussein+1: Claude Opus 5 (1M context)
9954b4c
Four things stopped `train_gpu.sh` from reaching a first optimizer step on
Kaggle, each independently fatal.
A `.venv-gpu/pyvenv.cfg` from an earlier cloud run had been committed. Every
fresh clone therefore started with a directory that looks like a virtualenv but
has no `bin/`, and `python -m venv` on it fails inside ensurepip rather than
rebuilding it. Untrack the file, ignore the directory, and have the script
clear an incomplete tree before creating one so an existing clone self-heals.
The image ships transformers 5 and huggingface-hub 1.x, while the extras pinned
`transformers<5` and `huggingface-hub<1`. Installing the package downgraded the
hub underneath transformers and broke the import. Widen both ceilings; the only
hub API used is `snapshot_download`, which is unchanged in 1.x.
Transformers 5 removed `warmup_ratio` from `Seq2SeqTrainingArguments` and folded
it into `warmup_steps`, which reads a value below 1.0 as a fraction of total
steps -- the same meaning. Choose the s…