MeshWorld India LogoMeshWorld.

How to Run DeepSeek R1 & Llama 3.3 Locally (Ollama vs vLLM Guide)

(Updated: Aug 20, 2026)
Listen to ArticleAI Speech
~6 min read narration
100%
How to Run DeepSeek R1 & Llama 3.3 Locally (Ollama vs vLLM Guide)

Sending proprietary code to commercial cloud endpoints creates security risks and per-token API costs. Open-weights models like DeepSeek R1 and Meta’s Llama 3.3 allow developers to execute reasoning-grade AI workloads locally with full data privacy, zero recurring billing, and no cloud rate limits.


The catch: you need a GPU (or patience on CPU). This guide covers both Ollama for quick local chat and vLLM for serving an API your apps can call. Pair it with our Cursor MCP Server setup and Cursor can talk to your local models directly.


Ollama vs vLLM — Pick Your Engine

CODE
graph TD
    Client[Local App / Cursor IDE / Terminal] --> Router{Select Local Engine}
    
    Router -->|Developer Terminal Chat| OllamaEngine[Ollama Engine :11434]
    Router -->|High-Throughput API| vLLMEngine[vLLM Server :8000]
    
    subgraph GPU Hardware VRAM
        OllamaEngine -->|GGUF Quantization| LocalGPU[NVIDIA / Apple Silicon GPU]
        vLLMEngine -->|PagedAttention Memory| LocalGPU
    end
    
    LocalGPU --> Output[Local Reasoning Output]

Ollama if you want to chat in a terminal or wire up a single-user workflow. vLLM if you need an OpenAI-compatible endpoint that multiple clients hit at once. Most solo devs start with Ollama and graduate to vLLM when they need an API.


VRAM Requirements — Don’t OOM Your GPU

Pick the wrong model size and you’ll get out-of-memory errors before the first token streams. Match the model to your hardware:

ModelParametersQuantizationMin VRAMHardware that works
DeepSeek R1 Distill 8B8BQ4_K_M6 GBRTX 3060, Apple M1 (16 GB unified)
DeepSeek R1 Distill 14B14BQ4_K_M10 GBRTX 4070, Apple M2 (24 GB)
DeepSeek R1 Distill 32B32BQ4_K_M20 GBRTX 3090/4090, Apple M3 (36 GB)
Llama 3.3 70B Instruct70BQ4_K_M / AWQ40 GB2× RTX 3090, Apple M2 Ultra

If you’re on an 8 GB card, stick to DeepSeek R1 8B. Don’t try to force 70B — you’ll spend more time troubleshooting OOM errors than getting work done.


Run DeepSeek R1 with Ollama

Ollama is the fastest path to local AI. One install command, one run command, you’re chatting.

BASH
# Install Ollama (Linux/macOS)
curl -fsSL https://ollama.com/install.sh | sh

# Pull and run DeepSeek R1 8B
ollama run deepseek-r1:8b

# Or try the 14B variant if you have the VRAM
ollama run deepseek-r1:14b

First run downloads the GGUF weights (a few GB). After that, you get a >>> prompt streaming reasoning tokens locally. DeepSeek R1 shows its chain-of-thought before the final answer — that’s the model working, not a bug.

When I use Ollama: Quick code review on a flight, testing prompts before sending them to a paid API, or running models on a laptop without setting up a full inference server.


Serve Llama 3.3 with vLLM (OpenAI-Compatible API)

vLLM uses PagedAttention to serve multiple concurrent requests efficiently. If you’re building an app that calls /v1/chat/completions, this is the setup.

BASH
pip install vllm
BASH
vllm serve meta-llama/Llama-3.3-70B-Instruct-AWQ \
  --quantization awq \
  --port 8000 \
  --max-model-len 8192 \
  --gpu-memory-utilization 0.92

Test the endpoint:

BASH
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta-llama/Llama-3.3-70B-Instruct-AWQ",
    "messages": [{"role": "user", "content": "Write a Python script for PostgreSQL backups."}]
  }'

You get streaming JSON chunks back — same format as OpenAI’s API. Point Cursor, LangChain, or any OpenAI SDK client at http://localhost:8000/v1 and it just works.

Heads up: vLLM needs Python 3.10+ and CUDA 12. The 70B model needs serious VRAM — if you’re on 16 GB, stick with smaller AWQ-quantized variants or use Ollama instead.


Technical References & Official Documentation


Frequently Asked Questions

How much VRAM does DeepSeek R1 need?

8B (Q4_K_M): 6 GB. 14B: 10 GB. 32B: 20 GB. These are minimums — leave headroom for context length or you’ll OOM mid-conversation.

Ollama or vLLM — which is faster?

Different jobs. Ollama wins on setup speed — you’re running in 60 seconds. vLLM wins on concurrent throughput when multiple clients hit the same endpoint. For solo terminal chat, Ollama. For an API serving a team, vLLM.

Can I run these on CPU only?

Yes, both Ollama and llama.cpp fall back to CPU. Expect 2–5 tokens/sec instead of 30+ on GPU. Usable for testing, painful for daily work. Budget for a GPU if you’re serious about local inference.


Reader Quality Feedback

Did this technical guide help solve your problem?

Suggest Errata ($0)
Vishnu
Primary Author

Vishnu

Founder & Principal Architect at MeshWorld. Senior engineer and instructor specializing in AI agent systems, scalable web architecture, and modern development workflows.

Explore Author Archive
Compute Fuel & Open Testbed
100% Independent & Verified

Fuel High-Density, Zero-Fluff Engineering Deep-Dives

Every guide on MeshWorld is validated on physical Linux nodes and reproducible testbeds. If this article saved you hours of debugging or unblocked production, consider funding our next cluster run.

Weekly Dispatch

Join MeshWorld Dispatch

Get practical tutorials, system blueprints, and curated AI engineering notes straight to your inbox. No fluff, zero spam.

Zero spam. 1-click unsubscribe anytime.Prefer RSS?
Curated Continuations

Up Next in This Domain.

Browse Full Archive