Best Open Source LLMs for Coding (2026)

Published Updated

For local coding on a 64GB Mac, Qwen3.6-27B remains my starting recommendation. For demanding coding tasks through a hosted service or your own server infrastructure, I would compare DeepSeek V4 Pro, GLM, and Kimi K3 on the same repository. The right choice depends on your hardware, coding tasks, license requirements, and whether your code can leave your machine.

A model still needs a client and a review workflow. The AI coding tools guide helps you choose the application around it, and the OpenCode and Ollama setup guide walks through a local setup.

Which Open Source Model Should You Choose for Coding?

Start by deciding where the model will run. Qwen and gpt-oss-20b are the local options I would look at first. DeepSeek V4 Pro, GLM, and Kimi K3 belong in a hosted or server deployment comparison. Llama 4 Scout and OLMo serve more specific needs.

Your PriorityModel to ConsiderWhat Determines the Choice
Local coding on a 64GB MacQwen3.6-27B; compare Qwen3.8-27BMy existing recommendation is 3.6. Choose a supported quantization and compare the newer release on your own tasks.
Demanding hosted coding tasksDeepSeek V4 ProSuitable for a hosted trial; self-hosting requires substantial infrastructure.
Long-running coding agentsGLM-5.2 and GLM-5.3Compare task completion and release-specific license terms before switching.
Repository work with visual inputsKimi K3Native vision can help when the task includes screenshots; confirm client support and release-specific terms. Hosted access or substantial servers required.
Long-context experimentsLlama 4 ScoutTest whether the larger context helps with your code and fits the available hardware.
A smaller local model with Apache-2.0 weightsgpt-oss-20bCheck runtime compatibility and leave memory for context and development tools.
Research and reproducibilityOLMo 3 Instruct, 7B or 32BAccess to training resources is the main reason to choose it.

What Is the Difference Between Open-Source and Open-Weight Models?

Open-weight models make their trained parameters available to download. Open-source AI also requires the code, data information, and usage rights needed to study, modify, use, and share the system. Downloadable weights alone do not establish that a model is open source or unrestricted for commercial use.

Most models in this shortlist are more precisely described as open weight. Check the exact release’s license and published training resources. Our open-source versus proprietary guide explains how those differences affect deployment choices.

How We Selected These Models

The selection starts with whether a model can run on the intended hardware, what its license permits, and whether the coding tools support it. Coding capability matters, but a model that cannot be deployed under those conditions is of little practical use.

I have used and tested these tools, and that hands-on experience informs the recommendations below alongside published specifications and vendor-reported results. Qwen3.6-27B remains my starting recommendation for a 64GB Mac. This article does not present a controlled benchmark of all seven model families.

Qwen for Local Coding

Best for: Developers who want a coding model on their own workstation, with Qwen3.6-27B as my starting choice for a 64GB Mac.

Qwen is my starting point for local coding when the model fits the available memory. My original recommendation was Qwen3.6-27B on a 64GB Mac. Qwen3.8-27B is a newer candidate to compare; I have not personally retested it. Both releases publish weights under Apache-2.0.

Choose Qwen3.6-27B when you want to keep coding requests on your own workstation and have room for a supported build alongside your development tools. If that build leaves too little memory for your editor, browser, and tests, try a smaller Qwen checkpoint or gpt-oss-20b. Quantization, context length, and runtime affect both memory use and speed; the 27B label alone cannot tell you whether the setup will be comfortable.

Keep the model version and quantization fixed when comparing tasks. A hosted Qwen product name does not by itself prove that the same checkpoint is downloadable, so check the exact model name before planning a local deployment.

DeepSeek V4 Pro for Demanding Hosted Tasks

Best for: Developers comparing hosted models for complex coding and reasoning tasks.

I would put DeepSeek V4 Pro on the shortlist when a local model struggles with complex coding or reasoning and sending the task to a hosted provider is acceptable. If the code must stay on your workstation, choose a locally supported Qwen or gpt-oss build instead. Self-hosting the full V4 Pro model requires substantial infrastructure.

The DeepSeek V4 Pro model card lists 1.6 trillion total parameters, 49 billion active parameters, and a 1M-token context window. Active parameters describe computation per token; the full model still determines much of the storage and memory requirement. A large context window also does not guarantee that the model will use every relevant part of a repository correctly.

Choose between DeepSeek V4 Pro and a Flash variant using the provider’s actual rates and your task requirements. Pro needs to justify any extra cost or waiting time through better completed work. For short, frequent requests, start by checking whether Flash already meets the requirement. Neither model size nor the Pro name establishes an advantage over GLM or Kimi on your repository.

GLM for Long-Running Coding Agents

Best for: Teams running multi-step coding agents that need to plan changes, use tools, and check their work.

GLM is most relevant when your coding workflow involves repeated planning, tool calls, and checks across a repository. GLM-5.2 offers a 1M-token context window and MIT-licensed weights. If permissive weight licensing is a requirement, 5.2 is a clearer starting point than assuming the terms of a newer release will suit you.

For a new deployment, compare it with GLM-5.3. Z.ai says 5.3 uses the same base model with further post-training for coding and long-horizon tasks. Those claims need checking against completed changes and failed tool calls in the intended workflow.

GLM-5.3 lists its own license terms, so do not carry over 5.2’s MIT assumptions. Keep 5.2 if its license and existing results meet your needs; consider 5.3 if its terms are acceptable and it reduces failed tasks or intervention in your workflow. Both belong in hosted or server deployments. For coding entirely on a personal workstation, start with Qwen or gpt-oss-20b.

Kimi K3 for Server-Scale Agentic Coding

Best for: Teams evaluating long coding sessions that combine repository work with visual inputs, such as screenshots of a UI.

Kimi K3 is worth a place alongside GLM when a coding task includes screenshots or other visual context as well as repository files. Moonshot’s Kimi K3 release combines native vision with a 1M-token context window and publishes weights for a 2.8-trillion-parameter model. Check that the chosen endpoint and coding client accept the visual inputs your task requires.

Start with hosted access if you want to assess Kimi K3 without operating large inference infrastructure. For text-only repository work, the visual capability gives you no automatic reason to choose K3 over GLM or DeepSeek. Its cost, tool use, and completed changes still need to justify the choice. Rule it out for a laptop-only deployment.

K3 also has its own license terms. Older K2.x licensing assumptions should not be carried forward. Record the exact model identifier when comparing results; Kimi K2.x and K3 are distinct releases.

Meta Llama 4 Scout for Long-Context Experiments

Best for: Developers testing whether larger amounts of code context improve retrieval and task completion.

Llama 4 Scout is worth considering when you want to test whether a large context window improves retrieval and task completion on your own code. Its advertised 10-million-token context window is a capacity claim, not a reason on its own to choose it for coding.

The Llama 4 Scout model card lists 109 billion total parameters, with 17 billion active per token. Memory requirements extend beyond model weights, and the Llama 4 Community License has conditions that need review.

Consider Scout when the amount of relevant input exceeds what your other shortlisted models can accept and the chosen endpoint supports the context you need. If the task already fits comfortably in Qwen, GLM, or DeepSeek, Scout’s larger advertised window is not a reason to switch. Test progressively larger inputs before committing to the hardware or hosted capacity.

OpenAI gpt-oss for a Smaller Local Deployment

Best for: Developers who want a smaller local model with Apache-2.0 weights for experimentation and customization.

I would try gpt-oss-20b when memory rules out the 64GB Qwen configuration and Apache-2.0 weights are a requirement. Its smaller deployment footprint earns it a place in the comparison; code quality still needs testing on the same tasks. The larger gpt-oss-120b requires a separate hardware assessment.

OpenAI documents gpt-oss-20b running within 16GB of memory with its MXFP4 weights. Allow additional room for your runtime, context, and other applications. The documented gpt-oss-120b deployment uses an 80GB GPU.

Choose gpt-oss-20b only with a runtime that supports its Harmony response format and leaves enough memory for your working context and development tools. If your preferred client cannot use that setup reliably, a supported Qwen build is the more practical starting point. Compare code quality once both configurations work correctly.

OLMo for Research and Reproducibility

Best for: Researchers who need access to training data and tools to study or adapt model behavior.

Ai2’s OLMo family is useful when access to training material and reproducibility matter more than choosing a coding leaderboard winner. OLMo 3 includes 7B and 32B instruction-tuned variants alongside base and reasoning checkpoints, with access to training data and tools.

Choose OLMo when you need to inspect training data, reproduce parts of the training process, or study how the model was built. Downloadable weights alone do not meet those needs. If your priority is everyday local coding and you will not use the training resources, Qwen remains my starting recommendation; OLMo’s openness by itself does not establish better coding results.

Select an exact checkpoint and compatible runtime for the available hardware. A base model and an instruction-tuned model serve different purposes; check the release documentation before building a coding workflow around either.

How Do You Access These Models?

You can use supported models through a hosted API or run compatible weights on your own hardware. Using an open-weight model through someone else’s API still sends your requests to that service.

OpenRouter provides a common API for supported models from multiple providers. Confirm that your chosen model is listed, then check its provider options, tool support, and data policy before connecting it to a repository.

In OpenCode, the normal provider setup is to run /connect, select a provider and enter its credentials, then use /models to choose a model. Custom endpoints and local runtimes may need additional configuration.

For local use, Ollama handles model downloads and a local server when a compatible model package is available. The OpenCode and Ollama guide covers the setup.

What Hardware Do You Need to Run Models Locally?

Memory depends on the exact model, quantization, context length, and runtime. There is no single RAM requirement for “open source coding models.”

I use a 32GB machine, so local memory is a real constraint for me. Model weights are only part of the requirement: the context cache, runtime, editor, browser, and build tools need room too. Start with a smaller supported model and measure memory pressure, output speed, and task success before paying for hardware. Total parameters matter for storage even when only a subset is active per token.

Qwen3.6-27B on a 64GB Mac remains my original starting recommendation, rather than a universal minimum. Smaller machines can still handle useful local work, but the acceptable model and context depend on what you need it to do.

Quantization reduces weight storage, but its effect on coding reliability depends on the model and task. Published benchmark results apply to the exact model, precision, agent setup, and settings used in that evaluation. Your local build can behave differently.

How Should You Compare Coding Results?

Use benchmarks to choose a few models, then give them the same bounded tasks in your own repository. A useful comparison might include fixing a bug with a failing test, adding a feature across several files, and refactoring code without changing its behavior.

SWE-bench tests whether an agent can resolve repository issues; its Verified subset contains 500 human-validated problems. A reported percentage needs the benchmark version, model version, tools, retry budget, and test date beside it. There is no universal adjustment that makes results from different agent setups directly comparable.

Keep the starting code, instructions, available tools, and time budget consistent. Record the exact model identifier, runtime, quantization, context setting, and permissions. Then compare:

  • Whether the requested work is complete and the relevant checks pass.
  • Whether the change introduces unrelated edits or regressions.
  • How often you need to intervene or correct the model.
  • How much time you spend reviewing its output.
  • The total API cost or local resource use for the completed task.

That gives you a reason to keep or replace a model based on your work. A higher position on an unrelated leaderboard is less useful than a change you can review and ship.

Frequently Asked Questions

Can an Open-Weight Coding Model Edit Files and Run Tests by Itself?

An open-weight coding model needs an agent application to edit files and run tests. The model generates requests to use tools; the application executes those requests and returns the results, subject to its permissions. OpenCode, for example, provides file-editing and shell tools. Choose a model and runtime that support the application’s tool-calling format; generating code in chat does not establish that compatibility.

Should You Use the Same Coding Model for Autocomplete and Agent Tasks?

Code autocomplete often benefits from a separate, smaller model trained to fill gaps between existing lines, while agent tasks require instruction following and reliable tool calls. A high score on repository-fixing benchmarks does not establish that a model will provide fast, useful inline suggestions. Continue, an AI coding assistant, distinguishes fill-in-the-middle autocomplete models from chat models. Check which task the model was trained for before choosing it for your editor.

Can Open-Weight Coding Models Replace Claude or GPT for Everyday Development?

An open-weight coding model is a practical replacement for Claude or GPT when it completes your regular development tasks with acceptable accuracy, speed, and review effort. Test routine work, such as writing tests or explaining a function, separately from complex changes across a repository. Success on one does not establish reliability on the other. I would switch only after comparing the models on representative tasks, including how often I need to intervene. Keeping a proprietary model available for tasks the local model struggles with is also a reasonable choice.

Are Open Source Coding Models Free to Use?

Open source coding models can have no download or model-license fee while still costing money to run. Local use requires hardware and electricity; rented servers and hosted APIs can add usage charges. Downloadable open-weight models may also have release-specific license conditions, so check the exact model rather than assuming every public download has the same terms. Compare the total cost of completing your work, including setup and review time, before treating a free download as the cheaper option.

Sources

  1. [1]
  2. [2]
  3. [3]
    GLM-5.2 model card
    (huggingface.co)
  4. [4]
    Qwen3.8-27B model card
    (huggingface.co)
  5. [5]
    Kimi K3 model card
    (huggingface.co)
  6. [6]
  7. [7]
  8. [8]
  9. [9]
  10. [10]
  11. [11]
  12. [12]
  13. [13]
  14. [14]
  15. [15]
    Ollama documentation
    (docs.ollama.com)
  16. [16]
    OLMo model family
    (allenai.org)