PaCA: Partial Connection Adaptation for Efficient Fine-Tuning

要約

以前のパラメーター効率の高い微調整(PEFT)アルゴリズムは、モデル全体ではなく、いくつかの追加アダプターパラメーターのみをトレーニングすることにより、大規模なニューラルネットワークモデルの微調整のメモリ使用量と計算コストを削減します。
ただし、PEFTによる計算コストの削減は、必ずしもトレーニング時間の短縮につながるわけではありません。
アダプターレイヤーの計算コストは​​、事前に保護されたレイヤーよりもはるかに小さいですが、これらの2つのタイプの層がGPUで連続的に処理されていることがよく知られており、その結果、重大なレイテンシーオーバーヘッドになります。
LORAとそのバリアントは、低ランクアダプターマトリックスと推論中に前提条件の重みと融合しますが、トレーニング中は、アダプターマトリックスが継続的に更新されている間、トレーニング中に凍結したままになり、そのようなマージを防ぎます。
この問題を軽減するために、部分的な接続適応(PACA)を提案します。これは、モデルにアダプターレイヤーを導入する代わりに、事前に処理された重みの中に微調整された部分的な接続をランダムに選択しました。
PACAは、アダプターと前処理された層の連続処理のために時間オーバーヘッドを排除することによりトレーニング速度を向上させるだけでなく、完全な活性化ではなく部分的な活性化のみをグラデーション計算のために保存する必要があるため、活性化メモリも減少します。
LORAと比較して、PACAはトレーニング時間を22%減らし、メモリ合計の使用量を16%短縮し、MMLUデータセットでの微調整やOASST1データセットでの命令調整など、さまざまな微調整シナリオで同等の精度を維持します。
PACAは量子化と組み合わせることができ、llama3.1-70bなどの大規模なモデルの微調整を可能にします。
さらに、PACAは23%長いシーケンスでトレーニングを実施し、LORAと比較してNVIDIA A100 GPUとIntel Gaudi2 HPUの両方で16%スループットを改善します。
このコードはhttps://github.com/woosunghyeon/pacaで入手できます。

要約(オリジナル)

Prior parameter-efficient fine-tuning (PEFT) algorithms reduce memory usage and computational costs of fine-tuning large neural network models by training only a few additional adapter parameters, rather than the entire model. However, the reduction in computational costs due to PEFT does not necessarily translate to a reduction in training time; although the computational costs of the adapter layers are much smaller than the pretrained layers, it is well known that those two types of layers are processed sequentially on GPUs, resulting in significant latency overhead. LoRA and its variants merge low-rank adapter matrices with pretrained weights during inference to avoid latency overhead, but during training, the pretrained weights remain frozen while the adapter matrices are continuously updated, preventing such merging. To mitigate this issue, we propose Partial Connection Adaptation (PaCA), which fine-tunes randomly selected partial connections within the pretrained weights instead of introducing adapter layers in the model. PaCA not only enhances training speed by eliminating the time overhead due to the sequential processing of the adapter and pretrained layers but also reduces activation memory since only partial activations, rather than full activations, need to be stored for gradient computation. Compared to LoRA, PaCA reduces training time by 22% and total memory usage by 16%, while maintaining comparable accuracy across various fine-tuning scenarios, such as fine-tuning on the MMLU dataset and instruction tuning on the Oasst1 dataset. PaCA can also be combined with quantization, enabling the fine-tuning of large models such as LLaMA3.1-70B. In addition, PaCA enables training with 23% longer sequence and improves throughput by 16% on both NVIDIA A100 GPU and INTEL Gaudi2 HPU compared to LoRA. The code is available at https://github.com/WooSunghyeon/paca.

arxiv情報

著者 Sunghyeon Woo,Sol Namkung,Sunwoo Lee,Inho Jeong,Beomseok Kim,Dongsuk Jeon
発行日 2025-03-11 15:24:13+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.LG パーマリンク