Lightning-AI / Lightning-AI/lit-llama
Group data by length to reduce wasted computation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 517
- PR merge metrics
- No merged PRs in 30d
Description
Informed by [this post](https://discuss.huggingface.co/t/fine-tuning-pre-training-tips/15367), I implemented the `group_by_length` feature in finetuning scripts and found on single V100 GPU `finetune/lora.py` LLaMA-7B with the same hyper parameters:
- Without `group_by_length`: 8 hours, 37 minutes, 1.353 seconds
- With `group_by_length`: 6 hours, 15 minutes, 24.636 seconds
So the time saving is about 27%. I can submit a PR if anyone is interested.
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
Begin with finetune/lora.py, the only file named in the issue, then inspect the other finetuning scripts for their corresponding entry points. Use the reported single-V100 comparison and unchanged hyperparameters as the validation reference. Done means length grouping is available in the intended finetuning scripts and its behavior can be checked against the reported training result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100