How many steps to fit an LLM on a phone
Quantization, pruning and picking an inference engine — notes from an on-device experiment.

The goal was simple: run a small chat model on an ordinary phone with under one second to first token.
Steps
- Pick a model around 1B parameters
- Quantize to 4-bit with acceptable accuracy loss
- Switch to a mobile-optimized inference engine
- Cache KV to avoid recomputation
python quantize.py --bits 4 --group-size 128 --model ./baseResult: 0.8 s to first token, 18 tokens per second.
COMMENTS
Sign in to comment — coming soon.