Open-Source Large Language Models: Categories, Selection Criteria, and Key Architecture Optimizations
The set of publicly available open-source large language models is constantly evolving, so a static list is of limited value. This article organizes the open-source LLM landscape into practical categories, outlines the key dimensions for model selection—licensing, scale, context length, architecture, ecosystem, and deployment cost—and explains common optimizations in decoder-only architectures such as pre-norm, RMSNorm, SwiGLU, and Rotary Position Embeddings (RoPE), with engineering recommendations for training, fine-tuning, inference, and evaluation.
The list of publicly available open-source large language models is not fixed. Model weights, training scripts, inference code, and license terms iterate quickly, and projects differ in their degree of openness: some release weights but restrict commercial use, some release weights and inference code, and some further disclose training data details or training scripts. So rather than asking “which open-source LLMs exist,” a more reliable approach is to build a category framework first, then evaluate candidates along dimensions such as licensing, scale, architecture, context length, ecosystem tooling, and deployment cost. This article does not enumerate specific project names; instead, it focuses on common model categories in the public ecosystem and typical architectural optimizations, helping readers build transferable knowledge.
1. Major Categories of Publicly Available Large Models
By purpose and scale, publicly available large models fall roughly into the following categories.
General-purpose pretrained base models. These are pretrained with self-supervised learning on large corpora and possess general language modeling capability, making them suitable foundations for downstream fine-tuning. They are versatile and highly adaptable, but their instruction-following ability may be limited when used out of the box; instruction tuning, preference alignment, or domain adaptation is usually required.
Dialogue and instruction-aligned models. Built on top of base models, these incorporate instruction data, multi-turn dialogue data, and preference optimization so that outputs better match human interaction patterns. When selecting them, look beyond single-turn benchmark scores and examine alignment data quality, refusal policies, multi-turn context retention, and safety boundaries.
Multimodal models. These typically consist of a vision/audio encoder, a feature projection module, and a language decoder, and can handle joint inputs of text with images, audio, or video. Their engineering complexity exceeds that of text-only models, involving resolution handling, modality alignment, long-sequence compression, and inference memory management.
Specialized models for code, math, and similar tasks. These emphasize long context, structured output, execution feedback, and stable reasoning chains. Code models additionally require attention to completion latency, repository-level context, license compliance, and the safety of generated code.
Lightweight on-device or edge models. With smaller parameter counts, these reduce deployment cost through distillation, quantization, pruning, and structural optimization, making them suitable for local inference, low-latency scenarios, or privacy-sensitive use cases. Lightweight models do not aim to be all-purpose; they prioritize cost-effectiveness on specific tasks.
Domain-adapted models. Fields such as finance, healthcare, law, and industry typically require continued pretraining or instruction tuning on a general base, combined with retrieval augmentation, rule-based validation, and human review. What matters most here is not parameter count but data compliance, domain-specific evaluation, and traceability.
2. Key Dimensions for Model Selection
When facing many public models, build an evaluation matrix around these dimensions.
- Licensing and compliance: whether commercial use and redistribution are allowed, whether attribution is required, and whether output use is restricted. License terms must be reviewed together with your distribution model.
- Parameter scale and hardware cost: larger models are generally more capable, but training and inference costs rise significantly. Evaluate total cost of ownership against memory, throughput, latency, and concurrency requirements.
- Context length: long-context capability affects document QA, codebase understanding, and multi-turn dialogue. Distinguish between the “maximum supported length” and the practical ability to maintain effective attention at that length.
- Architectural efficiency: normalization schemes, activation functions, positional encoding, and attention implementations all affect training stability and inference efficiency. Several common optimizations are analyzed below.
- Data and language coverage: the proportion of Chinese (or other target languages), code, and domain content in the pretraining corpus, as well as cleaning strategies, directly affect downstream performance. Validate with small-scale tests using your own business samples.
- Fine-tuning and tooling ecosystem: how easily the model supports full-parameter fine-tuning, low-rank adaptation, quantized inference, and batch serving; whether there are clear configuration guides and evaluation scripts.
- Evaluation and safety: beyond general benchmarks, design a business-specific evaluation set covering factuality, instruction following, long context, robustness, and safe refusals.
- Deployment and observability: inference services require attention to batching, KV caching, memory fragmentation, rate limiting, logging, and alerting. When deploying in the cloud, you can combine general capabilities such as container platforms, object storage, logging services, and monitoring to build an elastic, observable inference system.
3. Key Optimizations in Typical Decoder-Only Architectures
Many general-purpose open-source LLMs use a decoder-only autoregressive structure. Its basic computation block can be summarized as: input passes through normalization into a self-attention layer, then via a residual connection and normalization into a feed-forward network, followed by another residual connection. Compared with earlier designs, common optimizations include pre-normalization, RMSNorm, SwiGLU, and Rotary Position Embeddings.
1. Pre-Normalization
Pre-norm places normalization before the self-attention and feed-forward layers, with the residual connection added after each sublayer output:
x = x + Attention(Norm(x))x = x + FFN(Norm(x))
This arrangement stabilizes training in deep networks by keeping the residual main path’s gradient flow relatively direct. Combined with RMSNorm, the normalization computation also becomes simpler.
2. RMSNorm
RMSNorm does not perform mean centering. Instead, it scales the input vector by its root mean square and can introduce a learnable scaling factor. For an input vector a, the core idea is:
RMS(a) = sqrt(mean(a_i^2) + eps)a_norm = a / RMS(a)output = g * a_norm
Here eps prevents division by zero, and g is a learnable scale parameter; some implementations also add a bias parameter. Compared with traditional layer normalization, RMSNorm removes the mean computation, is structurally simpler, and benefits training stability and computational efficiency in deep models. Illustrative pseudocode:
class RMSNorm:def __init__(hidden_size, eps=1e-6):self.weight = ones(hidden_size)self.eps = epsdef forward(x):var = mean(x * x, axis=-1, keepdim=True)x_norm = x * rsqrt(var + self.eps)return self.weight * x_norm
3. SwiGLU Activation
SwiGLU is a gated feed-forward network structure. It uses two linear projections: one passes through a Swish-like activation and is multiplied element-wise with the other, then goes through an output projection:
FFN_SwiGLU(x) = W_out( Swish(W_gate x) ⊙ W_value x )Swish(z) = z * sigmoid(βz)
When β = 1, the Swish function is smooth and non-monotonic; as β approaches 0 it becomes nearly linear, and as β grows it approaches ReLU. The gating mechanism lets the network dynamically modulate information flow and generally yields smoother gradient behavior than a plain ReLU feed-forward layer. Illustrative pseudocode:
def swiglu_ffn(x):gate = swish(linear_gate(x))value = linear_value(x)return linear_out(gate * value)
One engineering note: a SwiGLU feed-forward layer typically contains three matrices, so parameter count and hidden-dimension configuration must be rebalanced—you cannot simply reuse the dimension settings of a traditional two-layer feed-forward network.
4. Rotary Position Embeddings (RoPE)
RoPE injects positional information into query and key vectors through rotation operations, so that attention dot products become aware of relative positions. Intuitively, dimensions are rotated in pairs, with rotation angles determined by position indices and frequencies. Illustrative pseudocode:
def apply_rope(q, k, pos):q_rot = rotate_pairs(q, pos, theta)k_rot = rotate_pairs(k, pos, theta)return q_rot, k_rot
RoPE’s advantage is that it does not add absolute positional vectors directly to the input; instead, it encodes relative positional relationships within the attention computation. For long-context scenarios, also pay attention to the frequency base, position interpolation, and length extrapolation strategies—do not judge actual effectiveness by the maximum length in the configuration alone.
4. Engineering Recommendations
During training, prioritize data cleaning, deduplication, mixture ratios, and curriculum scheduling; for deep models, combine mixed precision, gradient checkpointing, parallelism strategies, and stable initialization. During fine-tuning, choose full-parameter tuning or low-rank adaptation based on available resources, and build a validation set from business samples. During inference, watch for KV cache management, continuous batching, quantization accuracy loss, and long-input truncation policies. During evaluation, cover general capability, domain tasks, long context, safety and compliance, and cost metrics together.
Overall, “which open-source LLMs are available” should be understood as a continuously evolving ecosystem question. Mastering the category framework, licensing boundaries, and typical architectural optimizations delivers more long-term value than memorizing a static list. Only by placing model capability, engineering cost, and compliance requirements into the same evaluation matrix can you choose an open-source LLM solution that truly fits your business.
