要約
剪定の2つの異なる戦略、すなわち幅と深度剪定を組み合わせた、大規模な言語モデル(LLMS)のための構造化された剪定(2SSP)のための新しい2段階のフレームワークを提案します。
最初の段階(幅の剪定)は、ニューロン全体を除去するため、対応する行と列を除去し、各変圧器ブロックのフィードフォワードネットワークの中間状態の剪定された構造間の接続性を維持することを目指しています。
これは、各ニューロンの出力の大きさに対する影響を測定する重要なスコアに基づいて行われます。
代わりに、第2段階(深さ剪定)は、注意サブモジュール全体を削除します。
これは、関心のある特定のメトリック(この場合は困惑)に最小限の影響を与え、注意サブモジュールを除去する反復プロセスを適用することによって行われます。
また、2つの段階のW.R.T.
望ましいグローバルスパースに。
4つのLLMファミリと3つのスパース率(25 \%、37.5 \%、および50 \%)で2SSPをテストし、3つの言語モデリングデータセットで得られる困惑と、6つのダウンストリームタスクでのパフォーマンスを測定します。
私たちの方法は、3つの言語モデリングと6つのダウンストリームタスクで5つの最先端の競合他社よりも一貫して優れており、剪定時間に関して最大2桁の増加を獲得しています。
このコードは、\ url {https://github.com/fabriziosandri/2ssp}で利用可能です。
要約(オリジナル)
We propose a novel Two-Stage framework for Structured Pruning (2SSP) for pruning Large Language Models (LLMs), which combines two different strategies of pruning, namely Width and Depth Pruning. The first stage (Width Pruning) removes entire neurons, hence their corresponding rows and columns, aiming to preserve the connectivity among the pruned structures in the intermediate state of the Feed-Forward Networks in each Transformer block. This is done based on an importance score measuring the impact of each neuron over the output magnitude. The second stage (Depth Pruning), instead, removes entire Attention submodules. This is done by applying an iterative process that removes the Attention submodules with the minimum impact on a given metric of interest (in our case, perplexity). We also propose a novel mechanism to balance the sparsity rate of the two stages w.r.t. to the desired global sparsity. We test 2SSP on four LLM families and three sparsity rates (25\%, 37.5\%, and 50\%), measuring the resulting perplexity over three language modeling datasets as well as the performance over six downstream tasks. Our method consistently outperforms five state-of-the-art competitors over three language modeling and six downstream tasks, with an up to two-order-of-magnitude gain in terms of pruning time. The code is available at available at \url{https://github.com/FabrizioSandri/2SSP}.
arxiv情報
著者 | Fabrizio Sandri,Elia Cunegatti,Giovanni Iacca |
発行日 | 2025-01-29 17:05:33+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google