How to Run an Open-Source Coding Model Locally with Ollama
A step-by-step guide to running Qwen2.5-Coder, Devstral or DeepSeek-Coder-V2 on your own machine with Ollama and connecting it to your editor.
● Conductor users: the cloud service shuts down November 20, 2026. Back up and switch to CoderBaba →
#tutorial · 1 post
Step-by-step tutorials for running open-source coding models locally, connecting them to your editor and setting up AI coding agents you control.
A step-by-step guide to running Qwen2.5-Coder, Devstral or DeepSeek-Coder-V2 on your own machine with Ollama and connecting it to your editor.
Every CoderBaba tutorial is written to be followed from start to finish without guesswork. Each one includes:
If a step fails, the troubleshooting section below covers the most common causes across all our tutorials.
If you are new to open coding models, follow these in order.
Install Ollama and chat with a coding model in your terminal. You'll learn how models are downloaded, how quantization affects size and how to pick a model that fits your RAM. Start with How to Run an Open-Source Coding Model Locally with Ollama.
Point an editor extension at your local model for autocomplete and chat. The key ideas are the OpenAI-compatible API that Ollama exposes at http://localhost:11434/v1 and using a small model for autocomplete and a larger one for chat.
Run an open-source agent, such as Aider, Cline or OpenHands, on a real task in a real repository. You'll learn how agents read files, propose edits and run tests, and why reviewing every diff matters.
Use git worktrees to give several agents their own isolated workspaces and run them side by side. Our Conductor alternative guide walks through the full setup.
Move from a laptop to a GPU server with vLLM or SGLang so your whole team can share one fast, private endpoint.
A terminal you are comfortable with. macOS Terminal or iTerm2, Windows Terminal with WSL2, or any Linux shell.
Git. Agents work best in git repositories, and every tutorial assumes your code is committed before an agent touches it.
Enough memory. For the beginner tutorials, 8 GB of RAM runs a small model and 16 GB is comfortable for a 7B model. A dedicated GPU or Apple Silicon makes everything much faster, but isn't required to start.
Disk space. Model files range from about 1 GB for small models to tens of gigabytes for large ones. Keep 20 GB or more free.
The model plus its context doesn't fit in your RAM or VRAM. Try, in order: a smaller model, such as 7B instead of 14B, a more aggressive quantization, a shorter context window, or closing other memory-hungry apps. On Macs, unified memory is shared with the system, so leave several gigabytes free.
You are probably running on CPU, or the model is partly offloaded from the GPU to system RAM. Check that your GPU drivers are installed and that the model fits entirely in VRAM. On Apple Silicon, Ollama uses the GPU automatically.
Model names and tags must match exactly, for example qwen2.5-coder:7b rather than qwen2.5-coder-7b. List what you have downloaded with ollama list.
Make sure the local server is running (ollama serve or the Ollama app) and that the extension points to http://localhost:11434, or the /v1 path for OpenAI-compatible settings. Firewalls and VPNs sometimes block localhost ports.
The prompt exceeded the context window and older content was cut off. Use a model with a longer context, include fewer files or start a fresh session for each task.
Smaller models struggle with long, multi-step tasks. Break the task into smaller steps, give the agent a failing test to aim for or switch to a model trained for agentic work, such as Devstral or Qwen3-Coder.
git reset or git stash an agent's changes.main.Every post tagged #tutorial is listed above, newest first. For background on why each step works, see our guides. For running models on your own hardware specifically, see #local-ai.
Most do. Ollama runs natively on Windows, and Git for Windows covers the git steps. For tutorials that use Unix shell commands, we recommend WSL2, which gives you a full Linux environment and the most reliable experience with agents and GPU drivers.
Yes. The beginner tutorials work on CPU with small models (1.5B to 3B parameters). Generation will be slower, but it's fine for learning the workflow. When you're ready for larger models, an Apple Silicon Mac or a single consumer GPU makes a dramatic difference.
Each tutorial names a default that fits modest hardware, usually a 7B model. If you have more memory, the tutorials point out where a larger model helps. The model directory lists memory needs for every model.
Every tutorial shows its publish date and, if it has been revised, its last-updated date. Tools in this space move quickly, so if a command has changed, check the tool's official docs and the troubleshooting section above.
We prioritize tutorials based on what developers ask about most: running specific new models, connecting particular editors and setting up agents for real workflows. Watch this topic page and the RSS feed for new ones.