How to Run AI Models Locally on Your PC
A practical, hardware-first guide to running a local LLM on Windows, with no cloud, no subscription and no data leaving your machine.
Table of Contents
Why run AI locally?
- Privacy. Your prompts, documents and code stay on your machine. That matters for client work, contracts, financial notes and anything you would not paste into a website.
- No per-use cost. After the hardware, every prompt is free. Heavy users and developers running thousands of calls save the most.
- Offline access. Planes, bad Wi-Fi and outages stop mattering.
- Control. You choose the model, the settings and the version. Nothing changes under you overnight.
- A local API. Tools like Ollama and LM Studio expose an OpenAI-compatible endpoint on localhost, so you can plug a local model into your own apps and scripts.
Step 1: Check your hardware (this decides everything)
- GPU VRAM is the fastest. If the whole model fits in your graphics card’s memory, you get snappy responses.
- System RAM works too, but is much slower. If a model does not fully fit in VRAM, the rest spills into RAM and speed drops sharply.
- Apple unified memory (on Macs) acts as both, which is why Macs punch above their weight for local AI. This guide focuses on Windows PCs.
How to see what you have on Windows
- System RAM: Press Ctrl + Shift + Esc to open Task Manager, then go to Performance > Memory.
- GPU and VRAM: In the same Performance tab, click your GPU and look at “Dedicated GPU memory”. On NVIDIA cards you can also open Command Prompt or PowerShell and run
nvidia-smi.
What your hardware can realistically run
| Your hardware | Comfortable model size (4-bit) | What to expect |
|---|---|---|
| 8 GB RAM, no dedicated GPU | 1B to 3B | Basic chat, summaries. Slow but usable. |
| 16 GB RAM, no dedicated GPU | 7B to 8B | Decent everyday assistant, modest speed. |
| GPU with 8 GB VRAM | 7B to 9B | Fast responses, limited room for long context. |
| GPU with 12 to 16 GB VRAM | 12B to ~20B | The sweet spot for most people. |
| GPU with 24 GB VRAM | ~30B class | Serious local work, strong coding and reasoning. |
| 32 GB+ VRAM or large unified memory | Larger still | Enthusiast territory. |
- Buy and choose for the model you want to run. VRAM is the one thing you cannot upgrade later on most cards.
- Do not push past your VRAM. If you try to run a model that is slightly too big for your GPU, it will technically work but crawl, because layers are offloaded to system RAM. The fix is not a faster CPU. It is a smaller model, a more aggressive quantization, or more VRAM. Just like keeping Windows lightweight and stable without system modifications (as discussed in Building a Safer macOS-Style Setup for Windows 11), respecting your hardware boundaries keeps your setup reliable.
Step 2: Pick your tool (Ollama vs LM Studio vs Jan)
| Tool | Best for | Interface |
|---|---|---|
| Ollama | Developers, anyone who wants the quickest start and a local API | Command line, now with a desktop app |
| LM Studio | Beginners and anyone who likes a polished visual interface | Full desktop GUI |
| Jan | A simple, offline ChatGPT-style assistant | Desktop app |
llama.cpp, which is why improvements tend to benefit all of them at once.Step 3A: Set up a local LLM on Windows with Ollama
- Download and install. Go to ollama.com, download the Windows installer, and run it.
- Open a terminal. Use PowerShell or Command Prompt.
- Run a model. One command downloads the model the first time and then starts a chat:
That particular model is a good fit for a machine with roughly 16 GB of memory available. On a smaller machine, pick a smaller model from the Ollama library instead. Look for the 1B to 4B models for 8 GB systems and the 7B to 9B models for 8 GB GPUs.ollama run gpt-oss:20b - Chat. Type a question and press Enter. Type
/byeto exit. - See what is installed. Run
ollama list. To free disk space, runollama rm <model-name>.
http://localhost:11434. That is what makes it popular with developers: you can point scripts, coding assistants and chat front-ends at it without an API key.Step 3B: Set up local AI with LM Studio (no terminal needed)
- Download and install LM Studio from lmstudio.ai.
- Open the Discover tab and search for a model. LM Studio shows size and quantization options and will usually flag whether a model is likely to fit your hardware.
- Download a model and wait for it to finish.
- Load it from the chat tab and start talking.
- Tune it if you like. LM Studio exposes the controls that matter on a given machine, including how many layers to offload to the GPU, the quantization level and the context length.
- Optional: switch on the local server to get an OpenAI-compatible API, just like Ollama.
Step 4: Choose a model that fits
- Gemma 4 (Google): strong all-rounder, with sizes spanning small laptops to bigger GPUs.
- Qwen3 (Alibaba): popular for multilingual work and coding, in many sizes.
- gpt-oss (OpenAI's open-weight models): a capable 20B option that suits 16 GB-class machines.
- Phi-4-mini (Microsoft): a compact text model for low-memory machines. Pick the “instruct” variant, because similarly named reasoning and multimodal models are separate checkpoints with different requirements.
- Low-end laptop: a small model in the 1B to 4B range, for quick drafts and summaries.
- Typical gaming PC (8 to 12 GB VRAM): a 7B to 14B model for general use.
- Coding help: a coding-tuned model that fits your VRAM, such as a Qwen3-Coder variant.
- Best quality your hardware allows: the largest model that fits fully in VRAM at 4-bit quantization.
Step 5: Make it nicer to use
- A chat interface. Open WebUI is a popular browser-based front end that connects to Ollama and gives you a ChatGPT-style experience, with history and document upload.
- Chat with your files. Several local tools support retrieval over your own documents, so you can ask questions about PDFs and notes without uploading them anywhere.
- Coding assistants. Editors and agents such as Cline can connect to a local Ollama or LM Studio model, giving you private code help.
- Your own apps. Because the local server is OpenAI-compatible, you can point scripts, pipelines, and AI platforms like Diver AI to localhost with a single configuration change.
Step 6: Troubleshooting common problems
It is painfully slow. The model probably does not fit in VRAM and is spilling into system RAM. Try a smaller model or a lower-bit quantization, close other GPU-heavy apps, and check that your GPU is actually being used.
It crashes or fails to load. Usually an out-of-memory error. Choose a smaller model, shorten the context length, or close browsers and games.
The GPU is not used. Update your graphics drivers. On NVIDIA, confirm nvidia-smi works. In LM Studio, check the GPU offload setting.
Answers are poor. Make sure you picked an “instruct” or chat-tuned model rather than a base model, and try a larger size or a better quantization if you have the memory.
Downloads are huge. Models range from under 2 GB to tens of gigabytes. Keep an eye on disk space and delete models you no longer use.
How private is local AI, really?
- Check each app’s settings for telemetry and update checks.
- Be careful with web-search or cloud-connected extensions.
- Download models only from reputable sources.
- Consider blocking the app’s network access once your models are downloaded, if you want a strictly offline setup.
For an in-depth guide on keeping documents, prompts, and local APIs private, read How to Use AI Without Sending Your Data to the Cloud.
Is it worth it?
Frequently asked questions
Quick-start checklist
- Check your RAM and VRAM in Task Manager.
- Install Ollama or LM Studio.
- Start with a model that fits comfortably in your VRAM at 4-bit.
- Add a chat interface or connect your editor once it works.
- Review privacy settings if staying private is the goal.
- Scale up the model size only if you have the memory for it.
Have a setup you want me to cover, or a GPU you are wondering about? Looking to stack free cloud API tiers instead of running models on your own GPU? Check out my guide on getting free AI tokens with FreeLLMAPI. Get in touch and it might become the next guide in the Observatory.