LLM 가지치기 및 증류: 미니트론 방법론
LLM Pruning and Distillation in Practice: The Minitron Approach
August 21, 2024
저자: Sharath Turuvekere Sreenivas, Saurav Muralidharan, Raviraj Joshi, Marcin Chochowski, Mostofa Patwary, Mohammad Shoeybi, Bryan Catanzaro, Jan Kautz, Pavlo Molchanov
cs.AI
초록
우리는 Llama 3.1 8B 및 Mistral NeMo 12B 모델을 각각 4B 및 8B 매개변수로 압축하는 데 관한 포괄적인 보고서를 제시합니다. 우리는 가지치기(pruning)와 증류(distillation)를 사용하여 두 가지 다른 가지치기 전략을 탐구합니다: (1) 깊이 가지치기 및 (2) 결합된 숨겨진/주의/MLP(폭) 가지치기, 그리고 LM 평가 하네스의 일반적인 벤치마크에서 결과를 평가합니다. 그런 다음 모델은 NeMo Aligner와 함께 정교하게 조정된 버전에서 테스트됩니다. 이 접근 방식은 Llama 3.1 8B로부터 매력적인 4B 모델을 만들어내며 Mistral NeMo 12B로부터 최첨단 Mistral-NeMo-Minitron-8B(MN-Minitron-8B로 간략히 표기) 모델을 만들어냅니다. 우리는 원본 데이터에 액세스할 수 없는 경우, 증류 데이터셋에서 선생 모델을 약간 미세 조정하는 것이 유익하다는 것을 발견했습니다. 우리는 허깅페이스(Hugging Face)에서 우리의 기본 모델 가중치를 허용하는 라이선스로 공개합니다.
English
We present a comprehensive report on compressing the Llama 3.1 8B and Mistral
NeMo 12B models to 4B and 8B parameters, respectively, using pruning and
distillation. We explore two distinct pruning strategies: (1) depth pruning and
(2) joint hidden/attention/MLP (width) pruning, and evaluate the results on
common benchmarks from the LM Evaluation Harness. The models are then aligned
with NeMo Aligner and tested in instruct-tuned versions. This approach produces
a compelling 4B model from Llama 3.1 8B and a state-of-the-art
Mistral-NeMo-Minitron-8B (MN-Minitron-8B for brevity) model from Mistral NeMo
12B. We found that with no access to the original data, it is beneficial to
slightly fine-tune teacher models on the distillation dataset. We open-source
our base model weights on Hugging Face with a permissive license.