The Efficiency Revolution in LLMs: Breaking Through with 27% of the Compute
As top large language models converge in performance while capital investment remains vastly unequal, scaling compute and parameters alone is hitting diminishing returns. This article explains why attention's quadratic cost is the core bottleneck and walks through three proven efficiency levers—sparse and linear attention, low-rank compression with quantization, and system-level inference scheduling. It also proposes a four-dimension framework for measuring efficiency claims and a practical checklist for developers, showing how algorithmic, numerical, and system optimizations can work together to deliver equivalent or better results with about 27% of the compute.
Introduction: A New Competitive Paradigm Under Compute Asymmetry
A striking pattern is emerging as large model technology evolves: the performance gap between top models is shrinking quickly, while the capital behind them differs by orders of magnitude. According to publicly available industry reports, the capability gap among leading model camps narrowed from more than thirty percentage points in the early days to single digits over a given period. Meanwhile, the gap in private capital investment across regions reached more than twentyfold.
These figures point to a core fact: the “brute-force path” of simply expanding compute and parameter scale is seeing rapidly diminishing marginal returns. Replacing resource stacking with algorithmic innovation, and using efficiency to offset resource asymmetry, is becoming a proven technical route. When efficiency becomes a weapon, compute asymmetry can be countered by algorithmic asymmetry.
1. The Physical Bottleneck to Cross: Quadratic Growth in Attention Computation
To understand the value of the efficiency revolution, you first need to see the computational characteristic that is choking the entire industry.
The computational complexity of the traditional self-attention mechanism grows quadratically with context length. This means that when the text length a model can process doubles, the computation does not increase by a factor of two but grows to four times; when the text length expands tenfold, the computation balloons to one hundred times.
The following pseudocode illustrates this cost directly:
# Naive attention: both compute and memory grow quadratically with sequence length nscores = query @ key.transpose(-1, -2) # shape: [batch, heads, n, n]weights = softmax(scores * scale)output = weights @ value # compute O(n^2 * d)
In scenarios such as long-document understanding, repository-level code analysis, and multi-turn long conversations, this growth translates directly into unacceptable latency and cost. Therefore, the first battlefield for efficiency optimization must be the attention mechanism itself.
2. Breakthrough Path One: Sparse and Linear Attention
The first class of solutions widely adopted in the industry breaks the strong assumption that “every word must attend to every other word.”
- Sparse attention: Through patterns such as local windows, global anchors, and random sampling, dense fully connected attention is transformed into sparse connections, reducing complexity to near-linear.
- Linear attention and state-space approaches: Using kernel approximations or recurrent state compression, historical information is aggregated into a fixed-size state representation, so that the cost of long-sequence inference no longer balloons quadratically with length.
- Hybrid stacking: Retaining high-precision attention in some layers while using low-cost approximations in the rest, striking a balance between quality and cost.
The key engineering point is that the sparse pattern must align with hardware memory-access characteristics; otherwise, a theoretical reduction in complexity will be swallowed by random memory-access overhead.
3. Breakthrough Path Two: Low-Rank Compression Combined with Quantization
The second class of solutions acts on the parameters and numerical precision themselves.
- Low-rank decomposition: Approximating large weight matrices as the product of two skinny matrices, significantly reducing parameter count and memory access.
- Mixed precision and quantization: Using lower-bit representations for weights and activations while retaining higher precision for sensitive layers to control accuracy loss.
- Distillation and sparse activation: Using a large model to guide the training of a smaller model, or having the network activate only some expert paths during inference, making “large parameters, small compute” possible.
A schematic low-rank replacement is shown below:
# Approximate W: [d, d] as A: [d, r] and B: [r, d], with r << dY = (X @ A) @ B # parameters drop from d*d to 2*d*r
It is important to emphasize that compression is not lossless. A reasonable approach is to establish an evaluation baseline and assess layer by layer how sensitive downstream tasks are to compression, rather than applying a one-size-fits-all global cut.
4. Breakthrough Path Three: System-Level Scheduling on the Inference Side
Beyond algorithms, the system layer also holds a large amount of recoverable efficiency gains.
- Cache reuse: Reusing key-value caches for prefixes, system prompts, and repeated fragments to avoid redundant computation.
- Continuous batching and dynamic paging: Improving memory utilization and throughput while lowering the cost per request.
- Request routing: Distributing requests to models of different sizes by task difficulty, sending simple tasks down a lightweight path.
- Elastic compute scheduling: Automatically scaling up and down by peak and trough using container platforms and monitoring and alerting systems to reduce idle waste.
When deploying on the cloud, the typical combination is: object storage hosting models and data, a container platform hosting inference services, and logging and monitoring and alerting services ensuring observability. Such general-purpose capabilities are offered as standard categories on platforms like Baidu AI Cloud, making it easy for teams to assemble them as needed.
5. How to Measure Efficiency Conclusions Like “27% of the Compute”
Efficiency claims must be reproducible; otherwise, they have no engineering value. A four-dimension measurement framework is recommended:
- Quality dimension: Evaluate on both public benchmarks and self-built business datasets to avoid overfitting to a single leaderboard.
- Cost dimension: Use a unified measure of compute consumption per thousand requests, peak memory, and latency percentiles.
- Scale dimension: Report performance separately for short and long contexts to expose whether the quadratic bottleneck has truly been removed.
- Stability dimension: Observe throughput fluctuation and error rates under long-running stable operation.
Only by placing “equivalent results” and “resource consumption” in the same table for comparison can efficiency conclusions hold up.
6. A Practical Checklist for Developers
- Establish a baseline first: fix the evaluation set and hardware measure, and record the quality-cost curve.
- Then choose levers: introduce attention sparsification, low-rank quantization, and inference scheduling in order of payoff, step by step.
- Validate in small steps: change only one variable at a time and keep rollback-capable configurations.
- Observe the full pipeline: bring cache hit rate, batching efficiency, and memory fragmentation into daily monitoring.
- Attribute costs: break down the compute bill by business line so that optimization directions align with business value.
Conclusion
Achieving equivalent or even better results with about 27% of the compute is not the credit of any single technique, but the result of three layers working together: algorithms, numerical representation, and system scheduling. Under the real constraint of limited compute supply, making efficiency a core competency is the sustainable technical moat.
