Lightning-AI / Lightning-AI/litgpt
How to use fabric.clip_gradients in 16-mixed?
Open
Nobody has claimed this yet.
help wanted
question
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.5k
- Avg merge
- 15h 37m
- Merged PRs (30d)
- 1
Description
hi, I'd like to know how to use fabric.clip_gradients in 16-mixed? I got this error in pretrain.py:
Gradient clipping is not implemented for optimizers handling the unscaling.
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
Read the gradient-clipping call in pretrain.py and the fabric.clip_gradients entry point, then reproduce the reported 16-mixed error. Done means the supported usage or required change is clearly documented and the error path has a confirmed resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100