PEFT-Fine-tuning-cows

Preprocessing check (October 2026)

During training and validation, the DINOv3 model wrapper rescaled the ImageNet-normalized crops back to [0, 1] before the backbone. The original test evaluation of the eight QLoRA/DoRA models passed the normalized crops directly (see the note in the main README). To estimate the effect, two of the eight models were re-evaluated on the same seeded random sample of 2,000 of the 211,800 test crops (test_df.sample(n=2000, random_state=0)) with the notebooks in notebooks/corrected_testing, on one NVIDIA A10 GPU (24 GB; torch 2.7.0, transformers 4.57.1, PEFT 0.13.2, bitsandbytes 0.48.0):

Model Mode Accuracy (%) Original evaluation, same crops (%) Agreement with the original predictions (%) Changed predictions
QLoRA, all-linear, r = 64 legacy 82.85 82.90 99.90 2
QLoRA, all-linear, r = 64 corrected 83.25 82.90 97.20 56
DoRA, q_proj, r = 8 legacy 82.30 82.25 99.95 1
DoRA, q_proj, r = 8 corrected 82.35 82.25 96.05 79

Files

File Content
summary.csv the table above, with throughput, GPU memory and library versions
check_predictions.csv per-crop predictions: test_index (row of data/splits/test.csv), source, true and, for each model, the original, legacy and corrected predictions (class indices 0–8 in the order given in data/README.md)
<model>_<mode>.json full output of each run: confusion matrix, per-source accuracy, macro- and weighted F1, timing, library versions