43 Choosing a model
Some of these models are very large (use a lot of memory), and there’s a fair bit of choice that needs to go into selecting the right model. Memory size roughly correlates with the number of parameters an LLM has (e.g. 7B, 14B). LLMs with more parameters are in general smarter, but you’re going to need more RAM and a more powerful GPU to use them.
There are, however, many relatively small models these days that will run on most modern laptops.
As a rough guide for matching a model to your machine:
| Model size | Disk | RAM you’ll want | Realistic use |
|---|---|---|---|
| 1–3B | ~1–2 GB | 8 GB | Autocomplete, simple text processing |
| 7–8B | ~5–8 GB | 16 GB | General coding help, chat, extraction |
| 14B+ | ~9 GB+ | 32 GB+ | Harder reasoning tasks, agentic coding |
These are approximate — quantised versions of the same model can be substantially smaller. Match the model to the job: a small model used for a narrow, well-specified task often beats a large one you can’t run comfortably.
Useful references for picking one:
- Browse models — filter by chat, coding, vision, embeddings and reasoning
- Context length — how much text the model can take in at once
- Ollama quickstart
Try these commands in your terminal to download and run one of two LLMs via Ollama: ollama run qwen2.5-coder:1.5b (about 1GB file will download) or ollama run qwen2.5-coder:7b (about a 7GB file will download). Or feel free to use the Ollama chat interface if you prefer. Once it’s running, ask some questions about R code, like “how do I make a plot in ggplot” and read the output carefully to consider if the answer is accurate. You can even try running the code it produces to check for errors.