Lightning-AI / Lightning-AI/litgpt
Smart choice of the inference algorithm
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.5k
- Avg merge
- 15h 37m
- Merged PRs (30d)
- 1
Description
`generate/base.py` and `generate/chat.py` (uses the former) assume that the model fits in memory.
There's `generate/sequentially.py` and `generate/tp.py` that support using multiple devices.
To streamline the experience, we could have the `chat` or `generate` entrypoints choose one implementation based on the model config (size, sequence length) and available hardware (memory, number of devices). This would require #921.
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 generate/base.py and generate/chat.py, then compare their assumptions with generate/sequentially.py and generate/tp.py. Trace the chat and generate entrypoints and the model configuration and hardware information they can access; done means they select an appropriate implementation for model size, sequence length, available memory, and device count, accounting for the dependency on #921.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100