# Best Open-Source LLMs

> Source: https://aiwiki.ai/wiki/best_open_source_llms
> Updated: 2026-07-07
> Categories: AI Models, Large Language Models, Open Source AI
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
> From AI Wiki (https://aiwiki.ai), the free encyclopedia of artificial intelligence. Reuse freely with attribution to "AI Wiki (aiwiki.ai)".

As of July 2026, the strongest open-weight [large language model](/wiki/large_language_model) overall is GLM-5.2 from [Z.ai](/wiki/z_ai) (Zhipu AI), which tops the [Artificial Analysis](/wiki/artificial_analysis) open-weight Intelligence Index at 51 and leads all open models on agentic coding, all under a permissive [MIT License](/wiki/mit_license).[1][2] Its closest challengers, each scoring 44 on the same index, are [DeepSeek V4](/wiki/deepseek_v4) (best for math and competitive coding), [MiniMax M3](/wiki/minimax_m3), and [Kimi K2.6](/wiki/kimi_k2_6) (best for reasoning and autonomous agents).[1] If your priority is cheap self-hosting rather than raw intelligence, [Google DeepMind](/wiki/google_deepmind)'s [Gemma 4](/wiki/gemma_4) and [Alibaba](/wiki/alibaba)'s [Qwen3.5](/wiki/qwen3_5), both under [Apache-2.0](/wiki/apache_license), are the best small-footprint picks.[3][4]

This is a ranked, benchmark-anchored guide to the best [open-weight](/wiki/open_weights) LLMs by use case. Every figure is dated to July 2026 and cited to a primary source or a reputable benchmark leaderboard. Rankings use the Artificial Analysis Intelligence Index (v4.1), an independent composite that weights agentic, coding, scientific, and general reasoning evaluations; individual benchmark numbers are noted as vendor-reported where they come from a model card rather than an independent harness.

## Best open-source LLM by use case: the quick verdict

| Use case | Winner | Why it wins | 
|---|---|---|
| Best all-around | GLM-5.2 (Z.ai) | Highest open-weight Intelligence Index (51); MIT license; 1M context [1][2] |
| Best for coding | [DeepSeek V4](/wiki/deepseek_v4) | [SWE-bench Verified](/wiki/swe_bench_verified) 80.6%, record Codeforces 3206, LiveCodeBench 93.5 [5] |
| Best for reasoning and math | [Kimi K2.6](/wiki/kimi_k2_6) | AIME 2026 96.4, [GPQA Diamond](/wiki/gpqa_diamond) 90.5, native thinking mode [6] |
| Best long context (value) | [Qwen3.5](/wiki/qwen3_5) | 256K native, extendable toward 1M; linear attention keeps long decode cheap [4] |
| Best permissive license | [Mistral Large 3](/wiki/mistral_large_3) | Apache-2.0, fully open base and instruct weights (also Qwen3.5, Gemma 4) [7] |
| Best to self-host cheaply | [Gemma 4](/wiki/gemma_4) | E2B runs in under 1.5 GB; 31B on a single GPU; Apache-2.0 [3] |

Last verified: July 2026. Access for every model below is open-weight (downloadable from [Hugging Face](/wiki/hugging_face)).

## 1. GLM-5.2: best all-around open-weight model

GLM-5.2, released by [Z.ai](/wiki/z_ai) (the international brand of Beijing-based [Zhipu AI](/wiki/zhipu_ai)) on June 13, 2026 with weights published June 16, is the highest-scoring open-weight model on the [Artificial Analysis](/wiki/artificial_analysis) Intelligence Index at 51, ahead of every other open release and closing on the strongest proprietary systems.[1][2] It is a [mixture-of-experts](/wiki/mixture_of_experts) model of roughly 753 billion total parameters with about 40 billion active per token, ships a 1M-token context window, and is distributed under a pure [MIT License](/wiki/mit_license).[2][8] It is the direct successor to [GLM-5.1](/wiki/glm_5_1) and the [GLM-5](/wiki/glm_5) base, the series Z.ai trained on [Huawei](/wiki/huawei) Ascend accelerators rather than [Nvidia](/wiki/nvidia) hardware.[9]

Its defining strength is long-horizon agentic engineering. GLM-5.2 leads open models on [SWE-Bench Pro](/wiki/swe_bench_pro) with 62.1%, beating GPT-5.5 (58.6%), and scores 81.0 on Terminal-Bench 2.1 and 74.4 on FrontierSWE, at roughly one-sixth of GPT-5.5's cost per token.[8][10] Best-for: teams that want a single self-hostable model for chat, tool use, and multi-hour coding agents. Minimum hardware: this is a frontier-scale model, so full weights need a multi-GPU server (for example an 8x [H100](/wiki/h100)-class node); community 4-bit GGUF builds of roughly 400 GB bring it within reach of high-end workstations.[8]

## 2. DeepSeek V4: best for coding and competitive programming

[DeepSeek V4](/wiki/deepseek_v4), previewed by [DeepSeek](/wiki/deepseek) on April 24, 2026, ships in two open-weight variants under the [MIT License](/wiki/mit_license): V4-Pro (1.6 trillion total, 49 billion active) and V4-Flash (284 billion total, 13 billion active), both with a 1M-token context.[5] V4-Pro scores 44 on the Intelligence Index and V4-Flash 40.[1] On coding it is exceptional: [SWE-bench Verified](/wiki/swe_bench_verified) 80.6%, [LiveCodeBench](/wiki/livecodebench) 93.5 for the Pro-Max configuration, and a Codeforces rating of 3206, the highest competitive-programming score any AI model had reached at release.[5] It also posts [MMLU-Pro](/wiki/mmlu_pro) 87.5%, [GPQA Diamond](/wiki/gpqa_diamond) 90.1%, [AIME](/wiki/aime) 2026 96.4%, and a perfect score on Putnam 2025.[5]

Best-for: repository-scale software work and hard math where you also want an MIT license and cheap long-context inference. Minimum hardware: V4-Flash is the accessible option at a 160 GB checkpoint (roughly two H100-class GPUs at FP8), while V4-Pro's 862 GB checkpoint needs a full 8-GPU node.[5] DeepSeek's own report notes V4 still trails the very top proprietary frontier models by about 3 to 6 months.[5]

## 3. Kimi K2.6: best for reasoning and autonomous agents

[Kimi K2.6](/wiki/kimi_k2_6) from [Moonshot AI](/wiki/moonshot_ai), released April 20, 2026, is a roughly 1-trillion-parameter MoE (about 32 billion active) with native INT4 quantization, a 256K context, and a Modified [MIT License](/wiki/mit_license).[1][6] It scores 44 on the current Intelligence Index; at launch it was the top open model at 54 on the previous (v4.0) index.[1][6] On reasoning it leads the open field with [GPQA Diamond](/wiki/gpqa_diamond) 90.5, [AIME](/wiki/aime) 2026 96.4, [SWE-bench Verified](/wiki/swe_bench_verified) 80.2, and Humanity's Last Exam 54.0 with tools.[6] Unlike the earlier text-only [Kimi K2](/wiki/kimi_k2), K2.6 is natively multimodal and adds Agent Swarm, which fans a single request out across as many as 300 parallel sub-agents running up to 4,000 coordinated steps.[6]

Best-for: agentic pipelines and multi-agent orchestration where a configurable thinking mode and vision input matter. Minimum hardware: even at native INT4 the trillion-parameter weights demand a multi-GPU node; Moonshot recommends serving with [vLLM](/wiki/vllm), SGLang, or KTransformers.[6]

## 4. Qwen3.5: best for long context on a budget

[Qwen3.5](/wiki/qwen3_5), released by [Alibaba](/wiki/alibaba)'s Qwen team on February 16, 2026, is an [Apache-2.0](/wiki/apache_license) family whose flagship Qwen3.5-397B-A17B pairs a 397-billion-parameter sparse MoE (17 billion active) with [linear attention](/wiki/linear_attention) via Gated DeltaNet.[4] That hybrid stack is what makes long context cheap: most layers run at constant per-token memory, so the model holds a native 262,144-token (256K) window and extends toward roughly 1M tokens with [YaRN](/wiki/yarn) scaling, with the hosted Qwen3.5-Plus endpoint exposing 1M by default.[4] It scores 34 on the Intelligence Index and reports [GPQA](/wiki/gpqa) 88.4, [AIME](/wiki/aime) 2026 91.3, and [SWE-bench Verified](/wiki/swe_bench_verified) 76.4.[1][4] Every one of its eight checkpoints, from 397B down to sub-billion, is natively multimodal and covers 201 languages.[4]

Best-for: long-document and multilingual work where you want a permissive license and want to scale down to a single GPU. Note that the separate [Qwen3-Max](/wiki/qwen3_max) tier is closed-weight, so Qwen3.5 is Alibaba's open flagship.[4] Minimum hardware: the 397B flagship needs multi-GPU serving, but the 35B-A3B and smaller family members run on one GPU or a laptop.[4]

## 5. Mistral Large 3: best fully permissive (Apache-2.0) flagship

[Mistral Large 3](/wiki/mistral_large_3), released by [Mistral AI](/wiki/mistral) on December 2, 2025, is the largest [Apache-2.0](/wiki/apache_license) MoE flagship from a major lab: roughly 675 billion total parameters, about 41 billion active, a 256K context, and integrated image understanding.[7] Both base and instruction-tuned checkpoints ship under Apache-2.0 with no usage restrictions, which is why it is the pick when license cleanliness is the priority.[7] It is a non-reasoning generalist, so it is strong on knowledge and multilingual chat (LMArena Elo about 1418, second among open non-reasoning models at launch, and [MMLU-Pro](/wiki/mmlu_pro) around 73.1) but weaker on reasoning-heavy tests such as [GPQA Diamond](/wiki/gpqa_diamond) at about 43.9.[7] API pricing is $0.50 per 1M input and $1.50 per 1M output tokens.[7]

Best-for: European-hosted, fully unrestricted commercial deployment and multilingual generalist tasks. Minimum hardware: the FP8 instruct checkpoint fits a single 8-GPU H200 or B200 node, an NVFP4 build serves on [H100](/wiki/h100) or A100 nodes (best below 64K context), and the smaller Ministral 3 models (3B, 8B, 14B, also Apache-2.0) run on a laptop or edge device.[7]

## 6. Gemma 4: best to self-host cheaply

[Gemma 4](/wiki/gemma_4), released by [Google DeepMind](/wiki/google_deepmind) on April 2, 2026 and built from [Gemini 3](/wiki/gemini_3) research, is the first [Gemma](/wiki/gemma) generation under [Apache-2.0](/wiki/apache_license) rather than Google's custom terms, and it is the easiest serious model to run locally.[3] The family spans two edge models (E2B and E4B), a 26B mixture-of-experts model with about 3.8 billion active parameters, and a 31B dense flagship, with 256K context on the larger pair.[3] The 31B model scores 29 on the Intelligence Index yet posts [MMLU-Pro](/wiki/mmlu_pro) 85.2, [GPQA Diamond](/wiki/gpqa_diamond) 84.3, [AIME](/wiki/aime) 2026 89.2 without tools, LiveCodeBench v6 80.0, and an [LMArena](/wiki/lmarena) Elo of about 1452, third among open models at launch and above models many times its size.[3]

Best-for: on-device agents, offline use, and anyone GPU-constrained. Minimum hardware: E2B can run in under 1.5 GB of memory on a phone or single-board computer, and the 31B model fits on a single accelerator; day-one runtimes include [Ollama](/wiki/ollama), [vLLM](/wiki/vllm), llama.cpp, and MLX for Apple Silicon.[3]

## 7. Llama 4: the aging incumbent with the biggest ecosystem

[Llama 4](/wiki/llama_4) from [Meta](/wiki/meta), released April 5, 2025, remains one of the most widely deployed open-weight families, but it has fallen well behind the 2026 frontier.[11] Llama 4 Scout (109 billion total, 17 billion active) advertises a 10M-token context and fits on a single [H100](/wiki/h100) at INT4, while Llama 4 Maverick (about 400 billion total, 17 billion active) supports 1M tokens and fits an 8-GPU node.[11] Maverick's Meta-reported April 2025 numbers were [MMLU-Pro](/wiki/mmlu_pro) 80.5 and [GPQA Diamond](/wiki/gpqa_diamond) 69.8, but independent aggregators later put its Intelligence Index near 18, and its launch was marred by a [Chatbot Arena](/wiki/lmarena) benchmark-manipulation controversy.[11] Scout's 10M context is a needle-in-a-haystack figure; effective long-form usable context is substantially lower in practice.[11]

The bigger caveat is strategic: Meta ended the open-weight Llama line and launched its closed successor Muse Spark on April 8, 2026, so Llama 4 is the last open Llama and [Llama 4 Behemoth](/wiki/llama_4_behemoth) was never released.[11] It is distributed under the Llama 4 Community License, which is source-available with acceptable-use and large-platform restrictions rather than an OSI-approved open-source license.[11] Best-for: teams already invested in the Llama tooling ecosystem that need a battle-tested, deployable model rather than the top score.

## Other open models worth knowing

Three more open releases place well on the July 2026 leaderboard. [MiniMax M3](/wiki/minimax_m3) ties DeepSeek V4 Pro and Kimi K2.6 at Intelligence Index 44 with a 1M context.[1] NVIDIA's [Nemotron 3](/wiki/nemotron_3) Ultra 550B scores 38, and OpenAI's [gpt-oss](/wiki/gpt_oss) 120B, released under Apache-2.0, scores 24 and is a common lightweight local default.[1] Xiaomi's MiMo-V2.5-Pro also registers a strong 42.[1]

## Summary comparison table

Open-weight LLMs ranked by Artificial Analysis Intelligence Index. Benchmarks are as-of July 2026; blank cells are not reported (n/r). Vendor-reported figures reflect each publisher's own evaluation setup.

| Model | Developer | Release | Access | Params (total / active) | Context | License | AA Index | MMLU-Pro | GPQA Diamond | SWE-bench Verified | AIME 2026 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| GLM-5.2 | [Z.ai](/wiki/z_ai) | 2026-06 | Open-weight | ~753B / ~40B | 1M | [MIT](/wiki/mit_license) | 51 | n/r | n/r | n/r | n/r |
| [DeepSeek V4](/wiki/deepseek_v4) Pro | [DeepSeek](/wiki/deepseek) | 2026-04 | Open-weight | 1.6T / 49B | 1M | [MIT](/wiki/mit_license) | 44 | 87.5 | 90.1 | 80.6 | 96.4 |
| [Kimi K2.6](/wiki/kimi_k2_6) | [Moonshot AI](/wiki/moonshot_ai) | 2026-04 | Open-weight | ~1T / 32B | 256K | Modified [MIT](/wiki/mit_license) | 44 | n/r | 90.5 | 80.2 | 96.4 |
| [MiniMax M3](/wiki/minimax_m3) | MiniMax | 2026 | Open-weight | n/r | 1M | n/r | 44 | n/r | n/r | n/r | n/r |
| [Qwen3.5](/wiki/qwen3_5) 397B | [Alibaba](/wiki/alibaba) | 2026-02 | Open-weight | 397B / 17B | 256K (to ~1M) | [Apache-2.0](/wiki/apache_license) | 34 | n/r | 88.4 | 76.4 | 91.3 |
| [Mistral Large 3](/wiki/mistral_large_3) | [Mistral AI](/wiki/mistral) | 2025-12 | Open-weight | 675B / 41B | 256K | [Apache-2.0](/wiki/apache_license) | n/r | ~73.1 | ~43.9 | n/r | n/r |
| [Gemma 4](/wiki/gemma_4) 31B | [Google DeepMind](/wiki/google_deepmind) | 2026-04 | Open-weight | 31B dense | 256K | [Apache-2.0](/wiki/apache_license) | 29 | 85.2 | 84.3 | n/r | 89.2 |
| [Llama 4](/wiki/llama_4) Maverick | [Meta](/wiki/meta) | 2025-04 | Open-weight | ~400B / 17B | 1M | Llama Community | ~18 | 80.5 | 69.8 | n/r | n/r |

Chatbot Arena Elo is not reported by most of this cohort; where available it is about 1452 for Gemma 4 31B, 1418 for Mistral Large 3, and a disputed 1417 for the experimental Llama 4 Maverick entry.[3][7][11]

## Which open-source LLM should you choose?

Which is best for coding? GLM-5.2 for long-horizon agentic engineering (SWE-Bench Pro 62.1) and DeepSeek V4 for competitive programming and repository-scale tasks (Codeforces 3206, SWE-bench Verified 80.6).[5][8] Which is best for reasoning and math? Kimi K2.6 and DeepSeek V4 are level, both at AIME 2026 96.4, with Kimi edging GPQA Diamond at 90.5.[5][6] Which has the biggest usable context? DeepSeek V4, GLM-5.2, and MiniMax M3 all offer a genuine 1M-token window; Qwen3.5 reaches similar lengths most cheaply through linear attention.[1][4][5] Which is cheapest to self-host? Gemma 4, whose E2B edge model runs in under 1.5 GB and whose 31B fits a single GPU.[3] Which has the most permissive license? Any of the Apache-2.0 or MIT models: Mistral Large 3, Qwen3.5, and Gemma 4 are Apache-2.0, while GLM-5.2, DeepSeek V4, and Kimi K2.6 are MIT or Modified MIT.[2][3][4][5][6][7] Avoid Llama 4 if you need a current top model or an OSI-approved license.[11]

## How these were ranked

Overall standing follows the [Artificial Analysis](/wiki/artificial_analysis) Intelligence Index (v4.1), an independent composite over agentic, coding, scientific, and general reasoning evaluations, captured in July 2026; note that Artificial Analysis rescaled its index during 2026, so a model's launch-day score (for example Kimi K2.6 at 54) is not directly comparable with the current v4.1 value (44).[1][6] Per-task benchmarks (MMLU-Pro, GPQA Diamond, SWE-bench Verified and Pro, AIME) come from model cards and launch reports and are treated as vendor-reported unless an independent harness confirmed them; blank cells are left as not reported rather than estimated.[1] License names use their canonical form and link to the corresponding license page.

## References

1. Artificial Analysis, "Comparison of Open Source AI Models across Intelligence, Performance, Price and Context" (Intelligence Index, accessed July 2026). https://artificialanalysis.ai/models/open-source
2. llm-stats.com, "GLM-5.2 Benchmarks, Pricing & Size" (accessed July 2026). https://llm-stats.com/models/glm-5.2
3. Google Open Source Blog, "Gemma 4: Expanding the Gemmaverse with Apache 2.0," April 2, 2026. https://opensource.googleblog.com/2026/03/gemma-4-expanding-the-gemmaverse-with-apache-20.html
4. MarkTechPost, "Alibaba Qwen Team Releases Qwen3.5-397B MoE Model with 17B Active Parameters and 1M Token Context," February 16, 2026. https://www.marktechpost.com/2026/02/16/alibaba-qwen-team-releases-qwen3-5-397b-moe-model-with-17b-active-parameters-and-1m-token-context-for-ai-agents/
5. DeepSeek-AI, "DeepSeek-V4 Technical Report" and V4 model card, Hugging Face, April 2026 (figures summarized in AI Wiki, "DeepSeek V4," https://aiwiki.ai/wiki/deepseek_v4).
6. Moonshot AI, "Kimi K2.6" model card, Hugging Face, April 20, 2026; Artificial Analysis K2.6 analysis, April 21, 2026 (summarized in AI Wiki, "Kimi K2.6," https://aiwiki.ai/wiki/kimi_k2_6).
7. Mistral AI, "Introducing Mistral 3," December 2, 2025. https://mistral.ai/news/mistral-3/
8. DataCamp, "GLM-5.2: Features, Setup, Benchmarks, and Model Switching Guide," June 2026. https://www.datacamp.com/blog/glm-5-2
9. MarkTechPost, "Z.AI Introduces GLM-5.1: An Open-Weight 754B Agentic Model," April 8, 2026. https://www.marktechpost.com/2026/04/08/z-ai-introduces-glm-5-1-an-open-weight-754b-agentic-model-that-achieves-sota-on-swe-bench-pro-and-sustains-8-hour-autonomous-execution/
10. VentureBeat, "Z.ai's open-weights GLM-5.2 beats GPT-5.5 on multiple long-horizon coding benchmarks for 1/6th the cost," June 2026. https://venturebeat.com/technology/z-ais-open-weights-glm-5-2-beats-gpt-5-5-on-multiple-long-horizon-coding-benchmarks-for-1-6th-the-cost
11. Meta AI, "The Llama 4 herd," April 5, 2025 (later benchmark and strategy context summarized in AI Wiki, "Llama 4," https://aiwiki.ai/wiki/llama_4).

