Lightning-AI / Lightning-AI/litgpt
Auto precision
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.5k
- Avg merge
- 15h 37m
- Merged PRs (30d)
- 1
Description
One small issue I see with the current config files is that we are using bf16-true. This is recommended in my opinion, but certain hardware doesn't support it. In this case we could recommend using --precision 16-true from the command line. However, maybe we could have an "auto" argument in the config files similar to Ollama. I think we currently already support that via https://github.com/Lightning-AI/litgpt/blob/f241d94df59d82b2017bfdcd3800ac8779eb45f5/lit_gpt/utils.py#L284
We would just need to say null in the config file and then maybe specify that bf16-true is used when supported and otherwise 16-true?
Contributor guide
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 lit_gpt/utils.py around line 284 and trace how config files provide the precision setting. Confirm the intended null or auto behavior on hardware with and without bf16 support; done when the config path consistently selects a supported precision and the relevant existing checks pass.
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
- 35/100