Hybrid Architectures for Language Models: Systematic Analysis and Design Insights

Sangmin Bae, Bilge Acun, Haroun Habeeb, Seungyeon Kim, Chien-Yu Lin, Liang Luo, Junjie Wang, Carole-Jean Wu · DOI

Introduction

The "Quadratic Wall" remains a significant bottleneck for Large Language Models (LLMs). Standard Transformers rely on self-attention, where compute and memory costs scale quadratically with sequence length. While State Space Models (SSMs) like Mamba offer linear scaling and reduced memory footprints, they often fall short in complex reasoning and in-context learning compared to Transformers. This paper systematically explores hybrid architectures that combine the strengths of both, providing a design "recipe" for high-performance, efficient language models.

Hybridization Strategies

The researchers investigated two primary methods for integrating Mamba-2 and Llama-style Transformer blocks:

  1. Inter-layer Hybrid (Sequential): This approach alternates between Transformer blocks and multiple Mamba blocks (e.g., a 1:5 ratio).
  2. Intra-layer Hybrid (Parallel): This strategy fuses both primitives within a single layer by running attention heads and Mamba heads in parallel and combining their outputs.
Overview of hybrid architectures and the Pareto frontier of throughput vs. performance.

Evaluation spanned models from 100M to 3B parameters, focusing on language modeling quality, long-context retrieval, scaling behavior, and hardware efficiency.

Key Insights and Design Principles

The systematic analysis revealed several critical findings for model design:

  • Intra-layer Superiority: Parallelizing Transformer and Mamba heads (intra-layer) consistently provides a better Pareto frontier, achieving higher accuracy than inter-layer models while maintaining superior inference throughput.
  • Strategic Block Placement: For inter-layer hybrids, the placement of Transformer blocks is crucial. Performance improves significantly when Transformer blocks are placed in the middle or late layers rather than at the beginning. Early layers appear more effective when utilizing the signal-processing capabilities of SSMs.
  • Enhanced Extrapolation: Hybrid models exhibit better sequence length extrapolation than pure Transformers. Even a small integration of Mamba allows models to function effectively on contexts significantly longer than those seen during training.
  • Scalability with MoE: These hybrid designs are fully compatible with Mixture-of-Experts (MoE) frameworks, providing the same quality improvements observed in standard Transformer-MoE architectures.

Experimental Results

The hybrid models demonstrated clear advantages across multiple metrics:

  • Performance: Hybrids outperformed homogeneous baselines by up to 2.9% in accuracy and reduced Negative Log Likelihood (NLL) by 0.04 within the same compute budget.
  • Efficiency: At an 8K context length, Mamba-based hybrids achieved a 95% reduction in KV cache size compared to pure Transformers (13.4 MiB vs. 256 MiB).
  • Hardware Metrics: As shown in the efficiency analysis, hybrids maintain competitive FLOPs and step times while significantly optimizing memory usage.
Comparison of FLOPs per sample, end-to-end step time, and GPU peak memory across model architectures.
  • Long-Context Retrieval: In "Needle-In-A-Haystack" benchmarks, hybrids maintained near 100% accuracy up to 1.5x their training length, whereas pure Transformers failed immediately beyond their training limit.

Conclusion

Hybrid architectures, particularly intra-layer designs, offer a compelling solution to the efficiency-performance trade-off in language modeling. By combining the reasoning power of Transformers with the linear scaling of SSMs, these models slash memory requirements for long-context tasks without sacrificing quality. Future work will explore these architectures at frontier scales (7B+ parameters) and their application to multimodal domains like video and audio.

Summary updated

BibTeX
@misc{bae2025hybrid,
  author = {Sangmin Bae and Bilge Acun and Haroun Habeeb and Seungyeon Kim and Chien-Yu Lin and Liang Luo and Junjie Wang and Carole-Jean Wu},
  title = {{Hybrid Architectures for Language Models: Systematic Analysis and Design Insights}},
  year = {2025},
  eprint = {2510.04800},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.04800},
}
Figure