ChatPaper.aiChatPaper

FFN 융합: 대규모 언어 모델에서의 순차적 계산 재고

FFN Fusion: Rethinking Sequential Computation in Large Language Models

March 24, 2025
저자: Akhiad Bercovich, Mohammad Dabbah, Omri Puny, Ido Galil, Amnon Geifman, Yonatan Geifman, Izhak Golan, Ehud Karpas, Itay Levy, Zach Moshe, Najeeb Nabwani, Tomer Ronen, Itamar Schen, Elad Segal, Ido Shahaf, Oren Tropp, Ran Zilberstein, Ran El-Yaniv
cs.AI

초록

우리는 FFN Fusion을 소개합니다. 이는 대규모 언어 모델에서 순차적 계산을 줄이기 위해 자연스러운 병렬화 기회를 식별하고 활용하는 아키텍처 최적화 기술입니다. 우리의 핵심 통찰은, 특히 특정 어텐션 레이어를 제거한 후 남은 Feed-Forward Network(FFN) 레이어 시퀀스가 종종 최소한의 정확도 손실로 병렬화될 수 있다는 것입니다. 우리는 이러한 시퀀스를 식별하고 병합하는 원칙적인 방법론을 개발하여, 모델의 동작을 유지하면서 추론 지연 시간을 크게 줄이는 병렬 연산으로 변환합니다. 이러한 기술을 Llama-3.1-405B-Instruct에 적용하여, Llama-Nemotron-Ultra-253B-Base(Ultra-253B-Base)라는 효율적이며 곧 공개될 모델을 생성했습니다. 이 모델은 벤치마크에서 강력한 성능을 유지하면서 추론 지연 시간에서 1.71배의 속도 향상과 토큰당 비용에서 35배의 절감을 달성했습니다. 49B에서 253B 파라미터에 이르는 모델에 대한 광범위한 실험을 통해, FFN Fusion이 더 큰 규모에서 점점 더 효과적이며 양자화 및 가지치기와 같은 기존 최적화 기술을 보완할 수 있음을 입증했습니다. 가장 흥미롭게도, 어텐션과 FFN 레이어를 모두 포함하는 완전한 트랜스포머 블록도 때로는 병렬화될 수 있다는 것을 발견했는데, 이는 신경망 아키텍처 설계에 대한 새로운 방향을 제시합니다.
English
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. 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.

Summary

AI-Generated Summary

PDF193March 25, 2025