Best Open-Source LLMs 2026: Coding & Chat Compared
Best open-source LLMs in 2026 for coding and chat, compared by size, license and hardware needs, with what I actually run locally and on servers.
Choosing the best open-source LLM in 2026 is harder than it should be. New open-weight models land almost every week, every launch claims a benchmark win, and the license terms differ more than most people realise.
This is the comparison I wish I had: the model families I actually consider for coding assistants and chat features in client projects, what hardware each size class needs, and which licenses are safe for commercial work. It reflects the landscape as of October 2026.
I deliberately do not quote benchmark scores. They change with every release, vendors pick the tests they win, and the only benchmark that matters is your own task. Instead I describe the trade-offs I have seen and show you how to test candidates yourself in an afternoon.
A quick note on "open source" vs "open weight"
Most models people call open source are really open weight: you can download and run the weights, but the training data and full training code are not published. That is fine for most developers. What matters in practice is the license on the weights. Apache 2.0 and MIT are permissive. Custom licenses such as the Llama Community License or Gemma Terms of Use allow commercial use but add conditions, such as acceptable-use policies, naming requirements or limits for very large companies.
Always read the license on the official model card for the exact version you deploy. Licenses sometimes change between generations of the same family.
Best open-source LLM families as of October 2026
- Qwen (Alibaba): the widest size range, from tiny models to large Mixture-of-Experts models, with dedicated coder variants. Most releases use Apache 2.0. My default starting point for both chat and coding.
- gpt-oss (OpenAI): gpt-oss-20b and gpt-oss-120b, released under Apache 2.0. Strong reasoning and tool use for their memory footprint; the 20b fits on a single 16 GB-class GPU.
- DeepSeek: very capable large MoE models for reasoning and coding, generally under MIT-style licenses. The full models need serious server hardware; smaller distilled variants run locally.
- Llama (Meta): huge ecosystem and tooling support. Released under the Llama Community License, which allows commercial use with conditions. Check the terms for each new release.
- Gemma (Google): efficient small and mid-size models that run well on laptops, with multimodal variants. Released under the Gemma Terms of Use.
- Mistral: a range of efficient models, many under Apache 2.0, plus coding-focused models. Some of their larger models use more restrictive licenses, so check each one.
- GLM (Zhipu) and Kimi (Moonshot): strong large open-weight models for coding and agentic work, mostly aimed at multi-GPU servers.
Best open-source LLM for coding
For coding, I care about three things: correct code in the languages I use (PHP, JavaScript, TypeScript, SQL), following instructions about style and frameworks, and reliable tool calling for agent workflows.
On a single consumer GPU or a 32 GB Mac, a Qwen coder model or gpt-oss-20b is where I start. They are fast enough for inline completions and chat, and both have permissive licenses. For heavier agentic coding where the model edits many files and runs tools, the big MoE models from Qwen, DeepSeek, GLM and Kimi are clearly better, but they need multi-GPU servers or a hosted provider that serves open weights.
Small models (under 8B) are fine for autocomplete and boilerplate but struggle with multi-file reasoning. Do not judge open models by what a 3B model does on your laptop.
Best open-source LLM for chat and support bots
For chatbots, especially RAG bots that answer from your documents, the model mostly needs to follow instructions, stay grounded in the context and write clearly. Mid-size models in the 8B to 30B range are the sweet spot. Qwen, Gemma, Llama and Mistral models all do this well.
If you need many languages, test with real conversations in those languages; quality varies a lot between families. If you need images as input, look at the multimodal variants of Gemma, Qwen and Llama.
Hardware needs by model size
These are rough figures for 4-bit quantized models, which is what Ollama and llama.cpp use by default. Add headroom for the context window: long contexts can need several extra gigabytes. Mixture-of-Experts models need memory for all their weights even though only some experts are active per token, but they run faster than a dense model of the same total size.
- 1B-4B: 4-8 GB RAM. Runs on CPU. Good for autocomplete, classification and simple extraction.
- 7B-9B: about 6-8 GB VRAM or 16 GB unified memory. The best price-to-quality class for local chat.
- 12B-20B: about 10-16 GB VRAM. Noticeably better reasoning; gpt-oss-20b sits here.
- 27B-35B: about 20-24 GB VRAM (an RTX 3090/4090/5090-class card) or a 48 GB+ Mac.
- 70B dense or 100B+ MoE: 48-80 GB+ VRAM, multiple GPUs or a 96-128 GB Mac. Usually served with vLLM in production.
How I test candidate models in one afternoon
Pull two or three candidates that fit your hardware, run the same 20 to 30 real prompts from your project through each, and compare the results side by side. This simple script does that with Ollama.
// compare.mjs -> node compare.mjs
import { writeFile } from "node:fs/promises";
const models = ["qwen3:8b", "gemma3:12b", "gpt-oss:20b"];
const prompts = [
"Write a Laravel migration for an orders table with soft deletes.",
"Refactor this to async/await: fs.readFile('a.txt', (e, d) => console.log(d))",
"A customer asks for a refund after 40 days. Our policy is 30 days. Reply politely.",
];
const results = [];
for (const model of models) {
for (const prompt of prompts) {
const started = Date.now();
const res = await fetch("http://127.0.0.1:11434/api/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model,
stream: false,
options: { temperature: 0.2 },
messages: [{ role: "user", content: prompt }],
}),
});
const data = await res.json();
results.push({
model,
prompt,
seconds: (Date.now() - started) / 1000,
answer: data.message?.content ?? data.error,
});
console.log("done:", model, "-", prompt.slice(0, 40));
}
}
await writeFile("results.json", JSON.stringify(results, null, 2));License checklist before you ship
- Is the license Apache 2.0, MIT or a custom license? Custom ones need a proper read.
- Are there user-count or company-size thresholds?
- Is there an acceptable-use policy you must pass on to your users?
- Do you need to include attribution or a notice in your product?
- Does the license cover fine-tuned derivatives and their distribution?
- Does your client's legal team need a record of the model version and license? Keep one.
Common mistakes
- Picking a model from a leaderboard without testing it on your own prompts.
- Running a model that does not fit in VRAM and concluding open models are slow.
- Using a tiny model for multi-step reasoning, then blaming open-weight models in general.
- Ignoring the chat template. Use the runtime's built-in template (Ollama and vLLM handle this) rather than hand-building prompts.
- Assuming the license of a new release is the same as the previous version.
Conclusion
As of October 2026, there is no single best open-source LLM. For most developers, a Qwen or gpt-oss model is the best default for coding, while Qwen, Gemma, Llama and Mistral models all make solid chat backends. Match the model size to your hardware, check the license, and run your own prompts before deciding.
The gap between open and closed models has narrowed a lot. For many real business features, a well-chosen open model running on your own hardware is now more than good enough.
Frequently asked questions
What is the best open-source LLM in 2026?
There is no single winner. As of October 2026, Qwen, gpt-oss, DeepSeek, Llama, Gemma and Mistral families each lead in different areas. Choose by task, hardware and license, and test on your own prompts.
What is the best open-source LLM for coding on a single GPU?
A Qwen coder model or gpt-oss-20b is a strong starting point on a 16-24 GB GPU. Both are under Apache 2.0 and work well in Ollama.
Can I use open-source LLMs commercially?
Usually yes, but it depends on the license. Apache 2.0 and MIT models are permissive. Llama and Gemma use custom licenses with conditions you must follow.
What is the best local LLM for 16 GB of RAM?
Models in the 7B-9B range, quantized to 4 bits, run comfortably. On a 16 GB GPU, 12B-20B models such as gpt-oss-20b also fit.