Why New Open Source LLMs Are Gaining Traction: Architecture, Cost, and Selection Criteria
Open source large language models (LLMs) have seen rapid capability improvements over the past two years, prompting more developers and enterprises to adopt them as the default for building AI applications. This article examines the key drivers behind their popularity from four angles—architecture, capability boundaries, cost and licensing, and engineering practice—and highlights important considerations for model selection and deployment.
In the past two years, the capabilities of open source large language models (LLMs) have improved rapidly, and a growing number of developers and enterprises are choosing them as the default option for building AI applications. This article examines the reasons behind their popularity from four perspectives—architecture, capability boundaries, cost and licensing, and engineering practice—and discusses key considerations for model selection and deployment.
Native Long-Context Support
Traditional large models have limited context windows. To process long documents in the past, developers typically had to build an additional retrieval-augmented generation (RAG) system: splitting documents, creating indexes, and retrieving relevant chunks. This workflow added system complexity, and splitting could also cause loss of cross-paragraph information.
Newer open source models support extended context windows, with some versions reaching around 1 million tokens. The token-to-character ratio depends on the tokenizer and language. For Chinese text, 1 million tokens roughly corresponds to several hundred thousand to over 700,000 characters—the exact number should be measured with the target model’s tokenizer. With a larger window, an entire book manuscript, a complete code repository, or a large batch of contracts can be placed into the context in one pass. However, this does not mean the model can reliably utilize all content with equal fidelity. Models may recall information at different positions within the context with varying accuracy; key information should ideally be pointed out explicitly in the prompt, or the model should be asked to locate it first.
Improvements in Attention and Training
Extended context introduces two immediate problems: reasoning computation cost rises significantly with context length, and KV cache memory usage expands quickly. To address this, some models adopt hybrid attention designs, which perform hierarchical compression and retrieval over historical content to reduce the amount of data processed during each inference step.
Vendor-disclosed benchmark data suggests that such designs can noticeably reduce the compute and GPU memory overhead for long-context inference. However, the actual reduction depends on the model version, hardware, and test conditions. This article does not cite unverified single numbers; during model selection, testing should be conducted on your own workload.
On the training side, some models replace the common AdamW optimizer with alternatives such as Muon, adapted specifically for the routing mechanisms of mixture-of-experts (MoE) architectures. Other work improves residual connections through manifold constraints to mitigate numerical instability during deep-network training. These changes are aimed at making training more stable at very large parameter scales. For users, these details affect training cost and model quality but are typically not observable during daily inference.
Strengths and Weaknesses in Capabilities
Objective assessment of capability distribution is a prerequisite for selection. Current open source models show clear preference in performance.
Their strength is mainly in code generation and reasoning tasks in STEM fields (mathematics, science, engineering). On several public coding benchmarks, some open source models are approaching or even exceeding certain closed source models. In extended engineering tasks, flagship versions can autonomously execute programming tasks for longer durations with minimal human intervention—for example, designing database schemas or building small applications. The execution time depends on task complexity and budget, and not all tasks proceed smoothly.
The weaknesses are equally apparent. First, performance on factual knowledge QA is generally weaker than top-tier closed source models, with measurable gaps in relevant benchmarks. Second, there remains a gap in complex logical reasoning. Third, multimodal capability is a weak point for several open source model families. Some families remain text-only; image understanding and video generation require separate models or combined solutions.
In selecting a model, it is helpful to categorize tasks. Coding and document analysis are good candidates for open source models. For QA involving heavy fact-checking, retrieval should be added, or a model with a stronger knowledge base should be chosen. Image-related tasks require the integration of multimodal models.
Cost and License Implications
Much of the appeal of open source models lies in pricing. The API output price of some open source models is significantly lower than that of traditional closed source flagship models—in some cases, the gap shown on pricing pages can reach tens of times. However, prices change with version, region, cache hit status, and promotions; this article does not provide fixed numbers. Please refer to the official pricing pages and estimate costs separately for input, output, and cache hits.
License terms are equally important. Some flagship models in the new generation are released under the MIT license, allowing commercial use, modification, and redistribution. However, whether a specific model is MIT-licensed should be confirmed by reading the license file distributed with that model—do not infer from the model family name alone. Enterprises should have legal counsel review the license terms before adoption.
Private deployment is also a common choice. Companies can run models on their own GPU clusters or cloud container platforms and scale compute elastically based on concurrency. Platform selection should be based on the team’s existing technology stack, compliance requirements, and cost estimates, rather than relying on a single vendor’s recommendation.
Developer Practice: Long-Context Code Review
The example below demonstrates how to call an OpenAI-compatible API model for code review at the repository level. In this example, the API key is read from environment variables, requests include timeout and retry logic, oversized content is blocked, and basic redaction is performed before sending.
import osimport reimport timeimport requestsAPI_ENDPOINT = os.environ["LLM_API_ENDPOINT"] # e.g., https://your-host/v1/chat/completionsAPI_KEY = os.environ["LLM_API_KEY"]MODEL_ID = os.environ.get("LLM_MODEL_ID", "<MODEL_ID>") # Replace with the actual model IDMAX_CHARS = 300_000 # Character limit per request; set based on the model's context window and tokenizerdef redact(text: str) -> str:"""Redact common key assignment patterns. Use dedicated secret scanning tools in production."""return re.sub(r"(?i)(api[_-]?key|secret|password|token)\s*[:=]\s*\S+",r"\1=<REDACTED>",text,)def call_with_retry(payload: dict, retries: int = 3, timeout: int = 120) -> str:headers = {"Content-Type": "application/json","Authorization": f"Bearer {API_KEY}",}for attempt in range(1, retries + 1):try:resp = requests.post(API_ENDPOINT, headers=headers, json=payload, timeout=timeout)except requests.Timeout:if attempt == retries:raisetime.sleep(2 ** attempt)continueif resp.status_code == 200:return resp.json()["choices"][0]["message"]["content"]if resp.status_code in (429, 500, 502, 503, 504) and attempt < retries:time.sleep(2 ** attempt)continueraise RuntimeError(f"API request failed: {resp.status_code}, {resp.text[:500]}")def review_codebase(codebase_text: str) -> str:safe_text = redact(codebase_text)if len(safe_text) > MAX_CHARS:safe_text = safe_text[:MAX_CHARS]payload = {"model": MODEL_ID,"messages": [{"role": "system","content": "You are a senior software engineer. Review the following codebase for bugs, security issues, and performance problems. Provide a prioritized, actionable summary.",},{"role": "user", "content": safe_text},],"temperature": 0.1,}return call_with_retry(payload)
