Lightning-AI / Lightning-AI/pytorch-lightning
how to implement a customer precision with torchao
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
Bug description
hi, I implemented a customer precision with torchao.quantization.Int8WeightOnlyConfig, but unfortunately it looks like customer precision plugin integrated is not allowed in the lightning since the function _convert_precision_to_unified_args in lightning/fabric/connector.py check only the offical implement precision. Does anyone know, how can I implement it?
What version are you seeing the problem on?
v2.5
Reproduced in studio
No response
How to reproduce the bug
Error messages and logs
# Error messages and logs here please
Environment
Current environment
#- PyTorch Lightning Version (e.g., 2.5.0):
#- PyTorch Version (e.g., 2.5):
#- Python version (e.g., 3.12):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
More info
No response
cc @ethanwharris
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 by reading the precision handling in lightning/fabric/connector.py, especially _convert_precision_to_unified_args, and compare it with the reported torchao.quantization.Int8WeightOnlyConfig usage. The issue has no reproduction, error output, or environment details, so establish those first; done would require a confirmed way for the custom precision configuration to work or a clearly scoped supported-change proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100