# Ollama Model Library — Best AI Models for Local Use > Curated guide to the best models available on Ollama for coding, chat, and reasoning. Compare Llama, Mistral, Gemma, Phi, and Qwen models for local AI development. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash # Install Ollama curl -fsSL https://ollama.com/install.sh | sh # Pull and run the best coding model ollama run qwen2.5-coder:7b # Pull and run the best chat model ollama run llama3.1:8b ``` ## What is the Ollama Model Library? Ollama hosts hundreds of open-source AI models ready for one-command local deployment. This guide covers the best models for different tasks — coding, chat, reasoning, and specialized use cases. All models run locally on your hardware with full privacy. **Answer-Ready**: Ollama Model Library provides 500+ open-source AI models for local use. One-command download and run. Best coding models: Qwen2.5-Coder, DeepSeek-Coder. Best chat: Llama 3.1, Mistral. Best reasoning: Phi-3, Gemma 2. All run locally with full privacy. **Best for**: Developers choosing the right local model for their use case. **Works with**: Ollama, Jan, Open WebUI, Claude Code (as backend). **Setup time**: Under 2 minutes per model. ## Best Models by Task ### Coding Models | Model | Size | Strength | Command | |-------|------|----------|---------| | Qwen2.5-Coder | 7B/32B | Best overall coding | `ollama run qwen2.5-coder:7b` | | DeepSeek-Coder V2 | 16B | Complex reasoning | `ollama run deepseek-coder-v2:16b` | | CodeLlama | 7B/34B | Code completion | `ollama run codellama:7b` | | Starcoder2 | 3B/7B/15B | Multi-language | `ollama run starcoder2:7b` | ### Chat Models | Model | Size | Strength | Command | |-------|------|----------|---------| | Llama 3.1 | 8B/70B | Best general chat | `ollama run llama3.1:8b` | | Mistral | 7B | Fast, efficient | `ollama run mistral` | | Gemma 2 | 9B/27B | Google quality | `ollama run gemma2:9b` | | Phi-3 | 3.8B/14B | Small but capable | `ollama run phi3:14b` | ### Reasoning Models | Model | Size | Strength | Command | |-------|------|----------|---------| | Qwen2.5 | 7B/72B | Math & logic | `ollama run qwen2.5:7b` | | Phi-3 Medium | 14B | Analytical tasks | `ollama run phi3:14b` | | Mixtral | 8x7B | Expert mixture | `ollama run mixtral:8x7b` | ### Specialized Models | Model | Use Case | Command | |-------|----------|---------| | LLaVA | Vision + text | `ollama run llava` | | Nomic-Embed | Embeddings | `ollama run nomic-embed-text` | | Whisper | Speech-to-text | Via whisper.cpp | ## Hardware Requirements | Model Size | RAM Needed | GPU VRAM | Best For | |-----------|------------|----------|----------| | 3B | 4GB | 4GB | Laptops | | 7B | 8GB | 8GB | Desktop | | 13B | 16GB | 16GB | Workstation | | 34B | 32GB | 24GB | Pro GPU | | 70B | 64GB | 48GB | Server | ## Model Selection Guide ``` Need coding help? → Small project: qwen2.5-coder:7b → Complex code: deepseek-coder-v2:16b Need general chat? → Best quality: llama3.1:8b (or 70b if you have the hardware) → Fastest: mistral:7b Need reasoning? → Math/logic: qwen2.5:7b → Analysis: phi3:14b Limited hardware? → phi3:3.8b or gemma2:2b ``` ## FAQ **Q: Which model is closest to GPT-4?** A: Llama 3.1 70B or Qwen2.5 72B are the closest in general capability. For coding, Qwen2.5-Coder 32B rivals GPT-4 on benchmarks. **Q: Can I use these with Claude Code?** A: Yes, run Ollama as a local server and point Claude Code to `http://localhost:11434` as a custom endpoint. **Q: How much disk space do models need?** A: Roughly 1GB per billion parameters in Q4 quantization. A 7B model is ~4GB, 70B is ~40GB. ## Source & Thanks > [Ollama Model Library](https://ollama.com/library) — 500+ models > > [ollama/ollama](https://github.com/ollama/ollama) — 120k+ stars ## 快速使用 ```bash ollama run llama3.1:8b ``` 一行命令下载运行本地 AI 模型。 ## Ollama 模型库指南 Ollama 提供 500+ 开源 AI 模型,一键本地部署。本指南覆盖编码、对话、推理最佳模型选择。 **一句话总结**:Ollama 模型库最佳选择指南,编码选 Qwen2.5-Coder,对话选 Llama 3.1,推理选 Phi-3,500+ 模型本地运行。 **适合人群**:选择本地 AI 模型的开发者。 ## 最佳模型 ### 编码:Qwen2.5-Coder 7B/32B ### 对话:Llama 3.1 8B/70B ### 推理:Qwen2.5 7B, Phi-3 14B ## 硬件要求 7B 模型需 8GB 内存,70B 需 64GB。 ## 常见问题 **Q: 哪个最接近 GPT-4?** A: Llama 3.1 70B 或 Qwen2.5 72B。 **Q: 能配合 Claude Code?** A: 可以,Ollama 本地服务器作为自定义端点。 ## 来源与致谢 > [ollama.com/library](https://ollama.com/library) — 500+ 模型, 120k+ stars --- Source: https://tokrepo.com/en/workflows/4cecf968-aa84-47ec-9f32-c3b11432c18f Author: Skill Factory