Skip to main content

Ollama Model Cheatsheet

Ollama is one of the most popular tools for running LLMs locally, supporting hundreds of open-source models with one-command deployment. This cheatsheet covers model parameters, memory requirements, use-case recommendations, and complete CLI/API commands.

Updated: 2026-07-17·15 commands

Model Reference Table

🧠 General / Reasoning

ModelSizesContextHighlightsBest For
qwen30.6B / 1.7B / 4B / 8B / 14B / 30B / 32B / 235B128KAlibaba's latest, thinking mode + tool use, strong multilingualChinese tasks
llama3.18B / 70B / 405B128KMeta flagship, excellent tool callingGeneral English
llama3.21B / 3B128KLightweight & fastEdge devices
deepseek-r11.5B / 7B / 8B / 14B / 32B / 70B / 671B128KBest reasoning, CoT, near o3 levelMath/logic/code
gemma3270M / 1B / 4B / 12B / 27B128K (4B+)Google's latest, single GPU capableLightweight/vision
kimi-k2.5-128KMultimodal + agenticMultimodal agents
mistral7B32KClassic v0.3, tool callingGeneral chat
mixtral8x7B / 8x22B32KMoE, equivalent to 45B/141BHigh-value mid-range

👁️ Vision / Multimodal

ModelSizesContextHighlights
qwen3-vl2B / 4B / 8B / 30B / 32B / 235B128KBest vision-language, tools+thinking
gemma3 (4B+)4B / 12B / 27B128K⭐Single-GPU vision, 140+ languages
llava7B / 13B / 34B4KClassic vision-language
llama3.2-vision11B / 90B128KMeta official vision
qwen2.5-vl3B / 7B / 32B / 72B32KTongyi Qianwen vision, strong Chinese
deepseek-ocr3B-OCR specialist, efficient text extraction
minicpm-v8B8KEfficient vision-language
granite3.2-vision2B128KIBM document understanding
mistral-small3.124B128KMistral vision edition

📐 Embedding

ModelSizeHighlights
nomic-embed-text137M⭐Most popular, 78.6M pulls
mxbai-embed-large335MHigh accuracy
qwen3-embedding0.6B / 4B / 8BAlibaba latest, strong Chinese
all-minilm22M / 33M⭐Ultra lightweight
snowflake-arctic-embed22M~335MMulti-size options
bge-large335MBAAI, good Chinese
embeddinggemma300MGoogle

💻 Code-Specialized

ModelSizesHighlights
qwen2.5-coder1.5B / 7B / 14B / 32BAlibaba code specialist
codegemma2B / 7BGoogle code
codellama7B / 13B / 34B / 70BMeta code
deepseek-coder1.3B / 6.7B / 33BDeepSeek coding
starcoder23B / 7B / 15BMulti-language code
laguna-xs.233B (MoE, 3B active)⭐Local agentic coding
---

💾 Memory Requirements

``bash # Model Size → Approx RAM Needed (quantized) 270M~1B → 1GB RAM # Raspberry Pi / phone 3B~4B → 3GB RAM # ⭐Old laptop 7B~8B → 6GB RAM # ⭐Standard home PC 14B → 10GB RAM # High-end laptop 30B~32B → 20GB RAM # Workstation 70B → 40GB RAM # Dual GPU 235B~405B → 140GB RAM # Data center 671B → 400GB RAM # Cluster / H100 `

> Your server (1.8GB RAM + 4GB Swap): Max 1B~3B models (qwen3:0.6b / gemma3:1b / llama3.2:1b / deepseek-r1:1.5b)

---

🏆 Use-Case Picks

What you needBest ModelAlternative
Chinese chatqwen3:8bqwen3:4b
English chatllama3.1:8bgemma3:12b
Math/reasoningdeepseek-r1:14bqwen3:8b
Coding assistantqwen2.5-coder:14bdeepseek-coder:6.7b
Image understandinggemma3:12bqwen3-vl:8b
OCRdeepseek-ocr:3bqwen2.5-vl:7b
Embedding/RAGnomic-embed-textbge-large
Ultra lightweightgemma3:1b-qatllama3.2:1b
Tool/function callingqwen3:8bllama3.1:8b
Low-end/serverqwen3:0.6bdeepseek-r1:1.5b
---

🔧 CLI Commands

`bash # ─── Basic ─── ollama pull deepseek-r1:14b # Download model (specific version) ollama run qwen3:8b # Interactive chat ollama run qwen3:8b "Hello" # Single-turn Q&A ollama list # List downloaded models ollama ps # List running models ollama stop qwen3:8b # Stop a model ollama rm qwen3:8b # Delete a model

# ─── Model Management ─── ollama show deepseek-r1:14b # View model details ollama cp qwen3:8b my-qwen # Clone a model ollama push myuser/my-model # Push to registry

# ─── Custom Models ─── # Create a Modelfile cat > Modelfile << 'EOF' FROM qwen3:8b SYSTEM "You are a concise coding assistant." PARAMETER temperature 0.3 PARAMETER top_p 0.9 EOF

ollama create my-coder -f Modelfile # Build custom model ollama run my-coder # Run custom model

# ─── Environment Variables ─── OLLAMA_HOST=0.0.0.0 # Listen on all interfaces OLLAMA_MODELS=/path/to/models # Model storage path OLLAMA_NUM_PARALLEL=4 # Max concurrent requests OLLAMA_KEEP_ALIVE=5m # Model keep-alive time `

---

🌐 REST API

Ollama provides a REST API on localhost:11434 with OpenAI-compatible endpoints.

`bash # Generate text curl http://localhost:11434/api/generate -d '{ "model": "qwen3:8b", "prompt": "What is RAG?", "stream": false }'

# Chat mode (with context) curl http://localhost:11434/api/chat -d '{ "model": "qwen3:8b", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How to read CSV in Python?"} ], "stream": false }'

# Embeddings curl http://localhost:11434/api/embed -d '{ "model": "nomic-embed-text", "input": "Text to embed" }'

# Streaming (stream: true, default) curl http://localhost:11434/api/generate -d '{ "model": "deepseek-r1:14b", "prompt": "What is 1+1?" }'

# List local models curl http://localhost:11434/api/tags

# Model details curl http://localhost:11434/api/show -d '{"model": "qwen3:8b"}' `

### Python SDK

`python from openai import OpenAI

client = OpenAI( base_url="http://localhost:11434/v1", # Ollama endpoint api_key="ollama" # Not validated by Ollama )

response = client.chat.completions.create( model="qwen3:8b", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Explain list comprehensions in Python."} ] ) print(response.choices[0].message.content) `

### JavaScript / Node.js

`javascript import OpenAI from 'openai' const client = new OpenAI({ baseURL: 'http://localhost:11434/v1', apiKey: 'ollama' }) const res = await client.chat.completions.create({ model: 'qwen3:8b', messages: [{ role: 'user', content: 'Hello' }], }) console.log(res.choices[0].message.content) ``

---

📊 Parameter Counts (Total vs Active)

ModelTotal ParamsActive ParamsArchitecture
qwen3:0.6b0.6B0.6BDense
llama3.2:1b1B1BDense
deepseek-r1:1.5b1.5B1.5BDense
qwen3:4b4B4BDense
gemma3:4b4B4BDense
qwen3:8b8B8BDense
llama3.1:8b8B8BDense
deepseek-r1:8b8B8BDense (distilled)
gemma3:12b12B12BDense
qwen3:30b30B (MoE)~3BMoE
qwen3:32b32B32BDense
mixtral:8x7b47B (MoE)~13BMoE
deepseek-r1:70b70B70BDense
qwen3:235b235B (MoE)~22BMoE
llama3.1:405b405B405BDense
deepseek-r1:671b671B (MoE)~37BMoE
---

🚀 Top Models by Pulls

RankModelPullsTags
1llama3.1117.2M93
2deepseek-r189.9M35
3nomic-embed-text78.6M3
4llama3.276.7M63
5gemma338.6M26
6qwen2.534.8M133
7qwen332.3M58
8mistral31.1M84
9gemma227.9M94
10llama324.7M68
11llava (vision)14.3M98
12mxbai-embed-large12.6M4
13minicpm-v5.3M17
14llama3.2-vision4.9M9
15qwen3-vl4.5M57

Basic Operations(5)

CommandLevel
ollama pull <model>
Download a model from the registry to local
Basic
ollama run <model>
Run a model and enter interactive mode
Basic
ollama list
List locally available models
Basic
ollama rm <model>
Remove a model from local
Basic
ollama cp <src> <dst>
Copy a model (create an alias)
Intermediate

Configuration(4)

CommandLevel
ollama show <model>
Show model details (parameters, template, system prompt)
Intermediate
ollama create <name> -f ./Modelfile
Create a custom model from a Modelfile
Intermediate
ollama push <model>
Push a model to a remote registry
Intermediate
OLLAMA_MODELS=/path/to/models ollama serve
Specify custom model storage directory
Expert

Advanced Operations(6)

CommandLevel
ollama serve
Start the Ollama server (default localhost:11434)
Intermediate
ollama ps
List models currently loaded in memory
Basic
curl http://localhost:11434/api/generate -d '{"model":"llama3.2","prompt":"Hello"}'
Call model via REST API for text generation
Intermediate
curl http://localhost:11434/api/chat -d '{"model":"llama3.2","messages":[{"role":"user","content":"hi"}]}'
Chat via REST API with message history
Intermediate
ollama stop <model>
Stop a running model
Basic
OLLAMA_HOST=0.0.0.0 ollama serve
Listen on all network interfaces (allow remote access)
Ensure firewall protection when enabling remote access
Expert

FAQ

This cheatsheet is compiled from official tool documentation. Last updated: 2026-07-17.