# Ollama or LM Studio: which is easier for running models locally?

Date: 2024-04-26 · Author: Robert Scales · https://guidetoartificialintelligence.com/en/learn/ollama-lm-studio-easier-running-models-locally/

**Answer:** LM Studio is easier if you prefer clicking to typing: it is a desktop app where you search for a model, download it and chat in a window. Ollama is easier if you are comfortable with one Terminal command, and it is the lighter choice for connecting local models to other programs; both run Meta's new Llama 3 offline on your own computer.

Running a language model on your own computer means your prompts never leave the machine, there is no subscription, and it keeps working without an internet connection. A week after Meta released Llama 3, two free tools make this practical for non-specialists: Ollama and LM Studio. Both download a compressed copy of a model and run it on your own hardware. They differ mostly in how you talk to them.

Ollama is driven from the Terminal (the text window where you type commands), with a small background app. LM Studio is a full desktop application with menus, a model browser and a chat window. Here is how to get Llama 3 running in each, followed by a side-by-side comparison.

## Llama 3 in Ollama, step by step

Ollama now offers a Mac download, a Windows preview, a one-line install script for Linux and a Docker image.

1. **Install.** Download Ollama from ollama.com, install it and open it once.
2. **Open the Terminal** (on Windows, PowerShell or Command Prompt).
3. **Run the model.** Type the command below. The first time, Ollama downloads the 8-billion-parameter version, about 4.7 GB, then opens a chat prompt.

```
ollama run llama3
```

4. **Chat.** Type at the `>>>` prompt and press Return. For a message of several lines, wrap it in triple quotes (`"""`).
5. **Tidy up later.** `ollama list` shows what you have downloaded; `ollama rm llama3` removes a model.

If you want a standing instruction, Ollama's Modelfile lets you build your own version of Llama 3 with a system message and a temperature setting, then start it by name.

## Llama 3 in LM Studio, step by step

LM Studio supports Apple Silicon Macs (M1, M2, M3), Windows PCs and Linux machines whose processors support AVX2, a common set of instructions on recent chips.

1. **Install.** Download the installer from lmstudio.ai and open the app.
2. **Search.** Use the search box to look for "Meta-Llama-3-8B-Instruct". The LM Studio Community version, published within a day of Meta's release, is a good pick.
3. **Choose a file.** Each model comes in several compression levels, called quantizations. Smaller files load faster and use less memory but lose a little quality. A mid-sized option is a sensible start.
4. **Load and chat.** Open the chat view, select the model at the top, and check that the "Llama 3" preset is chosen. The preset wraps your messages in the special format Llama 3 was trained on.
5. **Set a system prompt.** The default is "You are a helpful AI assistant." Replace it with your own instruction if you like.

## Side by side

| | Ollama | LM Studio |
|---|---|---|
| How you use it | Terminal commands, plus a small background app | A desktop window with menus and a chat panel |
| Finding models | Short names from its library (`llama3`, `mistral`, `gemma:2b`) | A search box inside the app |
| Choosing compression | One command fetches a ready-made version | You pick the file yourself |
| Speed | Depends on your computer and model size | Same: depends on your computer and model size |
| Privacy | Runs offline once the model is downloaded | Runs offline once the model is downloaded |
| For other apps | Local API at `localhost:11434` | Local server in OpenAI's format, `localhost:1234` by default |
| Cost | Free | Free |

On speed, neither tool has a built-in advantage worth choosing on. Both credit the open-source llama.cpp project, and how fast replies appear depends mainly on your processor, your memory and the size of the model. On privacy, the rule is the same for both: your conversations stay on your computer, but read each tool's own terms and settings if you handle confidential material.

The real difference is comfort. If a Terminal makes you uneasy, LM Studio removes that barrier. If you want something lightweight that other programs can call, Ollama is quicker to set up. Developers can use either, since LM Studio's server mimics the OpenAI API, so code written for ChatGPT's API can point to it with a changed address.

> **Try it:** Install both tools and give Llama 3 the same prompt in each, for example "Explain what a spreadsheet formula is to someone who has never used one, in five sentences." Compare the answers, then try the same prompt with a lower-compression file in LM Studio and note whether the quality changes.

## Which model should you try first?

Start with Llama 3 8B Instruct. "8B" means eight billion parameters, the internal settings the model learned in training, and "Instruct" means it was tuned to follow requests and hold a conversation. It is the version both tools feature, and in Ollama it is a 4.7 GB download. Ollama's README suggests at least 8 GB of RAM (working memory) for models of about this size, so check your memory first; more than the minimum leaves room for your other apps.

If your computer is older or has little memory, try Gemma 2B (`ollama run gemma:2b`, 1.4 GB), a much smaller model from Google that is light enough for modest machines and fine for learning the tools. If you want a second opinion of similar size, Mistral 7B (`ollama run mistral`, 4.1 GB) is a well-known alternative.

Leave the 70B version of Llama 3 for later. It is a 40 GB download in Ollama, and the README's memory guidance already reaches 32 GB for models less than half its size. The 8B model is enough to learn how local AI behaves, where it is strong and where it still needs checking.

## Sources

- Ollama README (commit 928d844, April 23, 2024): https://github.com/ollama/ollama/blob/928d84489651288f06cf68f995b6f870948bd4fc/README.md
- LM Studio Documentation: Welcome and Local LLM Server: https://lmstudio.ai/docs/welcome
- Llama 3 8B Instruct by Meta (LM Studio Community model card): https://huggingface.co/lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF/blob/0ebcf8cb99229090371da6c2a35c09a52e3e2bdd/README.md
