본문 바로가기 주메뉴 바로가기
국회도서관 홈으로 정보검색 소장정보 검색

결과 내 검색

동의어 포함

목차보기

Title Page 2

Abstract 4

Contents 8

Chapter 1. Introduction 21

1.1. Purpose of Research 21

1.2. Contents 24

Chapter 2. AAL: Auxiliary Activation Learning for Reducing Activation Memory without Compromising Training Speed 27

2.1. Introduction 27

2.2. Background & Motivation 29

2.3. Methodology 30

2.3.1. Auxiliary Activation Learning 30

2.3.2. Convergence of Auxiliary Activation Learning 32

2.3.3. Constructing Auxiliary Activations 33

2.4. Experiments 35

2.4.1. Training ResNet 35

2.4.2. Training Transformer, ViT, and MLP-Mixer 39

2.4.3. Usability 41

2.5. Conclusion 43

2.6. Appendices 44

2.6.1. Proof of Theorem 44

2.6.2. Comparisons between Auxiliary Residual Activation and Auxiliary Sign Activation 46

2.6.3. Does Adding Auxiliary Activation Really Help? 47

2.6.4. Comparisons between Auxiliary Activation Learning and Other Memory Saving Algorithms under Identical Compression Rates 49

2.6.5. Comparisons between Auxiliary Residual Activation and Momentum ResNet 50

2.6.6. Maximum Batch size and Training Time with Auxiliary Activation Learning 51

2.6.7. Experimental Details 51

Chapter 3. ALAM: Averaged Low-Precision Activation for Reducing Activation Memory to Extremely Low-Precision 58

3.1. Introduction 58

3.2. Background & Motivation 61

3.2.1. Formulation 61

3.2.2. Convergence of Activation-Compressed Training 62

3.3. Methodology 63

3.3.1. Average Quantization for Generating Sub-1b Precision 63

3.3.2. GradNromVar for a Lightweight Sensitivity Calculation 66

3.3.3. ALAM: a New Activation-Compressed Training Framework Using Average Quantization and GradNormVar 68

3.4. Experiments 70

3.4.1. Text Classification 70

3.4.2. Large Language Models 72

3.4.3. Usability 74

3.5. Conclusion 75

3.6. Appendices 76

3.6.1. Proof of Theorem 76

3.6.2. Responses Generated by LLaMA2-7B fine-tuned using ALAM 83

3.6.3. Training Time of Activation-Compressed Training 84

3.6.4. Experimental Details 85

Chapter 4. DropBP: Dropping Backward Propagation for Accelerating Fin-Tuning of Large Language Models 87

4.1. Introduction 87

4.2. Background & Motivation 90

4.3. Methodology 91

4.3.1. Dropping Backward propagation 91

4.3.2. Sensitivity-based Drop Rate Allocation 93

4.4. Experiments 94

4.4.1. Implementation and Settings 94

4.4.2. Main Results: Accuracy and Efficiency 96

4.4.3. Usability 98

4.4.4. Ablation Study 100

4.5. Related Works 103

4.6. Conclusion 104

4.7. Appendices 105

4.7.1. The importance of short paths in residual networks 105

4.7.2. Theoretical FLOPs and Actual Training Time Using DropBP 106

4.7.3. Convergence Speed Up Using DropBP 109

4.7.4. Distribution of Drop Rates Determined by Sensitivity 111

4.7.5. Comparisons between Layer Dropping and DropBP on fine-tuning LLMs 111

4.7.6. Experimental Details 113

Chapter 5. PaCA: Partial Connection Adaptation for Accelerating Parameter Efficient Fine-Tuning 114

5.1. Introduction 114

5.2. Background & Motivation 116

5.3. Methodology 120

5.3.1. PaCA: Partial Connection Adaptation 120

5.3.2. Convergence Analysis of PaCA 122

5.4. Experiments 123

5.4.1. Fine-Tuning for Specific Tasks 123

5.4.2. Instruction Tuning 125

5.4.3. QPaCA: Enhancements to QLoRA 126

5.4.4. Usability 127

5.5. Effect of Selection Strategy 129

5.6. Related Work 130

5.7. Conclusion 131

5.8. Appendices 132

5.8.1. Proof of Theorem 132

5.8.2. Implementation of PaCA 134

5.8.3. Applicability of PaCA to Other Architectures and Tasks 135

5.8.4. Experimental Details 137

Chapter 6. Conclusion 140

6.1. Conclusion 140

6.2. Limitations and Future Works 142

Bibliography 144

초록 169

List of Tables 12

Table 2.1. Test accuracy of ResNet-18 trained on CIFAR-10, CIFAR-100 and Tiny... 37

Table 2.2. Test accuracy, training memory with compression rate (bracketed), and... 39

Table 2.3. Test/validation scores, compression rate (bracketed), and training time... 42

Table 2.4. Largest models that can be trained using a single GPU with 24GB memory.... 43

Table 2.5. Test accuracy, training memory, training time of one epoch, and mean values... 47

Table 2.6. Test accuracy of ResNet-18 trained on CIFAR-10, CIFAR-100, and Tiny... 49

Table 2.7. Test accuracy, training memory, compression rate (bracketed), and training... 50

Table 2.8. Test accuracy, training memory, and training time of one epoch in ViT-Large... 50

Table 2.9. Test Accuracy, training memory, and training time of one epoch in ResNet-... 51

Table 2.10. Maximum batch size and training time of ResNet-152 on ImageNet. The... 51

Table 2.11. Maximum batch size and training time of ViT-Large on CIFAR-100 51

Table 3.1. Test accuracy of MLP trained on MNIST with different activation approxi-... 65

Table 3.2. Test accuracy, activation memory (Act mem) with compression rate, and... 70

Table 3.3. Test accuracy, activation memory (Act mem) with compression rate, and... 72

Table 3.4. Comparisons with model compression techniques in fine-tuning LLMs us-... 73

Table 3.5. Activation memory and total memory required for fine-tuning LLaMA2-7B... 74

Table 3.6. Time complexity of training and activation compression required by ALAM 84

Table 3.7. Training time when fine-tuning LLaMA models using ALAM 84

Table 4.1. Test accuracy on MMLU and commonsense reasoning tasks. In DropBP,... 96

Table 4.2. Training time, memory usage, and test score on MT-Bench task when fine-... 96

Table 4.3. Time required for fine-tuning LLaMA2 models with DropBP on the Alpaca... 97

Table 4.4. Available maximum sequence length for fine-tuning LLaMA2-70B using... 99

Table 4.5. The number of submodules being trained and test accuracy on the 5-shot... 101

Table 4.6. Test accuracy on the 0-shot commonsense reasoning tasks when fine-tuning... 102

Table 4.7. Training time per iteration for a sequence length of 512 through Full-... 106

Table 4.8. Test accuracy on the 0-shot commonsense reasoning tasks when fine-tuning... 112

Table 4.9. Detailed Setup for Table 4.1-4.2. BS and MBS are denoted as the batch size... 113

Table 5.1. Comparisons of memory usage (Mem), training time (Time), and 5-shot ac-... 124

Table 5.2. Comparisons of memory usage (Mem), training time (Time), and score... 125

Table 5.3. Comparisons of memory usage (Mem), training time (Time), and score... 126

Table 5.4. Max sequence length for fine-tuning LLaMA3-8B using vaious PEFT algo-... 127

Table 5.5. Test score on MT-Bench dataset when fine-tuning LLaMA3-8B with PaCA... 129

Table 5.6. Comparisons of memory usage (Mem), training time (Time), and accuracy... 135

Table 5.7. Comparisons of memory usage (Mem), training time (Time), and accuracy... 135

Table 5.8. Hyperparameters used for analyzing the number of operations and the aver-... 137

Table 5.9. Hyperparameters when fine-tuning LLaMA2-7B/13B and LLaMA3-8B us-... 137

Table 5.10. Hyperparameters used when fine-tuning LLaMA3-8B using PEFT algo-... 138

Table 5.11. Hyperparameters used when fine-tuning LLaMA3.1-70B using QLoRA... 138

Table 5.12. Hyperparameters used for verifying the maximum sequence length on a... 139

Table 5.13. Hyperparameters for comparing training throughput when increasing batch... 139

Table 6.1. The overview of proposed efficient training algorithms 141

Table 6.2. Comparisons of memory usage (Mem), training time (Time), and score on... 142

List of Figures 17

Figure 2.1. The overview of conventional memory-efficient training algorithms and... 30

Figure 2.2. Two candidates of auxiliary activation 33

Figure 2.3. Training ResNet-50 using Auxiliary Residual Activation (ARA) 36

Figure 2.4. Distributions of learning indicator values by Auxiliary Residual Activaiton... 37

Figure 2.5. Learning curves of Auxiliary Residual Activation when training ResNet-... 38

Figure 2.6. Transformer-like networks trained using Auxiliary Sign Activations... 40

Figure 2.7. Learning Curves of Auxiliary Sign Activation when Training Transformer... 41

Figure 2.8. Train and Validation losses in ResNet-18 training on Tiny ImageNet 46

Figure 2.9. Distributions of learning indicator values of RA and ARA in ResNet-18 48

Figure 2.10. Distributions of learning indicator values of SA and ASA in ResNet-18 48

Figure 2.11. Training process of ActNN with ARA 52

Figure 2.12. Training process of Mesa with ASA 53

Figure 3.1. Memory usage breakdown of GPT-3 (22B/175B) and MT-LNG (530B/1T)... 59

Figure 3.2. Average Quantization for high-quality sub-1b precision 65

Figure 3.3. Comparisons of various compressed activations in VGG-11 training on... 66

Figure 3.4. Sensitivity and bit preicision allocation comparisons when the target av-... 68

Figure 3.5. ALAM training framework 69

Figure 3.6. Sensitivity and bit precision allocation of GACT and ALAM when target... 71

Figure 3.7. Learning curves when fine-tuning LLaMA2-7B on the Alpaca dataset 72

Figure 3.8. The maximum micro-batch size of different training schemes for fine-... 74

Figure 4.1. Performance enhancements in fine-tuning large language models using... 88

Figure 4.2. Interpreting the model with residual connections as a combination of mul-... 91

Figure 4.3. The overveiw of DropBP 92

Figure 4.4. Code implementation for integrating DropBP 95

Figure 4.5. Validation perplexity (PPL) for fine-tuning LLaMA2-70B through QLoRA... 98

Figure 4.6. Throguhput on a single NVIDIA A100 GPU on a single... 99

Figure 4.7. Validation perplexity (PPL) for fine-tuning LLaMA2-7B through LoRA... 100

Figure 4.8. Distribution of drop rates and the validation PPL when fine-tuning... 102

Figure 4.9. The impact of path length for fine-tuning LLaMA2-7B 106

Figure 4.10. Validation perplexity (PPL) when fine-tuning LLaMA2 models through... 110

Figure 4.11. Training curves across training steps and time for fine-tuning LLaMA2-... 110

Figure 4.13. The distribution of drop rates determined by sensitivity when fine-tuning... 111

Figure 4.14. Validation perplexity (PPL) for fine-tuning LLaMA2-7B through LoRA... 112

Figure 5.1. The overview of Partial Connections Adaptation (PaCA). FW, BW, and... 116

Figure 5.2. The number of operations (TFLOPs) and training time per iteration... 118

Figure 5.3. Training throughput on a single NVIDIA A100 GPU and... 128

Figure 5.4. The implementation of PaCA 134

초록보기

 딥 뉴럴 네트워크(Deep Neural Networks, DNN)는 다양한 분야에서 인간의 성능에 필적하거나 이를 초월하는 능력을 보여주었다. 이러한 성공은 주로 딥 뉴럴 네트워크를 훈련하기 위해 널리 사용되는 학습 규칙인 역전파(Backpropagation)에 기인한다. 역전파는 체인 룰에 기반한 알고리즘으로, 오류를 네트워크를 거슬러 전파하여 모델의 가중치를 효과적으로 조정하고 손실을 최소화한다. 그러나 역전파는 상당한 훈련 비용을 수반한다. 첫째, 모델 상태를 저장하기 위한 메모리와 활성화 메모리(Activation Memory)가 대규모로 필요하다. 둘째, 순전파(Forward Propagation) 동안 활성화를 계산하고, 역전파(Backward Propagation) 동안 입력 및 가중치의 그래디언트를 계산하기 위해 높은 계산 비용이 요구된다. 결과적으로 딥 뉴럴 네트워크를 훈련하려면 고가의 GPU와 같은 많은 고성능 컴퓨팅 장치가 필요하며, 상당한 시간과 전력을 소비한다. 이러한 문제를 해결하기 위해, 매개변수 효율적 미세 조정(Parameter-Efficient Fine-Tuning, PEFT), 활성화 재구성(Activation Rematerialization), 활성화 압축 훈련(Activation-Compressed Training), 계층 드롭핑(Layer Dropping) 등의 다양한 효율적인 훈련 알고리즘이 제안되었다. 본 논문은 기존의 효율적인 훈련 알고리즘을 개선하거나 새로운 최적화 기법을 제안하는 데 중점을 둔다.

첫째, 보조 활성화 학습(Auxiliary Activation Learning, AAL)은 추가적인 훈련 시간을 소모하지 않고 활성화 메모리를 줄이기 위해 제안되었다. 제안된 훈련 알고리즘은 순전파 동안 보조 활성화를 출력 활성화에 추가하고, 가중치 그래디언트를 계산하기 위해 실제 활성화 대신 보조 활성화를 메모리에 저장한다. 활성화 재구성 또는 활성화 압축 훈련과 같은 기존의 활성화 메모리 절감 알고리즘과 달리, AAL은 양자화, 비양자화, 또는 재계산과 같은 추가적인 과정을 피함으로써 활성화 메모리를 줄이는 데 소모되는 훈련 시간 오버헤드를 제거한다. 또한, 특정 조건에서 보조 활성화가 손실의 수렴을 보장할 수 있음을 이론적으로 증명한다. 이러한 조건을 만족하는 두 가지 보조 활성화를 제안하며, 이를 통해 정확도 손실 없이 최대 30%의 활성화 메모리 절감과 훈련 시간 오버헤드 없는 비전 및 텍스트 분류 작업에서의 효과를 입증한다.

둘째, 메모리 효율적 훈련을 위한 평균 저정밀도 활성화(Averaged Low-Precision Activation for Memory-Efficient Training, ALAM)는 훈련 성능을 희생하지 않고 활성화 메모리를 대폭 줄이는 최선의(State-of-the-Art) 활성화 압축 훈련 프레임워크이다. ALAM은 두 가지 주요 혁신을 도입한다. 첫째, 평균 양자화(Average Quantization)는 활성화를 그룹 평균 값으로 압축하여 그래디언트 분산을 이론적으로 최소화하며, 이 그룹 평균 값을 추가적으로 양자화하여 1비트 미만의 효과적인 정밀도로 높은 품질의 활성화 압축을 구현하고 비트 할당의 유연성을 제공한다. 둘째, ALAM은 가중치 그래디언트의 L2 노름만을 기반으로 하는 비용 효율적인 민감도 계산 알고리즘을 포함하여, 기존 활성화 압축 훈련 알고리즘에 비해 민감도 분석과 관련된 메모리 오버헤드를 크게 줄인다. 이러한 기술을 통해 ALAM은 LLaMA-30B와 같은 대규모 언어 모델에서 활성화 메모리를 최대 10 줄이면서도 유사한 정확도를 유지한다.

역전파 드롭핑(Dropping Backward Propagation, DropBP)은 훈련 중 계산 비용과 활성화 메모리를 줄이면서 정확도를 유지하기 위한 방법으로 제안되었다. DropBP는 역전파 동안 계층을 무작위로 드롭하여 드롭된 계층의 부동소수점 연산(FLOPs)과 활성화 메모리를 감소시킨다. 직관적으로, DropBP는 드롭되지 않은 계층과 스킵 연결(Skip Connection)으로 구성된 얕은 서브모듈을 훈련하는 것으로 이해할 수 있다. 이러한 작은 서브모듈은 그래디언트에 큰 영향을 미쳐, 네트워크 전체를 효과적으로 훈련할 수 있도록 한다. 또한, DropBP는 각 계층의 민감도를 기반으로 드롭율을 할당하는 민감도 기반 드롭율 할당(Sensitivity-Based Drop Rate Allocation)을 도입하여 안정적인 훈련을 보장한다. DropBP는 훈련 시간을 44% 단축하고 기준선과 유사한 정확도를 유지하며, LLaMA2-70B와 같은 대규모 언어 모델에서 동일한 Perplexity에 도달하는 시간을 1.5배 단축한다. 또한, DropBP는 NVIDIA A100 GPU에서 6.2배 더 긴 시퀀스 길이로 훈련이 가능하며, NVIDIA A100 GPU에서 79%, Intel Gaudi2 HPU에서 117%의 처리량 증가를 통해 대규모 모델 훈련에서의 효율성과 다양성을 입증한다.

부분 연결 적응(Partial Connection Adaptation, PaCA)는 기존의 Low-Rank Adaptation(LoRA)과 같은 방법에 비해 훈련 시간과 활성화 메모리를 대폭 줄이기 위해 설계된 새로운 PEFT 알고리즘이다. 이전의 PEFT 알고리즘은 GPU에서 사전 훈련된 가중치와 어댑터를 순차적으로 처리하여 훈련 시간 오버헤드가 발생한다. 반면, PaCA는 사전 훈련된 가중치 내에서 무작위로 선택된 부분 연결을 미세 조정하여 이러한 순차 처리 오버헤드를 제거하고 훈련을 가속화한다. 또한, 그래디언트 계산을 위해 전체 활성화 대신 부분 활성화만 저장함으로써 활성화 메모리를 줄인다. PaCA는 LoRA와 비교하여 훈련 시간을 22% 줄이고 총 메모리 사용량을 16% 줄이면서도 MMLU 데이터셋의 instruction tuning 및 Oasst1 데이터셋의 fine tuning에서 유사한 정확도를 유지한다. PaCA는 양자화를 지원하여 LLaMA3.1-70B와 같은 대규모 모델의 미세 조정을 가능하게 하고, 시퀀스 길이를 23% 더 길게 훈련할 수 있으며, NVIDIA A100 및 Intel Gaudi2 GPU에서 처리량을 16% 증가시켜 대규모 미세 조정의 효율성과 확장성을 강조한다.

제안된 모든 알고리즘은 기존의 훈련 코드에 손쉽게 통합할 수 있는 PyTorch 라이브러리로 구현되었다. 이러한 알고리즘은 제한된 자원으로 대규모 모델을 훈련하거나, 긴 시퀀스 데이터에서 학습하거나, 훈련 처리량을 증가시키는 다양한 목표에 적용할 수 있다. 또한, 각 방법은 상호 독립적이기 때문에 결합하여 더욱 효율성을 높일 수 있다. 예를 들어, DropBP와 PaCA를 동시에 적용하여 훈련 속도를 극대화한 결과, 훈련 시간이 56% 감소하고 메모리 사용량이 51% 감소하는 성과를 얻었다.