Ollama runs AI models, Llama, Mistral, Gemma, Qwen, directly on your computer, with no subscription, without sending your data to a third-party server and even without an internet connection once the model is downloaded. This guide takes you from installation to your first conversation. Downloading the model is the longest step, the rest takes a few commands. It covers Ollama 0.40+ on Windows, macOS and Linux.
It is written for beginners and developers alike. No prior knowledge of artificial intelligence is required: if you can open a terminal and type a command, you have the level. Ollama is the right choice when an online assistant does not fit: code under NDA, regulated data, a tight budget or offline work.
What you will learn
By the end of this guide, you will be able to:
- Install Ollama on your computer (Windows, Mac or Linux)
- Download and use AI models such as Llama, Mistral or Qwen Coder
- Chat with the AI from the command line
- Pick the right model for your needs (code, text, translation...)
- Check with
ollama pswhether a model runs on the GPU, on the CPU or on both - Know where to troubleshoot common errors and secure access to Ollama
Installation and the command line are covered here from start to finish. The Python integration, in-depth troubleshooting and the fine choice of a model are covered in separate guides, linked throughout the text.
What is Ollama? A detailed explanation
Ollama is free, open source software (MIT license) that downloads and runs large language models (LLMs) directly on your machine, through a single command and a local API on port 11434. It makes generative AI usable without a subscription, without the cloud and offline once the model has been fetched.
Before installing Ollama, let us see what it does exactly and when it beats an online service.
The problem Ollama solves
To use AI in your work as a developer, three routes exist. They differ in what they cost you in privacy, money and setup time.
- An online service (ChatGPT, Claude, Gemini): very convenient, but your code (possibly confidential) goes through third-party servers, usage is paid (monthly subscription or billing by volume of text processed) and the service is unusable during an outage.
- A model installed by hand: technically possible, but you have to download weights of several gigabytes, install the right versions of Python, PyTorch and CUDA, tune dozens of parameters and write the loading code. This takes far longer than a single command.
- Ollama: a single command installs a model, Ollama sets the technical parameters itself, a simple interface lets you chat with it and your data stays local.
Ollama is not the only local inference engine, and it is not always the best fit. llama.cpp gives fine control over quantization (the number of bits that store each weight of the model) and runs on modest hardware, vLLM aims at throughput on GPU to serve several users at once, TGI (Text Generation Inference, from Hugging Face) targets the same production ground. Ollama wins on ease of setup and loses on fine tuning. The comparison of inference backends (in French) details these trade-offs according to your hardware and your volume of use.
What exactly is an LLM?
You have surely seen the term LLM (Large Language Model). Concretely, it is a computer program trained on huge amounts of text (books, articles, source code, web pages...). Thanks to this training, it has learned:
- The rules of language: grammar, spelling, syntax
- Knowledge of the world: history, science, current events (up to its cutoff date)
- Reasoning patterns: how to solve problems, how to structure an answer
- Code conventions: language syntax, good practices, common patterns
When you ask an LLM a question, it does not "look up" the answer in a database. It generates the answer word by word, predicting which word is most likely after the previous one, given your question and everything it has learned.
Why "local" changes everything
With an online service, your question travels to the provider's servers (OpenAI, for example, in the United States), which computes the answer on its GPUs and sends it back. With Ollama, the model computes the answer on your own machine and nothing leaves your computer. The table spells out the concrete consequences.
| Aspect | ChatGPT (cloud) | Ollama (local) |
|---|---|---|
| Privacy | Your data goes through third-party servers | Your data stays on your machine |
| Cost | Subscription or pay-per-use billing | Free software, hardware and electricity at your expense |
| Internet | Required | Optional (after the model is downloaded) |
| Speed | Depends on network latency | Depends on your hardware |
| Availability | Can be saturated or under maintenance | Available as long as your machine is running |
| Customization | Settings limited to what the service exposes | Broad: a Modelfile sets the system prompt and the parameters of your own variant |
Concrete use cases
Four typical situations show when to prefer Ollama. In each of them, it is control over data or cost that makes local the better choice.
- Privacy: a developer works on a client project under NDA (non-disclosure agreement). She cannot paste her code into an online service without breaching the contract; with Ollama, it never leaves her workstation.
- Budget: a student does not want to pay a monthly subscription. Ollama gives him an assistant with no message limit to explain complex concepts.
- Unreliable network: a consultant who spends a lot of time on trains keeps working with AI, even in a tunnel.
- Regulated data: a bank's data team cannot send its internal reports to an American provider. Ollama lets it run AI in-house.
Is your computer compatible?
Before installing Ollama, let us check that your machine can run it. A recent computer is generally enough for the small models; the table below says which ones.
RAM: the key factor
Memory (RAM) is the most important factor. When you launch an AI model with Ollama, it is loaded entirely into memory. If your computer does not have enough RAM, the model cannot be loaded, or will be very slow because it has to use the hard drive (this is called swap).
| Model (tag) | File size |
|---|---|
llama3.2 (3B) | 2.0 GB |
mistral (7B) | 4.4 GB |
llama3.1:8b | 4.9 GB |
qwen2.5-coder:14b | 9.0 GB |
llama3.1:70b | 43 GB |
These sizes are the ones shown on the ollama.com/library pages. The model is not alone in memory: memory must also hold the space reserved for the context (explained in the GPU section below) and the system itself. Free RAM must therefore be well above the file size. Compare the size of the model you are aiming at with the free RAM of your machine.
How do you check your RAM?
- Windows: right-click the taskbar, "Task Manager", "Performance" tab, then "Memory".
- macOS: Apple menu, "About This Mac"; the RAM is shown (for example "16 GB").
- Linux: the command below prints the total RAM.
# Show total RAMfree -hYou will see something like Mem: 15Gi (for 16 GB).
Disk space
Each model takes up on disk the size of its file, the one in the table of the previous section: from 2.0 GB for llama3.2 to 43 GB for llama3.1:70b. Keep at least 20 GB free so you can download several models and try them out.
The GPU: optional but useful
A graphics card (GPU) is not mandatory: without a usable GPU, Ollama computes on the processor (CPU), only more slowly. With a GPU, the model is copied into the card's memory, the VRAM, and the size of that memory decides which models the card accelerates entirely. This section explains where the required VRAM comes from, how to measure it on your machine, and what the usual VRAM sizes allow you to load.
Where does the required VRAM come from?
Two things take up the memory of a loaded model.
The first is the model's weights, that is the file you download. Their size is shown by ollama list after the download, and on the model page in ollama.com/library before. It depends on the number of parameters and on the quantization, which stores each weight on fewer bits to shrink the file (the lesson Quantizing an LLM in practice details the formats). A model's quantization is shown by ollama show.
The second is the context: the memory the model reserves to remember the current conversation (its cache, see Understanding LLM inference (in French)). It adds to the weights and grows with the context length num_ctx. Ollama reserves it when the model is loaded. Its default value depends on the VRAM, according to the official documentation on context length: 4k tokens under 24 GiB, 32k between 24 and 48 GiB, 256k from 48 GiB. Read the actual value with ollama ps, CONTEXT column. The same model can therefore take up more memory on a big card than on a small one.
A rule follows: the VRAM must be greater than the file size, by a margin that depends on the context. This margin has no fixed value, which is why the measurement below beats any figure.
How do you measure it on your machine?
Three commands are enough, in this order.
-
Read the size before downloading.
The model page on ollama.com/library lists each variant (tag) with the size of its file. For a model that is already installed,
ollama listgives theSIZEcolumn (for example 2.0 GB forllama3.2, see above). -
Load the model, then read
ollama ps.Terminal window ollama run llama3.2 "Bonjour"ollama psollama pslists the models loaded in memory. TheSIZEcolumn gives the memory taken up by the loaded model, and theCONTEXTcolumn the allocated context length. The display of version 0.40.16 has seven columns:NAME,ID,SIZE,PROCESSOR,CONTEXT,RUNNERandUNTIL, the last one telling when the model will be unloaded.The
PROCESSORcolumn says where the model runs:100% GPU(entirely in VRAM),100% CPU(entirely in system RAM) or a split such as48%/52% CPU/GPU, according to the official Ollama documentation.On a machine with no usable GPU (measured with Ollama 0.40.16 in a container, on the processor alone), the output is the following.
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTILllama3.2:latest a80c4f17acd5 2.6 GB 100% CPU 4096 llamacpp 4 minutes from nowThe memory used (2.6 GB) exceeds the file size (2.0 GB) because it also contains the memory reserved for the 4096-token context. The
100% GPUand48%/52% CPU/GPUdisplays require a GPU, which this test did not have: they are described from Ollama's code (cmd/cmd.go), not shown. -
Compare the speed.
Terminal window ollama run --verbose llama3.2 "Quelle est la capitale de l'Australie ?"With
--verbose, Ollama prints statistics at the end of the answer, includingeval ratein tokens per second. Read it on your machine, then with another model: what matters to you is the response time, not an average figure.On the processor alone (Intel Core i7-12650H, 16 threads, container with no GPU, Ollama 0.40.16), this command, which asks "What is the capital of Australia?" in French, produced these statistics. Your
eval ratewill be different.total duration: 12.05734963sload duration: 3.045835785sprompt eval count: 37 token(s)prompt eval duration: 560.597msprompt eval rate: 66.00 tokens/seval count: 123 token(s)eval duration: 8.447907999seval rate: 14.56 tokens/seval ratemeasures the speed at which the answer is written: 123 tokens generated in 8.45 seconds give 14.56 tokens per second here.
If PROCESSOR does not show 100% GPU, part of the model is computed by the processor, and the answer is slowed down. Two fixes exist: pick a smaller model, or reduce num_ctx. The lesson Ollama: troubleshooting and configuration details both, and what to do when the GPU is never used.
Which model sizes for which VRAM?
The table places the usual VRAM tiers against model sizes. The weights are those of each tag's default quantization; the remaining margin serves the context and the computations. These are orders of magnitude: the PROCESSOR column of ollama ps settles your case.
The default context grows with the VRAM (4k, 32k then 256k tokens, see above). A model that fits with a 4k context can therefore overflow onto the processor with a longer context. This is the case for the 24 GB and 48 GB rows of the table: to stay in VRAM, set the environment variable OLLAMA_CONTEXT_LENGTH (or the num_ctx option) to the value you need, then read the split in ollama ps.
| VRAM | Models whose weights fit with a margin | Source of the figure |
|---|---|---|
| 8 GB | 3B (2.0 GB for llama3.2) and 7B-8B (4.7 GB for qwen2.5-coder:7b, 4.9 GB for llama3.1:8b) | size of each tag on ollama.com/library |
| 12 GB | 14B (9.0 GB for qwen2.5-coder:14b), narrow margin | size of the tag on ollama.com/library |
| 16 GB | 14B (9.0 GB for qwen2.5-coder:14b) with a longer context | same tag |
| 24 GB | 32B (20 GB for qwen2.5-coder:32b), narrow margin: set OLLAMA_CONTEXT_LENGTH (for example 8192) | size of the tag on ollama.com/library |
| 48 GB and more | 70B (43 GB for llama3.1:70b), narrow margin at 48 GB, too narrow for a long context: set OLLAMA_CONTEXT_LENGTH (for example 8192) | size of the tag on ollama.com/library |
To find out how much VRAM your card has, read the manufacturer's data sheet or, with an NVIDIA card, the output of nvidia-smi. Compare it with the file size of the model you are aiming at: this comparison, plus a measurement with ollama ps, replaces any buying advice. The guide which model to pick in 2026 suggests, for each memory tier, models to try by use (chat, code, vision).
Which cards does Ollama use?
If you have an NVIDIA GPU with compute capability 5.0 or higher (the CUDA generation number of the card, given in its data sheet) and a driver 550 or newer, Ollama uses it automatically. Cards with compute capability 5.0 to 6.2 require a driver 570 or newer (official Ollama documentation, docs/gpu.mdx). For AMD cards, the same file requires a ROCm v7 driver on Linux as well as on Windows. Without a supported card, the CPU does the work.
Apple Silicon Macs (M1 and later) are a special case. Their unified memory is shared between the processor and the integrated GPU: the model does not have to be copied into a separate VRAM, and it is the total memory of the Mac that limits the size of the models. Ollama uses this GPU automatically, with no driver or configuration.
Prerequisites summary
Before installing Ollama, check that your machine meets the requirements below. Without a GPU, RAM is the most limiting factor: it determines the size of the models you will be able to load. These values are benchmarks of this guide, not requirements published by Ollama: the rule remains to compare the file size of the model with your memory.
| Component | Minimum | Recommended | Ideal |
|---|---|---|---|
| RAM | 8 GB | 16 GB | 32 GB |
| Disk | 20 GB free | 50 GB free | 100 GB+ (SSD) |
| Processor | Modern 64-bit | Recent multicore | Apple M1+ or Intel i7+ |
| GPU | Not required | 8 GB of VRAM (7B-8B models) | 16 GB of VRAM or more |
| System | Windows 10 22H2, macOS 14 (Sonoma), modern Linux |
Installing Ollama step by step
Pick the section that matches your operating system, then follow the steps in order.
Installing on Linux (Ubuntu, Debian, Fedora...)
On Linux, three commands are enough: download the script, read it, then run it.
-
Open a terminal
Use the
Ctrl + Alt + Tshortcut or search for "Terminal" in your applications. -
Run the installation script
Copy and paste this command and press Enter:
Terminal window # Download the official script, inspect it, then run itcurl -fsSL https://ollama.com/install.sh -o ollama-install.shless ollama-install.shsh ollama-install.shWhat do these commands do?
curl ... -o ollama-install.shdownloads the installation script from the official Ollama site into a fileless ollama-install.shlets you read the script before running it (never blindly run a remote script)sh ollama-install.shruns the script once you have read it; it detects your Linux distribution and installs Ollama
On a minimal Debian 13,
lessis not installed: install it withsudo apt install less, or read the script withmore ollama-install.sh. The script takes the latest version of Ollama; to get exactly the one of this lesson, put the variable in front of the last command:OLLAMA_VERSION=0.40.16 sh ollama-install.sh. -
Check the installation
Once finished, check that Ollama is installed:
Terminal window ollama --versionYou should see something like
ollama version is 0.40.16(the number may vary). -
Check that the service is running
Ollama runs as a background service. Check its status:
Terminal window sudo systemctl status ollamaYou should see
Active: active (running)in green, as in this output taken on Debian 13:● ollama.service - Ollama ServiceLoaded: loaded (/etc/systemd/system/ollama.service; enabled; preset: enabled)Active: active (running) since Wed 2026-11-11 18:02:17 UTC; 7s agoMain PID: 2459 (ollama)CGroup: /system.slice/ollama.service└─2459 /usr/local/bin/ollama serveThe date, the process number (PID) and the duration change from one machine to another, the rest is stable.
If something goes wrong:
# Read the service logs to diagnosesudo journalctl -u ollama -f
# Restart the servicesudo systemctl restart ollamaInstalling on Windows
On Windows, installation goes through a classic graphical installer, with no command line. Once in place, Ollama runs as a background service shown by the llama icon in the notification area: this service is what answers your commands, and closing it shuts Ollama down.
-
Download the installer
Go to ollama.com/download and click the "Download for Windows" button.
The
OllamaSetup.exefile will be downloaded. -
Run the installation
Double-click the downloaded file. If Windows asks for confirmation ("Do you want to allow this app..."), click "Yes".
The setup wizard appears. Click "Install" and wait a few moments.
-
Check the installation
Open PowerShell (search for "PowerShell" in the Start menu) and type:
Terminal window ollama --versionIf you see a version number, the installation succeeded!
-
Important note: the taskbar icon
After the installation, you will see a small Ollama icon (a llama) in the notification area (bottom right). Ollama runs in the background, which is normal and necessary for it to work.
One last Windows-specific point: on the first download of a model, Windows Defender scans the files received, and a 2 GB model takes a while to be scanned. The download then looks stuck when it is not. The scan happens only once per model, and later launches are immediate.
Installing on macOS
On macOS, Ollama is distributed as an application that you drag into the Applications folder. On Apple Silicon Macs (M1 and later), the integrated GPU is used automatically, with no driver to install.
-
Download the application
Go to ollama.com/download and click "Download for macOS".
The
Ollama.dmgfile will be downloaded. It requires macOS 14 (Sonoma) or newer; on an Intel Mac, Ollama runs on the processor only, with no GPU acceleration. -
Install the application
Double-click
Ollama.dmgto mount the disk image, then drag and dropOllama.appinto your Applications folder. On first launch, the application checks that theollamacommand is available in the terminal and offers to create the link in/usr/local/bin. -
Launch Ollama
Double-click Ollama in your Applications. macOS may ask you to confirm ("Ollama is an app downloaded from the Internet..."), click "Open".
A llama icon will appear in the menu bar at the top of the screen.
-
Check the installation
Open the Terminal (Applications → Utilities → Terminal) and type:
Terminal window ollama --versionYou should see the version number.
Downloading your first model
Ollama is installed, but it is missing the most important thing: an AI model. The model is what generates the answers; with no model loaded, Ollama cannot produce anything.
Understanding the available models
Ollama gives access to dozens of models. To start, this guide uses Llama 3.2, developed by Meta (the company behind Facebook). There are four reasons for this choice:
- it was released in September 2024 and is used as the example in many guides;
- French is among the languages Meta declares as supported;
- its 3B version weighs 2 GB, so it fits on a modest machine;
- it is a general-purpose model: text, code, translation.
To pick a more recent model or one suited to a specific use, the guide which model to pick in 2026 compares the current families.
A model's name carries two pieces of information, its family and its size: in "Llama 3.2 3B", the "3B" means 3 billion parameters. Parameters are the adjustable weights of the neural network, each one a number learned during training. The more there are, the more regularities of language the model captures, and the more memory and compute it consumes. A smaller model answers faster and needs less memory, but it reasons less well on hard tasks. To discover Ollama, a 3B model is enough.
| Model size | File (catalog example) | Typical use |
|---|---|---|
| 1-3B | 1.7 GB (gemma:2b) to 2.0 GB (llama3.2) | Simple questions, summaries, translation |
| 7-8B | 4.4 to 4.9 GB (mistral, llama3.1:8b) | Code, writing, reasoning |
| 14B | 9.0 GB (qwen2.5-coder:14b) | Complex analysis, creativity |
| 70B | 43 GB (llama3.1:70b) | Research, professional use |
Memory (RAM, or VRAM with a GPU) must be well above the file size.
If you have a GPU, the sizing rule changes: it is the VRAM (the graphics card's memory) that limits the size of the model, not the system RAM. The section "The GPU: optional but useful" above explains where the required VRAM comes from and how to measure it.
As soon as the model no longer fits entirely in VRAM, ollama ps shows a CPU/GPU split in the PROCESSOR column, and generation slows down. A smaller model that fits in VRAM beats an oversized model split between the two. The detail by use case and quantization level is covered in the guide which model to pick in 2026.
Downloading Llama 3.2
Open your terminal (or PowerShell on Windows) and type:
ollama pull llama3.2What exactly happens?
- Ollama contacts its registry (a sort of model "store")
- It downloads the model piece by piece (you will see a progress bar)
- It verifies the integrity of the downloaded files (to make sure they are not corrupted)
- It saves the model in Ollama's local storage
The duration depends on your connection and on the size of the model (2.0 GB for llama3.2). You will see something like:
pulling manifestpulling dde5aa3fc5ff: 100% ▕█████████████████ ▏ 2.0 GB/2.0 GB 17 MB/s 0spulling 34bb5ab01051: 100% ▕██████████████████▏ 561 Bverifying sha256 digestwriting manifestsuccessEach pulling line designates a layer of the model by the first twelve characters of its SHA-256 fingerprint (the digest), and dde5aa3fc5ff is the one of the llama3.2 weights. The speed shown (here 17 MB/s) depends on your connection.
The command is safe to replay: if the model is already present, ollama pull llama3.2 just checks the layers and finishes within seconds. It is also the command that updates a model when a new version is published on the registry.
Checking that the download worked
Once the download is finished, check that the model is installed:
ollama listYou should see:
NAME ID SIZE MODIFIEDllama3.2:latest a80c4f17acd5 2.0 GB About a minute agoWell done! You now have a local AI ready to use.
Your first conversation with the AI
You can now talk to your local AI.
Starting an interactive session
Type this command:
ollama run llama3.2After a few seconds of loading, a command prompt appears:
>>>This is where you will type your questions. The model is waiting for your message!
A complete conversation example
Here is an example of what you can do. Type exactly what follows the >>>:
You:
>>> Hello! Can you introduce yourself?The AI answers:
Hello! I am an AI assistant based on the Llama 3.2 model, developed byMeta. I am designed to help you with various tasks such as answering yourquestions, generating text, translating, explaining concepts, and much more.
I run entirely on your computer thanks to Ollama, which means that yourconversations stay private and are not sent anywhere.
How can I help you today?You:
>>> Explain Docker to me as if I were 10 years oldThe AI answers:
Imagine you want to play a video game at your friend's house. But the gameneeds lots of things on the computer: special files, particular settings...If your friend does not have exactly the same things, the game will notwork!
Docker is like a magic box where you put your game with EVERYTHING it needs.When you give this box to your friend, they can open the box and the gameworks right away, even if their computer is different from yours.
Developers use Docker to put their programs in "boxes" (they are called"containers"). That way, the program works the same everywhere, on anycomputer!You:
>>> Great! Now, write me a Python function that counts the words in a sentenceThe AI answers:
def count_words(sentence): """ Count the number of words in a sentence.
Args: sentence (str): The sentence to analyze
Returns: int: The number of words """ # Remove spaces at the start and end sentence = sentence.strip()
# If the sentence is empty, return 0 if not sentence: return 0
# Split the sentence into words and count them words = sentence.split() return len(words)
# Usage exampletext = "Hello, how are you doing today?"number = count_words(text)print(f"The sentence contains {number} words.")Leaving the session
To end the conversation, type:
>>> /byeYou will return to your normal terminal.
Tips for better answers
The AI works better when you give it clear and detailed instructions. Here are a few techniques:
Vague question, to avoid:
>>> Tell me about PythonPrecise question:
>>> Explain the differences between lists and tuples in Python, with examples of cases where to use one rather than the otherGeneric request, to avoid:
>>> Write some codeContextualized request:
>>> Write a Python function that takes a list of numbers and returns the average, handling the case where the list is empty. Add explanatory comments.Essential Ollama commands
Here are the commands used to manage your models and to use them without opening an interactive session.
Managing your models
Four commands cover the whole life cycle of a model: list it,
download it, delete it and inspect it. Remember ollama rm: models
pile up fast and a 70B model takes about forty gigabytes.
Delete the ones you no longer test to free up disk space.
# List all models installed on your machineollama list
# Download a new model (example: Mistral)ollama pull mistral
# Delete a model to free up disk spaceollama rm mistral
# Show a model's details (parameters, quantization, context, capabilities)ollama show llama3.2Running one-off commands
You do not have to open an interactive session. You can ask a single question:
# Ask a question and get the answer immediatelyollama run llama3.2 "What is the capital of Australia?"The answer is printed, then you return to the terminal. This is handy for quick questions or to integrate Ollama into scripts.
Using several models
You can install several models and switch between them:
# Install several modelsollama pull llama3.2ollama pull mistralollama pull qwen2.5-coder:7b
# Use Mistral for this questionollama run mistral "Write a haiku about autumn"
# Use Qwen2.5-Coder for codeollama run qwen2.5-coder:7b "Write a regex to validate an email address"Each model takes up disk space, so there is no point installing them all up front. The table below gives each one's strength and the command to get it: choose according to what you do most often, and delete another one later with ollama rm if needed.
| Model | Size | Strength | Command |
|---|---|---|---|
| llama3.2 | 2 GB | Versatile, French supported | ollama pull llama3.2 |
| mistral | 4.4 GB | General-purpose (7B) | ollama pull mistral |
| qwen2.5-coder:7b | 4.7 GB | Code generation | ollama pull qwen2.5-coder:7b |
| gemma:2b | 1.7 GB | Small model for a modest machine | ollama pull gemma:2b |
To get started, llama3.2 is plenty. Add qwen2.5-coder:7b if you do a lot of development (for the fine choice, see the 2026 model comparison), and gemma:2b if your machine is modest.
Using Ollama with Python
Ollama can also be called from your Python scripts, through the REST API on port 11434, the native ollama SDK, litellm or the OpenAI client pointed at your local instance. The guide Advanced Ollama: Python SDK, Structured Output and embeddings checks the REST API, then walks through the native SDK and the OpenAI client before building a complete assistant.
Three needs come up quickly when you plug a local LLM into code, and each has its own guide.
- Getting an answer a program can use, that is JSON that follows a schema rather than a paragraph: structured outputs with Ollama.
- Letting the model call your own functions (query a database, run a command) instead of describing what it would do: tool calling with Ollama.
- Having a multimodal model analyze images, a screenshot or a diagram: vision models with Ollama.
Troubleshooting and configuration
Common errors (Ollama does not respond, model not found, slowness) and configuration (storage location, memory limits, network exposure and security of port 11434, the context pitfall) are gathered in a dedicated guide: Ollama: troubleshooting and configuration.
Checklist
Go through these points in order to confirm that your installation is complete and working. The first two blocks are essential; the third is a matter of comfort and can wait.
Installation
These five points confirm that Ollama is properly in place and that its service is really running on your machine.
- RAM checked (8 GB minimum, 16 GB recommended)
- Disk space available (20 GB minimum)
- Ollama installed (
ollama --versionworks) - Ollama service active (icon visible or
systemctl status ollama) - With a GPU:
PROCESSORcolumn ofollama psread for my model
First model
A downloaded model and a first answer prove that the whole chain, from registry to terminal, works.
- Model downloaded (
ollama pull llama3.2) - Interactive session tested (
ollama run llama3.2) - Test question asked and answer received
Advanced use (optional)
These points are not essential to chat with the AI, they prepare the integration of Ollama into your scripts and Python projects.
- Several models installed (llama3.2, qwen2.5-coder:7b, mistral...)
- I know where to find the Python integration if needed
Key takeaways
- Ollama runs models such as Llama, Mistral or Qwen Coder directly on your machine, without sending your data to third-party servers.
- Two commands are enough to get started:
ollama pull llama3.2downloads the model,ollama run llama3.2starts the conversation. - Memory decides the model: RAM without a GPU, VRAM with a GPU, must be well above the file size.
ollama psshows where the model runs (PROCESSORcolumn) and the memory it takes up (SIZE). - There is no subscription and no message limit: the cost is that of your hardware.
- Once the model is downloaded, Ollama works offline, which serves privacy and travel.
- The REST API on port 11434 lets you call the model from your Python scripts; it only listens on
127.0.0.1as long as you do not expose it.
Knowledge check
Check that you have the essentials of this guide. The questions cover only what was just explained here.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
A new full quiz with random questions
Work again only on the questions you missed
FAQ: frequently asked questions
Key features
| Advantage | Description |
|---|---|
| Free | No usage cost, apart from hardware and electricity |
| Private | Your questions and your data stay on your machine |
| Offline | Works with no connection once the model is downloaded |
| Simple | One command to download a model, one to use it |
First try
Once Ollama is installed (graphical installer on Windows and macOS, script or archive on Linux), two commands are enough:ollama pull llama3.2
ollama run llama3.2
Use cases
- Development: code generation, debugging help
- Writing: translation, summaries, rephrasing
- Learning: experiment with AI at no cost
- Business: process sensitive data locally
Comparison
| Aspect | Ollama | ChatGPT |
|---|---|---|
| Execution | On your PC (local) | OpenAI servers (cloud) |
| Cost | Free, apart from hardware and electricity | Limited free tier, paid subscriptions, API billed by usage |
| Privacy | Data stays local | Data goes through OpenAI |
| Internet | Not required after the model is downloaded | Mandatory |
| Performance | Depends on your hardware | Depends on the service load and on your connection |
| Models | Open models: Llama, Mistral, Gemma, Qwen... | OpenAI's proprietary models |
When should you choose Ollama?
- Processing confidential data (proprietary code, internal documents)
- Limited budget or heavy usage, with no message quota
- Need to work offline
- Experimentation and learning
When should you choose ChatGPT?
- Need a bigger model than your machine can load, for hard tasks
- Machine too modest for a local model (less than 8 GB of RAM)
- Need the service's built-in features (web search, file analysis)
How does it work?
The model does not look up the answer in a database: it produces it word by word, predicting the most likely continuation given your question and what it learned during its training (books, articles, code, web pages).What do 3B, 8B or 70B mean?
The number indicates the number of parameters, in billions: these are the values learned during training. The more there are, the more capable the model, and the more memory it consumes.| Size | File to download | Example |
|---|---|---|
| 1 to 3B | 2.0 GB | llama3.2 (3B) |
| 7 to 8B | 4.9 GB | llama3.1:8b |
| 14B | 9.0 GB | qwen2.5-coder:14b |
| 70B | 43 GB | llama3.1:70b |
A few families of open models
- Llama (Meta): general-purpose, very widespread
- Qwen (Alibaba): general-purpose, good at code and tool calls
- Mistral (Mistral AI): French company, good at French
- Gemma (Google): lightweight, also available in a multimodal version
Minimum and recommended configuration
| Component | Minimum | Recommended | Ideal |
|---|---|---|---|
| RAM | 8 GB | 16 GB | 32 GB+ |
| Storage | 20 GB free | 50 GB free | 100 GB+ (SSD) |
| GPU | Not required | 8 GB of VRAM | 16 GB+ of VRAM |
| System | Windows 10 22H2, macOS 14, 64-bit Linux |
How much memory for which model?
Free memory (RAM, or VRAM with a GPU) must be well above the model's file size, which is shown on ollama.com/library:| Model | File |
|---|---|
gemma:2b |
1.7 GB |
llama3.2 (3B) |
2.0 GB |
mistral (7B) |
4.4 GB |
llama3.1:8b |
4.9 GB |
qwen2.5-coder:14b |
9.0 GB |
llama3.1:70b |
43 GB |
llama3.1:13b.Is a GPU mandatory?
No. Models run on the processor, only more slowly. With an NVIDIA card, it is the VRAM that decides the size of the model: a model that overflows from VRAM into RAM slows down sharply. On an Apple Silicon Mac, the integrated GPU is used automatically; an Intel Mac runs on the processor alone.Checking your resources
# Linux: available memory
free -h
# NVIDIA card: model and VRAM
nvidia-smi
# macOS: installed memory
system_profiler SPHardwareDataType | grep Memory
Choosing by use
| Your need | Model | Command |
|---|---|---|
| Discover Ollama | Llama 3.2 (3B) | ollama pull llama3.2 |
| General use, more quality | Qwen3 (8B) | ollama pull qwen3 |
| Programming | Qwen2.5-Coder (7B) | ollama pull qwen2.5-coder:7b |
| Very modest machine | Gemma 2B | ollama pull gemma:2b |
| Embeddings for a RAG | nomic-embed-text | ollama pull nomic-embed-text |
Comparing on your machine
ollama pull llama3.2
ollama pull qwen3
ollama run llama3.2 "Explain Docker in 3 sentences"
ollama run qwen3 "Explain Docker in 3 sentences"
Ask the same question to both models: quality and speed are judged on your own requests, not on a ranking. The guide which model to pick in 2026 details the choices by use, by GPU memory and by license.curl ... | sh.Installing with the official script
curl -fsSL https://ollama.com/install.sh -o ollama-install.sh
less ollama-install.sh
sh ollama-install.sh
The script detects your distribution, installs the binary and creates an ollama systemd service, which runs under a dedicated system account.Manual installation, without the script
The official documentation also describes an archive install: extractollama-linux-amd64.tar.zst (or the arm64 variant) into /usr, then create the ollama account and the /etc/systemd/system/ollama.service file yourself. This route suits cases where the security policy forbids running an installation script.Checking the installation
ollama --version
sudo systemctl status ollama
ollama run llama3.2 "Hello!"
Where are the files?
- Models of the service:
/usr/share/ollama/.ollama/models - Service:
/etc/systemd/system/ollama.service - Logs:
journalctl -u ollama -f
With an NVIDIA GPU
Install the NVIDIA driver first and check it withnvidia-smi: Ollama then detects the GPU automatically, with no tuning.Installation
- Download the installer from ollama.com/download
- Double-click
OllamaSetup.exeand follow the wizard - A llama icon appears in the notification area: Ollama runs in the background
Checking the installation
ollama --version
ollama run llama3.2 "Hello!"
Where are the files?
- Models and configuration:
%HOMEPATH%\.ollama - Binaries:
%LOCALAPPDATA%\Programs\Ollama(added to the user's PATH) - Logs:
%LOCALAPPDATA%\Ollama
OLLAMA_MODELS environment variable in your user account.Requirements
| Item | Required |
|---|---|
| Windows | 10 22H2 or newer, Home or Pro |
| RAM | 8 GB minimum |
| WSL2 | Not required |
| NVIDIA GPU | Optional, up-to-date driver (check with nvidia-smi) |
Installation
- Download
Ollama.dmgfrom ollama.com/download - Double-click it to mount the disk image
- Drag
Ollama.appinto the Applications folder, then launch it - On first launch, the application offers to create the link for the
ollamacommand in/usr/local/bin
Checking the installation
ollama --version
ollama run llama3.2 "Hello!"
Apple Silicon or Intel?
| Processor | Acceleration |
|---|---|
| Apple M1 and later | Processor and integrated GPU, through Metal, with no configuration |
| Intel (x86) | Processor only |
Where are the files?
- Models:
~/.ollama/models - Application:
/Applications/Ollama.app - Logs:
~/.ollama/logs/
Quick diagnosis
# Linux: free memory
free -h
# Loaded models and the memory they take up
ollama ps
Solution 1: a smaller model
Start there. The file of a 70B model weighs 43 GB (llama3.1:70b), that of llama3.2 (3B) 2.0 GB and that of gemma:2b 1.7 GB: free memory must be well above the file. A loaded model indeed takes more than its file, because Ollama also reserves the memory of the context: on Ollama 0.40.16, llama3.2 (3B) takes 2.6 GB in memory for a 2.0 GB file, with a 4096-token context (measured on the processor alone). The CONTEXT column of ollama ps gives the reserved value, and reducing num_ctx frees memory.ollama run llama3.2
ollama run gemma:2b
Solution 2: free up memory
Close memory-hungry applications (loaded browser, IDE, virtual machines) and unload unused models:ollama ps lists them, ollama stop <model> frees the memory of one of them.Solution 3: one model at a time
TheOLLAMA_MAX_LOADED_MODELS=1 variable prevents Ollama from keeping several models in memory. On Linux, set it in the service with sudo systemctl edit ollama, then sudo systemctl restart ollama.Solution 4: swap, as a last resort
Adding swap can avoid the error, but makes generation very slow: always prefer a smaller model. The guide Ollama: troubleshooting and configuration details the memory settings.Diagnosis
# Does the server respond?
curl http://localhost:11434/api/version
# Linux: service status
sudo systemctl status ollama
Solution 1: start the service
# Linux (systemd)
sudo systemctl start ollama
sudo systemctl enable ollama # automatic start
On Windows and macOS, launch the Ollama application: the llama icon must appear in the notification area or the menu bar.Solution 2: read the logs
sudo journalctl -u ollama -n 50
Three messages are worth knowing: address already in use (port already taken), permission denied (rights on the models folder), and a GPU driver error.Solution 3: port already in use
sudo ss -tlnp | grep 11434
If another instance holds the port (often an ollama serve started by hand on top of the service), stop it. To change the port, set OLLAMA_HOST=127.0.0.1:<port> for the server and for the client.Solution 4: reinstall without losing the models
Simply rerun the installation: it replaces the binary without touching the downloaded models. Do not delete the models folder, except to recover space. The guide Ollama: troubleshooting and configuration covers the other causes.Diagnosis
ollama list
The NAME column gives the exact name of each installed model, with its tag: llama3.2:latest, mistral:latest. Without a tag, Ollama adds :latest itself.Solution 1: check the exact name
Names are in lowercase and follow the official library:ollama run llama3.2 # correct
ollama run llama-3.2 # incorrect: hyphen instead of dot
ollama run Llama3.2 # incorrect: capital letter
The exact message depends on the tool. With the Python SDK or the API, a missing model gives model '...' not found (status code: 404). With ollama run, Ollama 0.40.16 first tries to download it: a nonexistent name or an unreachable registry then rather produces a pull model manifest error.Solution 2: download the model
ollama pull llama3.2
ollama pull llama3.1:8b # a specific size, by its tag
Solution 3: find the right name
The ollama.com/library library lists each model with its available tags (sizes, quantizations). Copy the name from the model page rather than guessing it.Solution 4: corrupted model
ollama rm llama3.2
ollama pull llama3.2
ollama show llama3.2
Diagnosis
# Is the registry reachable?
curl -I https://registry.ollama.ai
# Is there room left? (Linux, systemd service)
df -h /usr/share/ollama
Behind a corporate proxy
It is the Ollama server that downloads, not your terminal: a variable exported in your shell does not reach it. According to the official documentation, setHTTPS_PROXY on the service, and do not use HTTP_PROXY, which can cut clients' connections to the server. On Linux:sudo systemctl edit ollama.service
# Add:
# [Service]
# Environment="HTTPS_PROXY=https://proxy.entreprise.lan:3128"
sudo systemctl restart ollama
If the proxy inspects TLS, install its certificate authority as a system certificate. Never work around the error by disabling certificate verification.Interrupted download
Simply rerunollama pull <model>: the layers already received are kept and the download resumes where it stopped.Disk space
List models withollama list and delete those that are no longer used with ollama rm <model>: this command frees the space cleanly, without touching files by hand. To move the storage, see the question "Where are Ollama models stored?" and the guide Ollama: troubleshooting and configuration.address already in use error means a process already holds it, and it is often Ollama itself.Diagnosis
sudo ss -ltnp | grep 11434
The sudo makes the process name and PID appear.Common case: an extra ollama serve
On Linux, the systemd service installed by the official script already holds the port. Running ollama serve by hand creates a second instance, which fails. Do not run ollama serve: use the service, with sudo systemctl status ollama for the status and sudo systemctl restart ollama to restart it.Changing the port
The port is changed on the service, not in your shell:sudo systemctl edit ollama.service
# Add:
# [Service]
# Environment="OLLAMA_HOST=127.0.0.1:11435"
sudo systemctl restart ollama
Clients must then target this port, for example with OLLAMA_HOST=127.0.0.1:11435 ollama list or Client(host="http://127.0.0.1:11435") in Python. Keep the 127.0.0.1 address: 0.0.0.0 would expose an API with no authentication to the whole network. The guide Ollama: troubleshooting and configuration details these settings.Prerequisites
- An NVIDIA GPU with compute capability 5.0 or higher
- NVIDIA driver 550 or newer; cards with compute capability 5.0 to 6.2 require driver 570 or newer
- The CUDA Toolkit is not needed: Ollama ships its own libraries
- For an AMD card, the official documentation requires a ROCm v7 driver, on Linux as well as on Windows
nvidia-smi, at the top right of its output (Driver Version).Is Ollama really using the GPU?
Send a request to load the model, then:ollama ps
The CONTEXT column gives the allocated context length, and the PROCESSOR column answers: 100% GPU (entirely on the card), 100% CPU, or a split such as 48%/52% CPU/GPU, much slower. It is the reliable check; nvidia-smi additionally shows the memory used on the card.Installing the driver
Use your distribution's tool, which picks a driver compatible with your card:sudo ubuntu-drivers install on Ubuntu, the RPM Fusion repository (akmod-nvidia) on Fedora. Then restart.Forcing the use of the processor
To ignore the GPU, the official documentation prescribesCUDA_VISIBLE_DEVICES=-1, set on the service with sudo systemctl edit ollama.service (Environment="CUDA_VISIBLE_DEVICES=-1"), then a restart. If the GPU is never detected, OLLAMA_DEBUG=1 adds details to the logs. See the guide Ollama: troubleshooting and configuration.Main endpoints
| Endpoint | Method | Role |
|---|---|---|
/api/generate |
POST | Generate text from a prompt |
/api/chat |
POST | Conversation with message history |
/api/embed |
POST | Compute embeddings (vectors) |
/api/tags |
GET | List installed models |
/api/show |
POST | Details of a model |
/api/pull |
POST | Download a model |
/api/embeddings endpoint is replaced by /api/embed in the official documentation.Examples
# Simple generation
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2",
"prompt": "Explain Docker in 2 sentences",
"stream": false
}'
# Embeddings, with a dedicated model
curl http://localhost:11434/api/embed -d '{
"model": "nomic-embed-text",
"input": "Docker is a containerization platform"
}'
Without "stream": false, the answer arrives as a stream: one JSON line per fragment.From Python
Theollama SDK saves you from writing HTTP requests by hand and gives access to structured outputs: the guide Advanced Ollama: Python SDK, Structured Output and embeddings walks through it step by step, OpenAI client included.Default locations
| Case | Location |
|---|---|
| Linux, systemd service (official script) | /usr/share/ollama/.ollama/models |
Linux, ollama serve started by hand |
~/.ollama/models |
| macOS | ~/.ollama/models |
| Windows | C:\Users\%username%\.ollama\models |
ollama system user, whose home directory is /usr/share/ollama. An ollama serve started under your account therefore does not see the service's models, which explains some model not found errors.What the folder contains
manifests/: the description of each model and of its tagsblobs/: the binary layers, named by theirsha256digest
Moving the storage
Set theOLLAMA_MODELS variable on the service, never with export in your shell:sudo systemctl edit ollama.service
# Add:
# [Service]
# Environment="OLLAMA_MODELS=/srv/ollama/models"
sudo systemctl restart ollama
The new folder must be readable and writable by the ollama user (ls -ld to check). On Windows, define OLLAMA_MODELS in your account's environment variables. Details are in the guide Ollama: troubleshooting and configuration.Free and open source (MIT)
Ollama is free and open source under the MIT license. Running locally requires no subscription and no message quota: you download the software and the models, then run them at no charge.| Item | Ollama (local) | Cloud service (ChatGPT Plus) |
|---|---|---|
| Software license | Free (MIT) | Monthly subscription |
| Cost per request | 0 EUR | Billed or capped |
| Real cost | Hardware + electricity | Recurring subscription |
ollama show <model> displays.Two approaches to the local LLM
Ollama and LM Studio both run models locally, but they do not target the same use.| Criterion | Ollama | LM Studio |
|---|---|---|
| Interface | Command line + REST API | Graphical application |
| Automation | Native (ollama run, port 11434) |
Optional local server |
| Audience | Developers, servers, scripts | Discovery, desktop use |
| License | Open source (MIT) | Free, proprietary |
Official resources
These sources are the reference when a command or an option in this guide changes: the API documentation describes the endpoints of port 11434, the catalog gives the exact tags of each model, and the GitHub repository carries the release notes.
- Ollama website: ollama.com
- Source code on GitHub: github.com/ollama/ollama
- Model catalog: ollama.com/library
- API documentation: docs.ollama.com/api
- GPU support:
docs/gpu.mdxfile of the GitHub repository