Models for Different Tasks

Recommendations for choosing models based on your tasks and hardware.

πŸ‡·πŸ‡Ί Russian version: models.ru.md


← Local models Β· Catalog β†’


Contents

  1. Quick picks by task
  2. By hardware
  3. Key considerations
  4. Coding models
  5. Chat models
  6. Reasoning models
  7. Small models for 8 GB
  8. What’s next

What affects model choice

When choosing a model, consider:

  1. Task β€” coding, chat, text analysis, image processing
  2. Available VRAM/RAM β€” how much memory you have
  3. Quality needed β€” maximum quality or β€œgood enough”
  4. Speed requirements β€” real-time response or batch processing

1. Quick picks by task

Task Recommended model RAM needed Ollama command
Chat, general Q&A Qwen 3.5 9B 8-16 GB ollama run qwen3.5:9b
Coding Qwen 2.5 Coder 7B 8-16 GB ollama run qwen2.5-coder:7b
Code autocomplete (FIM) CodeGemma 2B 4-8 GB ollama run codegemma:2b
Reasoning DeepSeek R1 Distill 7B 8-16 GB ollama run deepseek-r1:7b
Math Phi-4-mini (3.8B) 4-8 GB ollama run phi4-mini
Vision Llama 3.2 Vision 11B 8-16 GB ollama run llama3.2-vision:11b
Russian language Qwen 3.5 9B 8-16 GB ollama run qwen3.5:9b
RAG embeddings nomic-embed-text 4 GB ollama run nomic-embed-text

2. By hardware

Your RAM Best model to run Approx. speed
8 GB Phi-4-mini (3.8B), Qwen 3.5 4B 25-35 tok/s
16 GB Qwen 2.5 Coder 7B, Qwen 3.5 9B 15-25 tok/s
24 GB Qwen3.6-27B (Q4), Gemma 4 26B MoE 18-28 tok/s
32 GB Llama 3.1 70B (Q3) 20-40 tok/s
48 GB Llama 3.3 70B (Q4) 10-20 tok/s
64 GB Gemma 4 31B (Q8) 8-15 tok/s
128 GB DeepSeek-V4-Flash, Qwen3.5-397B 15-30 tok/s

3. Key considerations


4. Coding models

Model Size Context FIM HumanEval Best for
Qwen 2.5 Coder 7B 4.7 GB 128K 82% General coding, multi-file
Qwen 2.5 Coder 1.5B 1.1 GB 32K 45% Fast autocomplete, 8GB Mac
CodeGemma 2B 1.5 GB 8K 50% Autocomplete, low RAM
Phi-4-mini (3.8B) 2.5 GB 128K 74% Math + coding, small RAM
Yi-Coder 9B 6 GB 128K 70% Long context coding

5. Chat models

Model Size Context Strengths
Qwen 3.5 4B 3.4 GB 256K Fast, multilingual, sweet spot for 8GB
Qwen 3.5 9B 6 GB 256K Best quality for 16GB Mac
Llama 3.3 8B 4.9 GB 128K Strong English, reasoning
Gemma 3 9B 6 GB 128K Apple Silicon optimized
Phi-4-mini (3.8B) 2.5 GB 128K Amazing for its size, math champ

6. Reasoning models

For reasoning and math: Phi-4 Mini (3.8B) β€” surprisingly strong for its size; Phi-4 (14B) β€” if you have resources, excellent at logic; Qwen 2.5 Math series β€” specifically tuned for mathematical tasks; DeepSeek Math 7B/7B-Instruct β€” strong math model.

Model Size Best for
DeepSeek R1 Distill 7B 4.5 GB 2-3x better reasoning than vanilla 7B
DeepSeek R1 Distill 14B 9 GB Complex analysis, fits 16GB
Phi-4-reasoning (14B) 9 GB Code + reasoning
QwQ-32B 20 GB Math, logic (needs 24GB)

Note: Reasoning models are slower (they β€œthink” before answering) but give better results on complex tasks. Not suitable for real-time chat.


7. Small models for 8 GB

For Macs with 8 GB RAM or CPU-only inference:

Model RAM (Q4) Speed (tok/s) Best for
Phi-4-mini (3.8B) 2.5 GB 28 Coding, math
Qwen 3.5 4B 2.8 GB 22-26 Universal chat
Llama 3.2 3B 2.0 GB 30-40 Fast chat
CodeGemma 2B 1.5 GB 35+ Code autocomplete
Qwen 2.5 Coder 1.5B 1.1 GB 40+ Fast coding

MacBook Air M1 16GB reference

Models that work well on 16GB unified memory (M1/M2 chips):

Task Model Size Quant Speed (tok/s) HuggingFace / Ollama
Everyday chat Qwen 3.5 9B 6.6 GB Q4_K_M 10-13 HF / Ollama
Max speed Qwen 3.5 4B 3.4 GB Q4_K_M 28-35 HF / Ollama
Coding Qwen 2.5 Coder 7B 4.7 GB Q4_K_M 22-25 HF / Ollama
Writing/content Llama 3.3 8B 4.9 GB Q4_K_M 14-18 HF / Ollama
Math/reasoning Phi-4 Mini 2.3 GB Q4_K_M 25-30 HF / Ollama
Vision Gemma 4 E4B 2.5 GB Q4_K_M 30-38 HF / Ollama
Tool calling / agents LFM2.5 8B-A1B 5.5 GB Q4_K_M 35-45 HF
Long context Qwen 3.5 9B 6.6 GB Q4_K_M 10-13 HF / Ollama

Estimating RAM usage

Formula

Model memory β‰ˆ (Parameters in billions) Γ— (Bytes per parameter) + KV cache + overhead

Example calculations

Available RAM Example model Calculation
4-6 GB (swap possible) Qwen 2.5 1.5B Q4_K_M (~1.1 GB) 1.5B Γ— 0.55 β‰ˆ 0.8 GB + KV (~0.3GB) β‰ˆ 1.1-1.4 GB
8 GB Qwen 2.5 3B Q4_K_M (~2.0 GB) 3B Γ— 0.55 β‰ˆ 1.65 GB + KV (~0.3GB) β‰ˆ 2.0 GB
16 GB Qwen 3.5 9B Q4_K_M (~7.0 GB) 9B Γ— 0.55 β‰ˆ 4.95 GB + KV (~1.0GB) + overhead β‰ˆ 7.0 GB
24 GB Llama 3 14B Q4_K_M (~8.7 GB) 14B Γ— 0.55 β‰ˆ 7.7 GB + KV (~1.5GB) β‰ˆ 9.2 GB
32 GB Mixtral 8x7B Q4_K_M (~24 GB MoE) ~6B active params Γ— 0.55 β‰ˆ 3.3 GB + KV (~2GB) β‰ˆ 8-10 GB effective
48+ GB Llama 3 70B Q3_K_M (~39 GB) 70B Γ— 0.41 β‰ˆ 28.7 GB + KV (~8GB) β‰ˆ 36-40 GB

RAM recommendations

RAM Best choice Alternative
4-6 GB TinyLlama 1.1B, Phi-2 2.7B, Qwen 1.5-1.8B Chat and simple tasks
8 GB Qwen 2.5 3B, Phi-3 Mini 3.8B, Mistral 7B Speed and quality balance
16 GB Qwen 3.5 9B, Llama 3.1 8B, Qwen 2.5 Coder 7B Universal choice
24-32 GB Llama 3 14B, Mixtral 8x7B, Command R Complex tasks and agents
48+ GB Llama 3 70B, Mixtral 8x22B Maximum quality, complex reasoning

Specialized models

Coding

For coding the best choices are: Qwen 2.5 Coder 7B β€” best balance of quality and speed; DeepSeek Coder V2 Lite (16B MoE, ~2.4B active) β€” if you have more resources; Stable Code 3B β€” very fast for autocomplete; CodeLlama 7B/13B β€” good alternative with large ecosystem.

Vision / Image understanding

Long context

How to read model names

Example: Qwen 2.5 Coder 7B Instruct Q4_K_M

Main quantization types (GGUF)

Type Bits/weight Quality Size When to use
Q2_K ~2 Very low Very small Only with critical memory shortage
Q3_K_S/M ~3-3.5 Low-medium Small Limited resources
Q4_0 4.0 Satisfactory Medium When predictability matters
Q4_K_S/M ~4.3-4.8 Good-excellent Medium Best balance of quality and size
Q5_0 5.0 Very good Above medium When you have some extra memory
Q5_K_S/M ~5.3-5.5 Excellent Above medium High quality at moderate size
Q6_K ~6.0 High Large For code and critical tasks
Q8_0 8.0 Almost FP16 Large When memory allows, max quality
F16 16.0 Maximum Very large Experiments and baseline comparison

Tip: Start with Q4_K_M for most tasks β€” best balance of quality, size and speed. Need more quality? Go Q5_K_M or Q6_K. Need speed or very low memory? Try Q3_K_M or Q2_K.

Hardware-specific recommendations

Apple Silicon (M1/M2/M3/M4)

NVIDIA GPU

AMD GPU

CPU only

Where to get models

Ollama library

Simplest way to start:

ollama pull qwen3:8b
ollama run qwen3:8b

Browse models at ollama.com/library

Hugging Face

For advanced users:

Top HF collections

Stay updated

Models evolve fast. Recommended:

  1. Follow releases from major labs (Meta, Mistral, Qwen, Microsoft, Google)
  2. Check favorite HF repos every 2-4 weeks
  3. Join r/LocalLLaMA and relevant Discord communities

8. What’s next

Go to Description
catalog.md Full 50+ model catalog with specs
benchmarks/apple-silicon.md Speed tests on Mac
memory-and-context.md RAM requirements explained
Back README.md

In section: getting-started Β· running-models Β· models Β· catalog Β· quantization Β· memory-and-context Β· tools Β· advanced-setup Β· troubleshooting Β· apple-silicon
Related sections: Zero Level Β· AI Agents Β· Use Cases
Navigation: ← Local Models Β· ↑ Back to main Β· πŸ‡·πŸ‡Ί Русский