Special Topic · Open Weights, Distillation & Local Runs

Getting Started with Ollama and LM Studio

The full set of commands from install to running, how to read model tags, how to choose a quantization level, and the three most common traps

THE QUESTION THIS PAGE ANSWERS

ANSWER FIRST

What is the key idea behind “Getting Started with Ollama and LM Studio”?

The full set of commands from install to running, how to read model tags, how to choose a quantization level, and the three most common traps

DECISION RULE

Make the claim earn its place. Use this page as a decision aid, not a definition to memorize. Connect the idea to one real task, one observable result, and one failure that would change your mind.

TRY NEXT

Write one question you could answer with evidence after trying this idea.

WATCH FOR

A conclusion that sounds complete but leaves the key assumption untested.

Pick Your Tool First

Ollama

Command line
  • One command downloads and runs a model, with no extra steps
  • Once installed it serves in the background automatically, so programs can call it directly
  • The interface matches OpenAI's format, so existing API code only needs a new address
  • No graphical interface — switching models and adjusting parameters both mean typing commands
Right for you if: you want to wire a local model into your own program, or you are at home in a terminal.

LM Studio

Graphical interface
  • A built-in model browser lets you check size and quantization level before you commit to a download
  • It tells you whether your machine can handle a model, which helps a lot when you are new
  • It can start a local server too, also OpenAI-compatible
  • On Apple silicon it supports the MLX engine, which is faster than the generic format
Right for you if: you want to try a few models and compare them, or you would rather not touch the command line.
No need to agonize over it — install both. The model files they download do not conflict, and plenty of people use LM Studio to pick models and test them, then run Ollama as the always-on service.
Ollama: From Nothing to Running

Once Ollama is installed, one command is all you need. Say the last lesson told you an 8B is within reach:

Download and start chatting right away
ollama run qwen3:8b

That is the whole thing. If it is not on your machine yet it downloads first, then drops you into a chat when it finishes. To download without running, swap run for pull. The other commands you will reach for:

Day-to-day management
# See which models you have downloaded and how much space each one takes
ollama list

# Delete what you no longer use; local models eat a lot of disk
ollama rm qwen3:8b

# See which models are currently holding VRAM
ollama ps

After installation Ollama serves on port 11434 on your machine, with the same interface format as OpenAI. That means the calling code from Part 7 runs as-is once you point base_url here, with the tag name in the model field.

Calling a local model with the standard OpenAI SDK
from openai import OpenAI

# The local server does not verify keys; any non-empty api_key will do
client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")

resp = client.chat.completions.create(
    model="qwen3:8b",
    messages=[{"role": "user", "content": "Explain what quantization is in one sentence"}],
)
print(resp.choices[0].message.content)

The 8b in that command is only an example. Which number belongs there depends on your machine. Make a few choices below and you get the exact line to copy.

Pick your setup, hit copy, and this command works the moment Ollama is installed.
Platform
Model
Main use

Click through the machines in the selector above and something counter-intuitive shows up: what decides how large a model you can run is not how expensive your GPU is, but how much memory it has. An RTX 4090 stops at 30B, while a Mac with 128 GB of unified memory swallows 122B. The Mac has far less graphics horsepower, yet the model fits on it and does not fit on the card.

Same INT4, two very different ceilings
  • RTX 4090 (24 GB VRAM) → at most Qwen3-30B-A3B, needs 19.5 GB
  • Mac with 128 GB unified memory (~96 GB usable) → at most Qwen3.5-122B-A10B, needs 79.3 GB

This is the one argument that genuinely holds up for buying a large-memory Mac to run models locally. Its advantage is not speed, it is capacity: spend the same money on a discrete card and you hit a wall at 24 GB of VRAM, whereas unified memory scales past 128 GB, and no other consumer device covers that middle stretch. If your purpose is running large models locally, memory capacity matters far more than the GPU model.

The recommendations above only use tags that actually exist in the official Ollama library, verified 2026-08-07 against ollama.com/library. Handing you a command that fails to pull would be worse than handing you nothing.
How to Read a Tag

The string after the colon is not arbitrary. Every segment means something.

qwen3:30b-a3b-q4_K_M
qwen3The model family name.
30b-a3bThe size. An a means MoE; here it is 30B total parameters with 3B activated. As the last lesson explained, plan VRAM for 30B.
q4_K_MThe quantization level. Leave it off and you get the default level, covered in the next section.
Trap one: by default you are already running a quantized version. With no quantization suffix, what Ollama pulls is usually the Q4 level, not the original precision. Plenty of people compare that against an official API, conclude open-source models fall short, and never notice they were not comparing the same thing. Before you compare quality, confirm both sides are running the same level.
Choosing a Quantization Level
Q4_K_M
Pick this by default. The balance point between size and quality, and the default level in almost every tool. Good enough for everyday questions, summarizing, and rewriting.
Q5_K_M
Slightly larger, more consistent quality. If you mainly use it for code or math, this level is the safer bet, since both are fairly sensitive to precision loss.
Q8_0
Close to original quality, and close to double the size. For when VRAM is plentiful and you want the best result available.
Q3 and below
Not recommended unless you genuinely cannot fit anything else. The quality drop starts to show, and you are better off with a model one size smaller at a higher level.
A practical rule: the larger the model, the safer quantization is. Whatever a 32B model gives up going to Q4, it usually still beats an 8B at Q8. So when VRAM is limited, protect the size first and think about the level second.
Available tags change with each release, so before you pull, open that model's tags page at ollama.com/library and confirm which sizes and levels currently exist. Verified 2026-08-07.
LM Studio: Just a Few Clicks
1

Search the model library

Search a model name and the list shows the size of each quantized version. The interface flags which ones your machine can handle, which is a lot more direct than the command line.

2

Chat as soon as the download finishes

When loading a model you can adjust context length and GPU allocation. Both directly affect VRAM usage, so get it working on the defaults before you touch them.

3

Start the local server when a program needs to call it

Launch it from the server panel. This is also an OpenAI-compatible interface, used exactly like the Ollama example above, just on a different port.

4

Mac users: choose the MLX build

If the model comes in an MLX format, prefer it. That engine is tuned for Apple silicon, and the same model runs noticeably faster than in the generic format.

Three More Common Traps
  • Opening the context too wide blows out your VRAM. This is the most frequent problem by far. VRAM looks sufficient when the model loads, but pull the context up to tens of thousands of tokens and the growing KV Cache breaks it. What you see is generation freezing halfway through, or speed suddenly dropping to unusable. Get it working at the default context first, then raise it one step at a time when you need long text.
  • Running out of VRAM does not always produce an error. Some tools quietly push whatever does not fit into system memory and compute it on the CPU. The result runs, but more than ten times slower. If generation speed is absurdly slow, first check whether the model fully fit into VRAM.
  • Your disk gets eaten. An 8B model at Q4 is three or four GB, so trying a handful of models adds up to tens of GB. Check in with ollama list now and then and delete what you do not use.
Three Routes, and When to Take Each

At this point you have three ways to use a model. They do not replace one another; each has its own place:

  • Run it locally. When data cannot leave your machine, when you will be calling it heavily over a long period, or when you want to be completely independent of any provider. The cost is that your capability ceiling is set by your hardware.
  • The official API. When you want the strongest capability and no operations work. Pay as you go, for exactly what you use.
  • A relay reseller. Convenience and risk come together. The specific trade-offs were covered in "What Are API Relay Resellers"; your data passes through a third party, so it is worth going back to that lesson before you pick one.

That is the end of this chapter. You should now be able to judge for yourself how open a given model is, know where small models come from and what they cost, and get one running on your own machine.

Put “Pick Your Tool First” back into its constraints

“Once Ollama is installed, one command is all you need.” shows that a model, license, access route, or leaderboard is information—not an answer outside context. The real choice depends on task, data boundary, latency, quality floor, and operating cost.

Write elimination criteria before chasing the top score

The comparison in “That is the whole thing.” should use the same real inputs while observing correctness, failure behavior, response time, and cost. A model leading a public leaderboard may still fail your license, privacy, or peak-latency constraints.

  • One command downloads and runs a model, with no extra steps
  • Once installed it serves in the background automatically, so programs can call it directly
  • The interface matches OpenAI's format, so existing API code only needs a new address

Without a test set, there is no reliable winner

Start with “That is the end of this chapter.”: choose inputs that could genuinely change the decision and write down one counterexample that would reverse your choice. That is more useful than memorizing a single ranking.

From “Pick Your Tool First” to “Ollama: From Nothing to Running”

“Pick Your Tool First” grounds the problem in “Ollama Command line One command downloads and runs a model, with no extra steps Once installed it serves in the background automatically, so programs can call it directly The interface matches OpenAI's format…”. “Ollama: From Nothing to Running” then moves it toward “Once Ollama is installed, one command is all you need. Say the last lesson told you an 8B is within reach”. Together, they show that the lesson is not just a conclusion to remember, but a claim with conditions.

Carry the judgment into the next situation

For model selection, write non-negotiable constraints from the real task first. Compare quality, failure behavior, latency, licensing, and cost on the same inputs; use a leaderboard only as a starting point.

  • “Pick Your Tool First”: Ollama Command line One command downloads and runs a model, with no extra steps Once installed it serves in the background automatically, so programs can call it directly The interface matches OpenAI's format…
  • “Ollama: From Nothing to Running”: Once Ollama is installed, one command is all you need. Say the last lesson told you an 8B is within reach
  • “The closing point”: A built-in model browser lets you check size and quantization level before you commit to a download

The final “The closing point” brings the discussion to “A built-in model browser lets you check size and quantization level before you commit to a download”. The useful thing to carry forward is knowing which judgments must be revisited when input, scale, or risk changes.

Mark as learned Your reading progress updates automatically
← PreviousNext →

Keep reading

The next useful article in the thread.

ARTICLE DISCUSSION

Leave one useful thought here.

Keep the idea that clicked, the question that stayed open, or a small note for the next learner.

Discussing Getting Started with Ollama and LM Studio Open Weights, Distillation & Local Runs
3discussionsArticle discussion · synced with the Circle
View in the learning circle
AM
Asha MorganContent editor
INSIGHTField note

I turned one judgment from this article into a small experiment I could run today. Knowing what to observe next is more useful than simply remembering the conclusion.

ARTICLE DISCUSSION7 helpful
LH
Lin HarperIndie developer
INSIGHTInsight

After reading this, I first looked for the conditions behind the idea instead of copying the method into a project. That order made the later trade-offs much clearer.

ARTICLE DISCUSSION5 helpful
KM
Kiki MooreProduct operations
QUESTIONQuestion

When this judgment reaches real work, which constraint should be added first? I am curious which step matters most between reading and the first practical attempt.

ARTICLE DISCUSSION4 helpful