Best Local LLMs for 8GB RAM Laptops (CPU & Budget GPU Guide)

Updated: November 26, 2026 • Hardware-First Local AI Guide

Quick Answer: On an 8 GB RAM laptop, Windows or Linux already consumes 2.5–3 GB of memory, leaving roughly 4.5–5 GB of safe headroom. Stick to 3B to 4B parameter models in Q4_K_M quantization such as Qwen 2.5/3.5 3B–4B, Llama 3.2 3B, Microsoft Phi-4-mini, or Qwen2.5-Coder 3B.

Searching for the best local LLM for 8GB RAM often leads to frustrating trial and error. Many generic tutorials copy recommendations for 7B or 8B models without mentioning that your operating system, browser, and terminal already reserve gigabytes of memory. Once the model weights and active KV cache fill your remaining RAM, your laptop starts swapping to SSD and generation speed drops to a crawl.

Chart showing memory budgets for 8GB RAM, 16GB RAM, and 24GB VRAM systems running local LLMs
Why 8 GB total system RAM translates into roughly 4.5 GB of usable model headroom.

The Real 8 GB RAM Budget (Before Picking Any Model)

Total installed RAM is never equal to free AI memory. On a typical student Windows 11 or Ubuntu desktop laptop:

  • Operating system + background services: ~2.0–3.0 GB
  • Browser tabs / code editor / PDF reader: ~1.0–1.5 GB
  • Safe headroom remaining for LLM weights + KV cache: ~3.5–4.8 GB

Because every generated token also requires KV-cache memory that scales with context length, leaving at least 1 GB of free buffer prevents sudden freezes. Check our complete LLM RAM & VRAM requirements guide for the exact math.

Top Local LLMs for 8 GB RAM Laptops

ModelParametersApprox. Q4 File SizeBest Student / Dev Use CaseOllama Command
Llama 3.2 3B3B~2.0 GBFast everyday chat, summarizing lecture PDFsollama run llama3.2:3b
Qwen 2.5 3B / 3.5 4B3B–4B~1.9–2.6 GBInstruction following, structured logic, multilingualollama run qwen2.5:3b
Microsoft Phi-4-mini~3.8B~2.5 GBReasoning density on tight memory budgetsollama run phi4-mini
Qwen2.5-Coder 3B3B~1.9 GBDebugging Python/C++ errors and quick scriptsollama run qwen2.5-coder:3b
Qwen2.5-Coder 1.5B1.5B~1.0 GBInstant VS Code tab autocomplete alongside IDEollama run qwen2.5-coder:1.5b

Which Models Should You Choose by Task?

1. Best All-Around Chat & Study Assistant: Qwen 3B–4B or Llama 3.2 3B

If you want balanced writing quality, clean markdown formatting, and reliable question answering without choking background apps, Llama 3.2 3B and Qwen 2.5 3B stay around 2 GB on disk and leave plenty of breathing room on 8 GB systems.

2. Best Reasoning Per Megabyte: Phi-4-mini

Microsoft’s Phi-mini family is explicitly designed for high reasoning density under constrained parameter counts. When an 8 GB laptop is already running an IDE or browser tabs, Phi-4-mini fits cleanly without forcing system slowdown.

3. Best Coding Companion on 8 GB RAM: Qwen2.5-Coder 1.5B & 3B

If your main goal is programming homework or debugging stack traces offline, pick Qwen2.5-Coder 3B for chat or 1.5B for lightweight autocomplete. Compare more setups in our best local LLMs for coding guide.

Why Large 7B/8B and Q8 Models Fail on 8 GB Laptops

A 7B model compressed to Q4_K_M needs ~4.4 GB strictly for weights—before your prompt context even grows. Attempting Q8_0 pushes that same 7B model past 7.5 GB, guaranteeing disk swap or an out-of-memory error. Stick strictly to Q4_K_M or Q4_0; read our GGUF quantization guide to see the full size breakdown.

5 Optimization Tips for 8 GB Inference

  1. Install Ollama cleanly using our how to run an LLM locally walkthrough.
  2. Close Chrome/Edge tabs and Electron apps before starting heavy sessions.
  3. Limit context length to 2048 or 4096 tokens in a custom Modelfile so KV cache never balloons—instructions in our Ollama out of memory fix.
  4. Unload idle models between switches with keep_alive: 0.
  5. If you lack a discrete GPU entirely, read our CPU-only LLM setup tips.

Frequently Asked Questions

Can I run a 7B model on 8 GB RAM at all?

Only under tight conditions—such as a minimal Linux terminal session, Q4_K_M or Q3_K_M quantization, and a small num_ctx of 2048. For smooth daily work alongside a browser or code editor, 3B–4B models are far more practical.

Which tool uses less memory on 8 GB RAM: Ollama or LM Studio?

Ollama runs as a lightweight background CLI daemon with lower graphical memory overhead than Electron-based desktop apps, making it ideal when every megabyte matters.

How do I check if my 8 GB laptop is swapping to SSD?

Open Task Manager on Windows or run htop / free -h on Linux while generating text. If physical RAM reaches 95%+ and generation drops to 1–2 tokens per second, lower your context length or switch to a 1.5B–3B model.