Lora no longer works in silnlp
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39
- Forks
- 7
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Description
Since the transformers library was updated to 4.46.2, Lora no longer works in silnlp. If you train a model using Lora and evaluate on the validation set at each checkpoint, the clearML scalars page shows the BLEU score on the validation set increasing steadily (in my experiment, to 30+). However, at the end of training, the BLEU score on the test set is much lower (in my experiment, about 8). If you manually run the validation data through the trained model, it also has a very low BLEU score. Our hypothesis is that the Lora adapter is not getting saved properly, so it's not being used during inference after the model is saved. Mostly likely, there is a bug in the _merge_and_delete_adapter function in hugging_face_config.py. It's possible that it's a bug in the library peft - Isaac has said that it's support for Lora in NLLB is not very stable.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in hugging_face_config.py at _merge_and_delete_adapter, then reproduce the Lora training and checkpoint validation behavior described in the issue with transformers 4.46.2. Check whether the adapter is saved and used during post-training inference, and compare validation and test BLEU scores. Done means the saved model retains the adapter and produces consistent evaluation results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100