Best Open Source Models 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-5.2, 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.

The OpenCode and Ollama setup guide turns that model shortlist into a local coding workflow you can test.

Choosing by Use Case

Choose a model for your hardware and coding tasks. A newer release is a candidate to compare, not proof of better results.

Best FitModel to EvaluateDeployment and Version Note
Local coding on a 64GB MacQwen3.6-27B; compare Qwen3.8-27BOriginal recommendation plus a newer candidate; choose a supported local quantization.
Demanding hosted coding tasksDeepSeek V4 ProEvaluate through a hosted provider; self-hosting needs substantial infrastructure.
Long-running agent tasksGLM-5.2; compare GLM-5.35.2 is not the latest release; evaluate 5.3 for a new deployment.
Server-scale agentic codingKimi K3Hosted trial or substantial server deployment; review the K3-specific license.
Long-context experimentsLlama 4 ScoutLarge memory requirement; the context ceiling does not prove coding quality.
Local deployment with Apache-2.0 weightsgpt-oss-20bSmaller deployment option; check runtime support and memory overhead.
Research and reproducibilityOLMo 3 Instruct, 7B or 32BChoose the checkpoint for available hardware; prioritize access to training materials.

What is the difference between open-source and open-weight models?

Open-weight models make their trained parameters available to download; open-source AI models also provide 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

I choose models by their coding capabilities, downloadable weights and license terms, hardware requirements, and the tools needed to run them. My preferences are separate from specifications and vendor-reported results.

Qwen3.6-27B remains my starting recommendation for a 64GB Mac. I have not run a fresh controlled test of every model, including the newer releases. For a new GLM deployment, compare GLM-5.3 with 5.2. Benchmarks with different test conditions cannot establish a universal ranking.

DeepSeek V4 Pro

DeepSeek V4 Pro belongs on a shortlist for demanding coding tasks. Its published coding results support evaluating it, but do not establish a universal lead on your repository.

Best for: Developers evaluating a large model for complex coding and reasoning work through hosted inference or a substantial server deployment.

Main limitation: The full model has 1.6 trillion parameters. Its 49 billion active parameters describe computation per token, not total storage or memory needs. The published 1M-token context is a capacity ceiling, not a guarantee of reliable repository understanding.

Deployment: Start with hosted access unless you already operate suitable infrastructure. Check the exact revision, provider rates, and data policy. Compare a current Flash variant when cost and throughput matter more than the largest model.

Source: DeepSeek V4 Pro model card and deployment guidance.

GLM-5.2

GLM-5.2 is a candidate for long-running coding agents that plan, call tools, and check their work. Its published 1M-token context supports evaluating those workflows.

Best for: Teams comparing models for multi-step repository work through hosted inference or managed server infrastructure.

Main limitation: GLM-5.2 is a large model with 753 billion total parameters, and it is no longer the newest GLM release. Neither a large context window nor vendor results guarantee reliable completion of your tasks.

Deployment: Retain 5.2 in an existing workflow if its results justify it. For a new deployment, compare 5.3 on the same tasks before choosing. I am not reporting a side-by-side test of both releases.

Sources: GLM-5.2 model card and newer GLM-5.3 model card.

Qwen for Local Coding

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.

Best for: Developers evaluating downloadable coding models on a local workstation rather than operating a large inference cluster.

Main limitation: A 27B parameter count does not establish a fixed memory requirement or usable speed. Quantization, context, runtime, and other applications all affect the result.

Deployment: Choose a supported local build and leave memory for the editor, browser, and build tools. 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.

Sources: Qwen3.6-27B model card and Qwen3.8-27B model card.

Kimi K3

Kimi K3 is a candidate for long coding sessions that require repository navigation and tool use. Moonshot publishes its weights and vendor evaluations, so deployment choices can be assessed against an identifiable release.

Best for: Teams evaluating server-scale agentic coding through a hosted service or substantial inference infrastructure.

Main limitation: K3 has 2.8 trillion total parameters and uses its own license terms. It is not a laptop recommendation, and older K2.x licensing assumptions should not be carried forward.

Deployment: Start with a hosted trial when the goal is to compare coding results. Self-hosting is a separate infrastructure decision. Kimi K2.x and K3 are distinct releases; record the exact model identifier rather than treating the family name as one interchangeable model.

Source: Kimi K3 model card, license, and serving guidance.

Meta Llama 4

Llama 4 Scout is worth evaluating for long-context experiments. Its advertised 10-million-token context window is a capacity claim, not proof that it is the best coding model.

Best for: Developers investigating whether a large context window improves retrieval and task completion on their own code.

Main limitation: Scout has 109 billion total parameters, despite activating 17 billion per token. Memory requirements extend beyond model weights, and the Llama 4 Community License has conditions that need review.

Deployment: Use a supported hosted endpoint or hardware sized for the chosen build and context. Test progressively larger inputs rather than assuming maximum context is practical on a workstation.

Source: Llama 4 Scout model card and license.

OpenAI GPT-OSS

OpenAI’s gpt-oss-20b is a candidate for local coding experiments when downloadable Apache-2.0 weights and a smaller deployment matter. The larger gpt-oss-120b is a separate hardware decision.

Best for: Developers who want to evaluate or customize a locally deployed model under Apache-2.0 terms.

Main limitation: Fitting a model in memory does not establish its coding quality. Review generated changes and measure performance on the intended tasks.

Deployment: OpenAI documents gpt-oss-20b running within 16GB of memory with its MXFP4 weights; allow for your runtime, context, and other applications. Use a compatible runtime that handles the required response format. The documented gpt-oss-120b deployment uses an 80GB GPU.

Source: OpenAI gpt-oss model card and inference guidance.

OLMo

Ai2’s OLMo family is worth evaluating when access to training material and reproducibility matters more than choosing a coding leaderboard winner. OLMo 3 includes 7B and 32B instruction-tuned variants alongside other checkpoints.

Best for: Researchers and developers who need to inspect training resources or study and adapt model behavior.

Main limitation: Openness alone does not establish coding performance. I would choose OLMo for reproducibility requirements rather than make it the default recommendation for the strongest coding output.

Deployment: 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.

Source: Ai2 OLMo model variants, training resources, and documentation.

How to Access These Models

OpenRouter is one way to access supported open-weight models through an API. It's a unified gateway that gives you access to hundreds of models from dozens of providers through a single endpoint and API key. Instead of signing up separately for Alibaba Cloud (Qwen), DeepSeek, Meta AI, and every other provider, you put one key in your client and switch models by changing a string.

For terminal agents like OpenCode, the setup is a one-line config change pointing at OpenRouter with your preferred model slug. For local use, Ollama handles model downloads and a simple local server, when a compatible model package is available.

The OpenRouter quickstart explains its endpoint and authentication. Confirm the exact model is listed before configuring a client.

Running Locally

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

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 the original starting point I recommended, rather than a universal minimum or a fresh benchmark claim. Compare newer compatible Qwen releases on the same task. Smaller machines can still handle useful local work, but the acceptable model and context depend on what you need it to do. See the open source versus proprietary guide for the operating-cost decision.

Benchmark Context

Coding benchmarks measure a specific model and agent setup on a defined set of tasks. 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 date beside it.

There is no universal plain-versus-agentic score adjustment. Different harnesses can search files, execute commands, and retry in different ways. Use published results to shortlist models, then run the same bounded task in OpenCode or your chosen client. Compare the diff, passing checks, review effort, and cost.

A Note on Benchmark Dates

Model-source links and selection guidance were reviewed on October 17, 2026. This shortlist preserves the original deployment priorities without presenting midyear scores as current rankings. Model versions, hosted prices, and available quantizations change independently.

Record the model identifier, runtime, context setting, permission configuration, and test date beside each result. A model earns its place when it completes the work with an acceptable bill and review burden, not when its name appears at the top of an unrelated chart.

Selection guidance and linked model documentation reviewed on October 17, 2026. Personal examples describe the author's original experience.

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 2 model family
    (allenai.org)