ChatPaper.aiChatPaper

SaRA: 점진적 희소 저랭크 적응을 통한 고효율 확산 모델 파인튜닝

SaRA: High-Efficient Diffusion Model Fine-tuning with Progressive Sparse Low-Rank Adaptation

September 10, 2024
저자: Teng Hu, Jiangning Zhang, Ran Yi, Hongrui Huang, Yabiao Wang, Lizhuang Ma
cs.AI

초록

최근 몇 년간 확산 모델의 발전은 이미지 및 비디오 생성 작업에서 상당한 진전을 이끌어내었으며, Stable Diffusion 시리즈와 같은 사전 훈련된 모델이 중요한 역할을 하고 있습니다. 중요하지 않은 매개변수를 제거하여 대규모 사전 훈련된 모델을 가볍게 만드는 모델 가지치기에 영감을 받아, 우리는 이러한 비효율적인 매개변수를 최대한 활용하고 사전 훈련된 모델에 새로운 작업별 능력을 부여하기 위한 혁신적인 모델 세밀 조정 방법을 제안합니다. 본 연구에서는 먼저 사전 훈련된 확산 모델의 매개변수의 중요성을 조사하고, 절대값으로 보았을 때 가장 작은 10%에서 20%의 매개변수가 생성 프로세스에 기여하지 않음을 발견했습니다. 이 관찰을 바탕으로, 우리는 이러한 일시적으로 비효율적인 매개변수를 재활용하는 SaRA라는 방법을 제안하며, 이는 희소 가중치 행렬을 최적화하여 작업별 지식을 학습하는 것과 동등합니다. 과적합을 완화하기 위해, 효율적인 세밀 조정을 위한 핵 노름 기반 저랭크 희소 훈련 체계를 제안합니다. 더불어, 재훈련/세밀 조정된 매개변수를 최대한 활용하기 위한 새로운 점진적 매개변수 조정 전략을 설계합니다. 마지막으로, 세밀 조정 중 메모리 비용을 크게 줄이는 혁신적인 비구조화 역전파 전략을 제안합니다. 우리의 방법은 사후 응용에서 사전 훈련된 모델의 생성 능력을 향상시키며, LoRA와 같은 전통적인 세밀 조정 방법을 능가하여 모델의 일반화 능력을 유지하는 데 성공합니다. 우리는 SD 모델에 대한 세밀 조정 실험을 통해 접근 방식을 검증하고, 상당한 개선을 입증합니다. 또한 SaRA는 효율적인 구현을 위해 코드 수정 한 줄만 필요로 하며 기존 방법과 매끄럽게 호환됨을 제공합니다.
English
In recent years, the development of diffusion models has led to significant progress in image and video generation tasks, with pre-trained models like the Stable Diffusion series playing a crucial role. Inspired by model pruning which lightens large pre-trained models by removing unimportant parameters, we propose a novel model fine-tuning method to make full use of these ineffective parameters and enable the pre-trained model with new task-specified capabilities. In this work, we first investigate the importance of parameters in pre-trained diffusion models, and discover that the smallest 10% to 20% of parameters by absolute values do not contribute to the generation process. Based on this observation, we propose a method termed SaRA that re-utilizes these temporarily ineffective parameters, equating to optimizing a sparse weight matrix to learn the task-specific knowledge. To mitigate overfitting, we propose a nuclear-norm-based low-rank sparse training scheme for efficient fine-tuning. Furthermore, we design a new progressive parameter adjustment strategy to make full use of the re-trained/finetuned parameters. Finally, we propose a novel unstructural backpropagation strategy, which significantly reduces memory costs during fine-tuning. Our method enhances the generative capabilities of pre-trained models in downstream applications and outperforms traditional fine-tuning methods like LoRA in maintaining model's generalization ability. We validate our approach through fine-tuning experiments on SD models, demonstrating significant improvements. SaRA also offers a practical advantage that requires only a single line of code modification for efficient implementation and is seamlessly compatible with existing methods.

Summary

AI-Generated Summary

PDF152November 16, 2024