FFN Fusion: Rethinking Sequential Computation in Large Language Models

Akhiad Bercovich, Mohammad Dabbah, Omri Puny, Ido Galil, Amnon Geifman +13 more
3/24/2025
cs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

We introduce FFN Fusion, an architectural optimization technique that reduces sequential computation in large language models by identifying and exploiting natural opportunities for parallelization. Our key insight is that sequences of Feed-Forward Network (FFN) layers, particularly those remaining after the removal of specific attention layers, can often be parallelized with minimal accuracy impact.

Show full abstract

We develop a principled methodology for identifying and fusing such sequences, transforming them into parallel operations that significantly reduce inference latency while preserving model behavior. Applying these techniques to Llama-3.1-405B-Instruct, we create Llama-Nemotron-Ultra-253B-Base (Ultra-253B-Base), an efficient and soon-to-be publicly available model that achieves a 1.71X speedup in inference latency and 35X lower per-token cost while maintaining strong performance across benchmarks. Through extensive experiments on models from 49B to 253B parameters, we demonstrate that FFN Fusion becomes increasingly effective at larger scales and can complement existing optimization techniques like quantization and pruning. Most intriguingly, we find that even full transformer blocks containing both attention and FFN layers can sometimes be parallelized, suggesting new directions for neural architecture design.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bercovich2025fusion,
  title  = {FFN Fusion: Rethinking Sequential Computation in Large Language Models},
  author = {Akhiad Bercovich and Mohammad Dabbah and Omri Puny and Ido Galil and Amnon Geifman and Yonatan Geifman and Izhak Golan and Ehud Karpas and Itay Levy and Zach Moshe and Najeeb Nabwani and Tomer Ronen and Itamar Schen and Elad Segal and Ido Shahaf and Oren Tropp and Ran Zilberstein and Ran El-Yaniv},
  year   = {2025},
  eprint = {2503.18908},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.18908v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.18908.svg)](https://codeofpaper.com/paper/2503.18908)

Discussion