The memory math
The table shows how much some open models weigh. The 16-bit column is the full size, and the 4-bit column is the quantized version used on phones. On top of the weights you need memory for the context, a few hundred MB for a few thousand tokens.
On a phone with 8 GB of RAM, models up to 3 or 4 billion parameters at 4 bits fit comfortably. The 8 billion ones need a top-end phone with 12 or 16 GB.
| Model | Parameters | At 16 bits | At 4 bits |
|---|---|---|---|
| Gemma 3 1B | 1 billion | 2 GB | about 0.6 GB |
| Llama 3.2 3B | 3.2 billion | 6.4 GB | about 1.8 GB |
| Phi-3.5 mini | 3.8 billion | 7.6 GB | about 2.2 GB |
| Gemma 3 4B | 4 billion | 8 GB | about 2.5 GB |
| Llama 3.1 8B | 8 billion | 16 GB | about 4.7 GB |