How to Run AI Locally on Windows, Mac or Linux – Step by Step
Install Ollama, download a small model and get a reply from your own computer. Choose Windows, Mac or Linux. LM Studio is a graphical alternative.
Install Ollama, download a model and send your first prompt. The model generates its reply on your computer. Choose the steps for Windows, Mac or Linux.
What you need
- The Ollama app (terminal is optional)
- Qwen 3.5 4B as a first model
- Internet for installation and the model download
- Optional: Docker Desktop and Open WebUI on Windows or Mac
What each part does
- 01Open WebUI
The chat screen in your browser. Optional.
- 02Ollama
Downloads the model and runs it on your computer.
- 03Qwen
The language model that reads your prompt and writes a reply.
- 04Your hardware
Your CPU, GPU and RAM or unified memory do the work.
Start with Ollama and Qwen. Add Open WebUI only after the first reply works.
Windows
1. Install Ollama
Install with the app
Download the installer, open it and follow the normal installation flow.
Download Ollama for Windows ↗Optional: show terminal command
Install from PowerShell
Official Ollama installer for Windows.
irm https://ollama.com/install.ps1 | iex2. Get Qwen 3.5 4B
Use the Ollama app
Open Ollama’s model selector or library. Search for Qwen 3.5 4B and download the local model.
Qwen 3.5 on Ollama ↗Optional: show terminal command
ollama pull qwen3.5:4b
Download the model without starting a chat.
ollama pull qwen3.5:4b3. Start Qwen
Use the Ollama app
Select Qwen 3.5 4B in the Ollama app to open the chat.
Optional: show terminal command
ollama run qwen3.5:4b
Start the model in an interactive terminal chat.
ollama run qwen3.5:4b4. Send your first prompt
Explain the difference between RAM and VRAM to someone who has never built a computer. Use no more than five short bullet points.
You are ready when: Ollama shows a reply below your prompt and the selected model is qwen3.5:4b. If the app still offers a download, the model is not ready yet.
Mac
1. Install Ollama
Install with the app
Download the app and install or open it normally. Choose the build for your Mac chip if asked.
Download Ollama for macOS ↗Optional: show terminal command
Terminal
Official Ollama install script for macOS.
curl -fsSL https://ollama.com/install.sh | sh2. Get Qwen 3.5 4B
Use the Ollama app
Open Ollama’s model selector or library. Search for Qwen 3.5 4B and download the local model.
Qwen 3.5 on Ollama ↗Optional: show terminal command
ollama pull qwen3.5:4b
Download the model without starting a chat.
ollama pull qwen3.5:4b3. Start Qwen
Use the Ollama app
Select Qwen 3.5 4B in the Ollama app to open the chat.
Optional: show terminal command
ollama run qwen3.5:4b
Start the model in an interactive terminal chat.
ollama run qwen3.5:4b4. Send your first prompt
Explain the difference between RAM and VRAM to someone who has never built a computer. Use no more than five short bullet points.
You are ready when: Ollama shows a reply below your prompt and the selected model is qwen3.5:4b. If the app still offers a download, the model is not ready yet.
Linux
Ollama’s official Linux installation supports x86-64 and ARM64. The command downloads Ollama’s install script and runs it with the shell.
1. Install Ollama
Install Ollama from a terminal
https://docs.ollama.com/linux
curl -fsSL https://ollama.com/install.sh | shCheck the installation
ollama -v
Check the installation
ollama -vStart Ollama if it is not running
If Ollama is already running as a service, continue to the next step. Otherwise, start the server with one of the commands below. Leave the terminal open after ollama serve and use a new terminal for the next steps. Use the systemd command only if you configured that service. sudo requires administrator rights.
ollama serve
ollama servesudo systemctl start ollama
sudo systemctl start ollama2. Get Qwen 3.5 4B
Download Qwen 3.5 4B
Download the model without starting a chat.
ollama pull qwen3.5:4b3. Start Qwen
ollama run qwen3.5:4b
Start the model in an interactive terminal chat.
ollama run qwen3.5:4bLM Studio: a graphical alternative
LM Studio is a separate app for Windows, Mac and Linux. Use it if you prefer to discover, download and chat with models in a graphical interface.
LM Studio’s current system requirements list Macs with M1, M2, M3 or M4 chips and macOS 14 or later. Intel Macs are not supported. On Linux, the app is distributed as an AppImage; LM Studio lists Ubuntu 20.04 or newer as a requirement.
Download LM Studio ↗Official guide ↗
Install the app
Download the official build for your operating system and open LM Studio.
Find a model
Open Discover, search for a model, and check its publisher, size and quantization before downloading.
Download and chat
Download the model, open Chat, select it and send a short prompt. Model search and downloads need internet.
Try offline
After download, LM Studio can chat without internet. Disconnect the network and send a prompt to check your setup.
Chat uses the downloaded model locally. Discover, model downloads and app updates use an internet connection.
Once Ollama works: four useful commands
You do not need a terminal to chat in the app. These commands help when you want to start a specific model or check what is running.
Run Qwen in a terminal
ollama run qwen3.5:4bList downloaded models
ollama lsSee models running now
ollama psStop the loaded model
ollama stop qwen3.5:4bCheck that the model is running locally
Run ollama ps while the model is replying. Its table lists active models, how long they have been loaded and where computation is placed when that information is available. A CPU/GPU split describes offload for that run; it does not measure answer quality.
On Windows, open Task Manager and look for GPU or memory activity while a reply is being generated. On a Mac, Activity Monitor can show processes and memory pressure. Those numbers alone do not prove that all work ran on the GPU, but alongside ollama ps they provide a useful snapshot.
Try a simple offline check
- Finish downloading the model while online.
- Turn off Wi-Fi and disconnect Ethernet if connected.
- Ask qwen3.5:4b: “Write a short story about a dog learning to use a computer.”
If it replies with the network disconnected, that shows this text generation did not need a cloud model. It does not prove other apps or later integrations are offline. Ollama also offers cloud models; choose the local model without a cloud label.
Add Open WebUI for browser chat
Open WebUI adds a browser chat screen, conversation history and a model selector. This Docker guide is for Windows and Mac. Ollama already works without Open WebUI; this part is optional.
Docker Desktop for Windows ↗Docker Desktop for Mac ↗Open WebUI official Docker guide ↗
Install Docker Desktop
Download the official app for Windows or Mac, install it and open it. Wait until Docker reports that its engine is running.
Create an Open WebUI key
Generate a random WEBUI_SECRET_KEY. Keep it private and use the same key if you recreate the container.
Start the container
Run the Docker command with your generated key. It stores data in a Docker volume and connects the container to Ollama on your computer.
Open the local page
Create an account in your local Open WebUI installation, select qwen3.5:4b and send a short prompt.
Generate a random key with OpenSSL
OpenSSL
openssl rand -hex 32macOS usually includes OpenSSL. On Windows, use Git Bash or another OpenSSL installation. Never share the key.
Start Open WebUI in Docker
Docker run
docker run -d -p 127.0.0.1:3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY=your-secret-key --name open-webui --restart always ghcr.io/open-webui/open-webui:mainReplace your-secret-key with the value generated by the previous command.
Port 3000 on this computer maps to port 8080 in the container and is bound to 127.0.0.1. The open-webui Docker volume saves data across restarts. Docker Engine versions before 28.0.0 had a known issue where published loopback ports could be reached by other devices on the same network layer; use version 28.0.0 or later.
If something does not work
- No model appears
- Check that the download finished and that you selected qwen3.5:4b without a cloud label. The first download needs an internet connection.
- The Ollama service is missing on Linux
- If you set up a systemd service, check it with systemctl status ollama. Otherwise, start Ollama in a terminal with ollama serve. Use sudo only if your account has administrator rights.
- Ollama is very slow
- Close demanding apps, try the small model again and allow time for its first load. Speed depends on model variant, context, memory, runtime and GPU offload, among other things.
- Open WebUI cannot find Ollama
- Make sure Ollama is still running. The connection should use http://host.docker.internal:11434 when Ollama runs on your host and Open WebUI runs in Docker on Windows or Mac.
- Port 3000 is in use
- Stop the other local service or change the host port to 3001 in the Docker command, for example 127.0.0.1:3001:8080. Then open http://127.0.0.1:3001.
After the 4B model works
Ollama’s Qwen 3.5 library lists 0.8B, 2B, 4B, 9B, 27B, 35B and 122B tags (model list checked against Ollama on 15 November 2026). If 4B works well, try 9B next; 27B, 35B and 122B generally need more storage and memory. Actual use also depends on quantization, context and runtime.
File size is not the same as required RAM or VRAM. Practical use also depends on quantization, context, runtime, GPU offload, operating system and what else is open. There is no single minimum that means a model will work perfectly.
Five useful terms
- 4B, 9B and 27B
- B means billion model parameters. The number says something about model size, but does not predict answer quality or speed by itself.
- Quantization
- A way to store model weights with fewer bits so the file takes less space. This can reduce memory needs, with results that vary by model and task.
- VRAM and RAM
- VRAM is memory on a graphics card. System RAM is the computer’s main memory. Apple Silicon uses unified memory shared by CPU and GPU; the OS and apps need some too.
- Context
- The text and conversation the model can work with at once. Longer context uses more memory and can slow processing.
- Tokens per second
- A rough measure of how quickly the model writes after it starts responding. It differs from time to first token and answer quality.
Being able to run a model is only the first test
The model starts and produces output.
Speed, memory use and stability fit the work you actually want to do.
Quality, speed, context, hardware needs, cost and usability make sense together.
RigRoute Labs measures local AI setups because model names and nominal system requirements do not tell the whole story. Our existing Mac study looks at first-token delay, generation and task outcomes; it uses a different model and is not a direct Qwen recommendation.
How RigRoute Labs measures local AI ↗
See the measured Qwen3 results from the RX 7800 XT + Arc A770 ↗
Measure your own machine with the RigRoute AI Benchmark ↗
From measurement to decision: the RigRoute Local AI Decision Engine ↗
Common questions
Can I run local AI without programming?
Yes. Ollama and LM Studio have graphical apps for Windows and Mac, and Ollama has an official Linux installation. Terminal commands and Open WebUI are optional.
Do I need to be online?
You need a connection to download Ollama and the model. After the local model is downloaded, text generation can work offline. Cloud models and external integrations need a connection.
Are my prompts private?
Ollama runs the local inference shown here on your computer, but check tools and connections you add. This guide does not promise the entire computer or Open WebUI will always be offline.
What computer can run Qwen 3.5 4B?
Ollama has Windows, Mac and Linux builds, but whether the model feels fast or fits comfortably in memory depends on hardware and settings. Start with the small model and judge it on your machine.
Official setup guides and model listing
- Download Ollama for Windows ↗
- Download Ollama for macOS ↗
- Ollama on Linux ↗
- Ollama’s app for Windows and macOS ↗
- Ollama CLI reference ↗
- Ollama FAQ: local network address ↗
- Qwen 3.5 models on Ollama ↗
- LM Studio: app basics ↗
- LM Studio: system requirements ↗
- LM Studio: offline use ↗
- Docker: port publishing ↗
- Open WebUI Docker Quick Start ↗
- Open WebUI Ollama connection ↗
- Docker Desktop for Windows ↗
- Docker Desktop for Mac ↗
Next step
You now have a local model that can answer. The next step is choosing one that fits your hardware and the work you want it to do.