Efficient Open-Source LLMs: Sparse Attention and Low-Cost Inference in Practice
This article examines the shift from parameter scaling to efficiency in large language models, including inference cost, long-context overhead, and capability density. It also reviews an open-source efficiency-oriented design that combines sparse attention and linear attention, discusses reported figures that require verification, and outlines the trade-offs among full attention, sparse attention, and linear attention.
I. From the Parameter Race to the Efficiency Race
Over the past few years, improvements in large model capabilities have relied mainly on scaling parameter counts. From an engineering and cost perspective, the returns from this path are declining, for three main reasons.
- Inference cost: The total number of parameters determines memory usage and inference latency. Even with quantization, deploying dense models in the hundreds-of-billions range remains expensive.
- Long context: The self-attention computation of a standard Transformer grows with sequence length at O(n²), and the KV cache grows linearly with length. The overhead of long documents and long-horizon Agent tasks comes mainly from this area.
- Capability density: More teams are measuring models by “task performance per unit cost,” rather than by parameter count alone.
The open-source community has recently produced a group of models that emphasize efficiency. In one publicly disclosed example, a model has about 320B total parameters, about 18B active parameters, and scored about 57 points in an intelligence evaluation. These figures suggest that architectural improvements may reduce dependence on scale. However, the model version, evaluation name and version, comparison targets, and measurement conditions behind these numbers have not yet been verified; official technical reports should be used as the reference before citing them. Comparisons with top closed-source models should also be based on results under specific benchmarks and specific settings, and should not be summarized as being “overall on par.”
II. Hybrid Sparse Attention and Linear Attention Architecture
The core of this type of design is hybrid attention. Consider first the trade-offs among three mechanisms.
- Full attention: Each token interacts with all historical tokens. It has strong expressive power, but computation and KV cache grow rapidly as the context becomes longer.
- Sparse attention: Through local windows, block-based methods, or routing, each token attends only to selected positions. Computation is close to linear, making it suitable for local dependencies.
- Linear attention: Uses kernel functions.
