oddadmix commited on
Commit
3210708
·
verified ·
1 Parent(s): 55f3a4d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -97,6 +97,24 @@ Fine-tuned on [`oddadmix/dialectal-arabic-lahgtna-v2-smaller-augmented`](https:/
97
  (fp32 weights + generate)
98
  - **Metric**: WER/CER on cleaned references (clean-text normalized)
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  ## Usage
101
  ```python
102
  import torch, torchaudio
 
97
  (fp32 weights + generate)
98
  - **Metric**: WER/CER on cleaned references (clean-text normalized)
99
 
100
+ ## Fine-tuning (reproduce)
101
+
102
+ The exact fine-tuning code is bundled in this repo (`train.py`, `normalize.py`, `evaluate_model.py`) plus `requirements.txt`. Trained on `oddadmix/dialectal-arabic-lahgtna-v2-smaller-augmented` (**private**) — swap in any HF audio dataset with `audio` + `text` columns. `normalize.py` is the shared text cleaning (strip tashkil + non-verbal tags, keep dialectal letters گ ڨ چ).
103
+
104
+ ```bash
105
+ pip install -r requirements.txt
106
+ huggingface-cli login # for the (private) dataset
107
+
108
+ python train.py \
109
+ --base_model openai/whisper-medium --run_name my-run \
110
+ --per_device_train_batch_size 8 --gradient_accumulation_steps 4 \
111
+ --learning_rate 1e-5 --warmup_steps 500 --max_steps 6000
112
+
113
+ python evaluate_model.py --model runs/my-run # WER / CER
114
+ ```
115
+ Note: some checkpoints (e.g. large-v3-turbo) ship in fp16 — `train.py` force-loads
116
+ fp32 so `generate()` doesn't crash at eval. bf16 autocast is used for training.
117
+
118
  ## Usage
119
  ```python
120
  import torch, torchaudio