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.
Model Reference Table
🧠 General / Reasoning
| Model | Sizes | Context | Highlights | Best For |
| qwen3 | 0.6B / 1.7B / 4B / 8B / 14B / 30B / 32B / 235B | 128K | Alibaba's latest, thinking mode + tool use, strong multilingual | ⭐Chinese tasks |
| llama3.1 | 8B / 70B / 405B | 128K | Meta flagship, excellent tool calling | General English |
| llama3.2 | 1B / 3B | 128K | Lightweight & fast | Edge devices |
| deepseek-r1 | 1.5B / 7B / 8B / 14B / 32B / 70B / 671B | 128K | ⭐Best reasoning, CoT, near o3 level | Math/logic/code |
| gemma3 | 270M / 1B / 4B / 12B / 27B | 128K (4B+) | Google's latest, single GPU capable | Lightweight/vision |
| kimi-k2.5 | - | 128K | Multimodal + agentic | Multimodal agents |
| mistral | 7B | 32K | Classic v0.3, tool calling | General chat |
| mixtral | 8x7B / 8x22B | 32K | MoE, equivalent to 45B/141B | High-value mid-range |
👁️ Vision / Multimodal
| Model | Sizes | Context | Highlights |
| qwen3-vl | 2B / 4B / 8B / 30B / 32B / 235B | 128K | ⭐Best vision-language, tools+thinking |
| gemma3 (4B+) | 4B / 12B / 27B | 128K | ⭐Single-GPU vision, 140+ languages |
| llava | 7B / 13B / 34B | 4K | Classic vision-language |
| llama3.2-vision | 11B / 90B | 128K | Meta official vision |
| qwen2.5-vl | 3B / 7B / 32B / 72B | 32K | Tongyi Qianwen vision, strong Chinese |
| deepseek-ocr | 3B | - | ⭐OCR specialist, efficient text extraction |
| minicpm-v | 8B | 8K | Efficient vision-language |
| granite3.2-vision | 2B | 128K | IBM document understanding |
| mistral-small3.1 | 24B | 128K | Mistral vision edition |
📐 Embedding
| Model | Size | Highlights |
| nomic-embed-text | 137M | ⭐Most popular, 78.6M pulls |
| mxbai-embed-large | 335M | High accuracy |
| qwen3-embedding | 0.6B / 4B / 8B | Alibaba latest, strong Chinese |
| all-minilm | 22M / 33M | ⭐Ultra lightweight |
| snowflake-arctic-embed | 22M~335M | Multi-size options |
| bge-large | 335M | BAAI, good Chinese |
| embeddinggemma | 300M |
💻 Code-Specialized
| Model | Sizes | Highlights |
| qwen2.5-coder | 1.5B / 7B / 14B / 32B | Alibaba code specialist |
| codegemma | 2B / 7B | Google code |
| codellama | 7B / 13B / 34B / 70B | Meta code |
| deepseek-coder | 1.3B / 6.7B / 33B | DeepSeek coding |
| starcoder2 | 3B / 7B / 15B | Multi-language code |
| laguna-xs.2 | 33B (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 need | Best Model | Alternative |
| Chinese chat | qwen3:8b | qwen3:4b |
| English chat | llama3.1:8b | gemma3:12b |
| Math/reasoning | deepseek-r1:14b | qwen3:8b |
| Coding assistant | qwen2.5-coder:14b | deepseek-coder:6.7b |
| Image understanding | gemma3:12b | qwen3-vl:8b |
| OCR | deepseek-ocr:3b | qwen2.5-vl:7b |
| Embedding/RAG | nomic-embed-text | bge-large |
| Ultra lightweight | gemma3:1b-qat | llama3.2:1b |
| Tool/function calling | qwen3:8b | llama3.1:8b |
| Low-end/server | qwen3:0.6b | deepseek-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)
| Model | Total Params | Active Params | Architecture |
| qwen3:0.6b | 0.6B | 0.6B | Dense |
| llama3.2:1b | 1B | 1B | Dense |
| deepseek-r1:1.5b | 1.5B | 1.5B | Dense |
| qwen3:4b | 4B | 4B | Dense |
| gemma3:4b | 4B | 4B | Dense |
| qwen3:8b | 8B | 8B | Dense |
| llama3.1:8b | 8B | 8B | Dense |
| deepseek-r1:8b | 8B | 8B | Dense (distilled) |
| gemma3:12b | 12B | 12B | Dense |
| qwen3:30b | 30B (MoE) | ~3B | MoE |
| qwen3:32b | 32B | 32B | Dense |
| mixtral:8x7b | 47B (MoE) | ~13B | MoE |
| deepseek-r1:70b | 70B | 70B | Dense |
| qwen3:235b | 235B (MoE) | ~22B | MoE |
| llama3.1:405b | 405B | 405B | Dense |
| deepseek-r1:671b | 671B (MoE) | ~37B | MoE |
🚀 Top Models by Pulls
| Rank | Model | Pulls | Tags |
| 1 | llama3.1 | 117.2M | 93 |
| 2 | deepseek-r1 | 89.9M | 35 |
| 3 | nomic-embed-text | 78.6M | 3 |
| 4 | llama3.2 | 76.7M | 63 |
| 5 | gemma3 | 38.6M | 26 |
| 6 | qwen2.5 | 34.8M | 133 |
| 7 | qwen3 | 32.3M | 58 |
| 8 | mistral | 31.1M | 84 |
| 9 | gemma2 | 27.9M | 94 |
| 10 | llama3 | 24.7M | 68 |
| 11 | llava (vision) | 14.3M | 98 |
| 12 | mxbai-embed-large | 12.6M | 4 |
| 13 | minicpm-v | 5.3M | 17 |
| 14 | llama3.2-vision | 4.9M | 9 |
| 15 | qwen3-vl | 4.5M | 57 |
Basic Operations(5)
| Command | Level | ||
|---|---|---|---|
ollama pull <model>Download a model from the registry to local | Basic | ollama pull llama3.2 | |
ollama run <model>Run a model and enter interactive mode | Basic | ollama run llama3.2 | |
ollama listList locally available models | Basic | ollama list | |
ollama rm <model>Remove a model from local | Basic | ollama rm llama3.2 | |
ollama cp <src> <dst>Copy a model (create an alias) | Intermediate | ollama cp llama3.2 my-llama |
Configuration(4)
| Command | Level | ||
|---|---|---|---|
ollama show <model>Show model details (parameters, template, system prompt) | Intermediate | ollama show llama3.2 --modelfile | |
ollama create <name> -f ./ModelfileCreate a custom model from a Modelfile | Intermediate | ollama create mymodel -f ./Modelfile | |
ollama push <model>Push a model to a remote registry | Intermediate | ollama push mymodel | |
OLLAMA_MODELS=/path/to/models ollama serveSpecify custom model storage directory | Expert | OLLAMA_MODELS=/data/models ollama serve |
Advanced Operations(6)
| Command | Level | ||
|---|---|---|---|
ollama serveStart the Ollama server (default localhost:11434) | Intermediate | ollama serve | |
ollama psList models currently loaded in memory | Basic | ollama ps | |
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/generate -d '{"model":"llama3.2","prompt":"Hello","stream":false}' | |
curl http://localhost:11434/api/chat -d '{"model":"llama3.2","messages":[{"role":"user","content":"hi"}]}'Chat via REST API with message history | Intermediate | curl http://localhost:11434/api/chat -d '{"model":"llama3.2","messages":[{"role":"user","content":"hi"}],"stream":false}' | |
ollama stop <model>Stop a running model | Basic | ollama stop llama3.2 | |
OLLAMA_HOST=0.0.0.0 ollama serveListen on all network interfaces (allow remote access) Ensure firewall protection when enabling remote access | Expert | OLLAMA_HOST=0.0.0.0 ollama serve |