Architectural Constraints in Long-Sequence LLM Training: An Analytical Perspective on Hardware–Software Co-Design
Abstract
With Large Language Models (LLMs) moving toward ultra-long contexts, limitations in memory capacity, bandwidth, and inter-device communication increasingly restrict training efficiency. Long-context modeling exacerbates the already high resource demands of LLMs, as both the attention mechanism and the surrounding feed-forward and normalization layers scale with sequence length. This paper analyzes long-sequence LLM training from operator-level, system-level, and hardware-level perspectives. Specifically, it highlights that IO-aware exact-attention kernels can significantly reduce HBM traffic for attention computation, but they do not mitigate the activation-memory growth in non-attention modules. When sequence length grows, the main bottlenecks become communication, synchronization, and workload imbalance in distributed sequence/context parallelism. Importantly, the exact crossover point is model-, hardware-, and implementation-dependent. Future scaling will likely demand a combination of software optimization and co-design of memory systems, packaging, and interconnects.
References
- Dao, T., Fu, D. Y., Ermon, S., Rudra, A., & Ré, C. (2022). FlashAttention: Fast and memory-efficient exact attention with IO-awareness. Advances in Neural Information Processing Systems (NeurIPS), 35, 16344-16359.
- Dao, T. (2024). FlashAttention-2: Faster attention with better parallelism and work partitioning. In Proc. 12th International Conference on Learning Representations (ICLR).
- Shah, J., et al. (2024). FlashAttention-3: Fast and accurate attention with asynchrony and low-precision. arXiv preprint arXiv: 2407.08608.
- Luo, C., et al. (2024). Mini-sequence transformer: Optimizing intermediate memory for long sequences training. Advances in Neural Information Processing Systems (NeurIPS).
- Liu, H., Zaharia, M., & Abbeel, P. (2023). Blockwise parallel transformer for large context models. Advances in Neural Information Processing Systems (NeurIPS).
- Liu, H., Zaharia, M., & Abbeel, P. (2024). Ring attention with blockwise transformers for near-infinite context. In Proc. 12th International Conference on Learning Representations (ICLR).
- Jacobs, S. A., et al. (2023). DeepSpeed Ulysses: System optimizations for enabling training of extreme long sequence transformer models. arXiv preprint arXiv: 2309.14509.
- Fang, J., & Zhao, S. (2024). USP: A unified sequence parallelism approach for long context generative AI. arXiv preprint arXiv: 2405.07719.
- Brandon, W., et al. (2023). Striped attention: Faster ring attention for causal transformers. arXiv: 2311.09431.
- Wang, Z., et al. (2025). WLB-LLM: Workload-balanced 4D parallelism for large language model training. In Proc. 19th USENIX Symposium on Operating Systems Design and Implementation (OSDI).
- Jiang, C., et al. (2025). DCP: Addressing input dynamism in long-context training via dynamic context parallelism. In Proc. 31st ACM Symposium on Operating Systems Principles (SOSP).
- Yao, J., et al. (2025). Training ultra long context language model with fully pipelined distributed transformer. In Proc. 8th Conference on Machine Learning Systems (MLSys).
- NVIDIA Corporation. (2026). NVIDIA A100 Tensor Core GPU Architecture. https: //images.nvidia.com/aem-dam/en-zz/Solutions/data-center/nvidia-ampere-architecture-whitepaper.pdf.
- NVIDIA Corporation. (2026). NVIDIA H100 Tensor Core GPU Architecture. https: //resources.nvidia.com/cn-hopper-architecture.
- Rabe, M. N., & Staats, C. (2021). Self-attention does not need O(n2) memory. arXiv preprint arXiv: 2112.05682.
- Vaswani, A., et al. (2017). Attention is all you need. Advances in Neural Information Processing Systems (NeurIPS), 30.
- Yeap, G., et al. (2024). 2nm platform technology featuring energy-efficient nanosheet transistors and interconnects co-optimized with 3DIC for AI, HPC and mobile SoC applications. In IEEE International Electron Devices Meeting (IEDM).
- Li, C., et al. (2025). H2-LLM: Hardware-dataflow co-exploration for heterogeneous hybrid-bonding-based low-batch LLM inference. In Proc. 52nd Annual International Symposium on Computer Architecture (ISCA).
- Zhou, M., Xu, W., Kang, J., & Rosing, T. (2022). TransPIM: A memory-based acceleration via software-hardware co-design for transformer. In Proc. IEEE International Symposium on High-Performance Computer Architecture (HPCA), 1071-1085.
- Khani, M., et al. (2021). SiP-ML: High-bandwidth optical network interconnects for machine learning training. In Proc. ACM SIGCOMM Conference, 657-675.