Skip to main content
QUICK REVIEW

[논문 리뷰] An empirical study of LLaMA3 quantization: from LLMs to MLLMs

Wei Huang, Xingyu Zheng|arXiv (Cornell University)|2024. 04. 22.
Advanced Wireless Communication TechniquesEngineering인용 수 11
한 줄 요약

본 논문은 Meta’s LLaMA3 모델에서 포스트 트레이닝 양자화(PTQ)와 LoRA-미세조정(LoRA-FT)을 사용하여 저비트 양자화를 실험적으로 평가하고, 초저 비트에서 성능 저하가 무시할 수 없으며, LLaMA3-70B가 LLaMA3-8B보다 테스트 데이터셋 전반에서 더 큰 강건성을 보인다.

ABSTRACT

The LLaMA family, a collection of foundation language models ranging from 7B to 65B parameters, has become one of the most powerful open-source large language models (LLMs) and the popular LLM backbone of multi-modal large language models (MLLMs), widely used in computer vision and natural language understanding tasks. In particular, LLaMA3 models have recently been released and have achieved impressive performance in various domains with super-large scale pre-training on over 15T tokens of data. Given the wide application of low-bit quantization for LLMs in resource-constrained scenarios, we explore LLaMA3's capabilities when quantized to low bit-width. This exploration can potentially provide new insights and challenges for the low-bit quantization of LLaMA3 and other future LLMs, especially in addressing performance degradation issues that suffer in LLM compression. Specifically, we comprehensively evaluate the 10 existing post-training quantization and LoRA fine-tuning (LoRA-FT) methods of LLaMA3 on 1-8 bits and various datasets to reveal the low-bit quantization performance of LLaMA3. To uncover the capabilities of low-bit quantized MLLM, we assessed the performance of the LLaMA3-based LLaVA-Next-8B model under 2-4 ultra-low bits with post-training quantization methods. Our experimental results indicate that LLaMA3 still suffers from non-negligible degradation in linguistic and visual contexts, particularly under ultra-low bit widths. This highlights the significant performance gap at low bit-width that needs to be addressed in future developments. We expect that this empirical study will prove valuable in advancing future models, driving LLMs and MLLMs to achieve higher accuracy at lower bit to enhance practicality. Our project is released on https://github.com/Macaronlin/LLaMA3-Quantization , and quantized models are released at https://huggingface.co/Efficient-ML .

연구 동기 및 목표

  • LLaMA3 모델(8B 및 70B)이 저비트 양자화에서 어떻게 성능을 발휘하는지 평가한다.
  • 1에서 8비트까지 다양한 PTQ 방법과 LoRA-FT 기법을 평가한다.
  • 모델 규모 간의 정확도 저하 패턴 및 강건성 차이를 식별한다.
  • 향후 LLM 양자화 연구 및 개발을 안내할 실용적 시사점을 제공한다.

제안 방법

  • 여덟 가지 PTQ 방법 및 두 가지 LoRA-FT 방법을 사용하여 LLaMA3-8B와 LLaMA3-70B를 양자화한다.
  • WikiText2, C4, PTB 및 제로샷 태스크 PIQA, Winogrande, ARC-e, ARC-c, Hellaswag에서 PTQ 양자화 모델을 평가한다.
  • LoRA-FT 양자화된 LLaMA3-8B를 MMLU에서 평가하고 제로샷 태스크를 확인한다.
  • 공정성을 위해 방법들 간의 WikiText2 보정(128 토큰, 2048 시퀀스 길이)을 사용한다.
  • 필요한 경우 채널 단위 그룹화(block size 128)을 적용한다.
  • 기본 FP16/32BIT 성능과의 비교 및 perplexity 및 태스크 정확도를 보고한다.

실험 결과

연구 질문

  • RQ1다양한 PTQ 및 LoRA-FT 양자화 방법에서 표준 벤치마크를 통해 LLaMA3-8B의 성능은 어떤가?
  • RQ2동일 방법에 대해 LLaMA3-70B가 LLaMA3-8B에 비해 양자화에 대한 강건성이 더 우수한가?
  • RQ3초저비트 양자화(1-2비트)가 허용 가능한 성능을 내는가, 어떤 방법이 정확도 보존에 가장 우수한가?
  • RQ4LoRA-FT 양자화가 LLaMA3에 대해 신뢰할 수 있는 이점을 제공하는가, 아니면 사전학습 규모가 효과를 제한하는가?
  • RQ5자원 제약 환경에서 양자화된 LLaMA3를 배치하기 위한 실용적 시사점은 무엇인가?

주요 결과

  • 양자화된 LLaMA3-8B 및 -70B가 PTQ 방법 전반에서 초저 비트 폭에서 의미 있는 성능 저하를 경험한다.
  • 초저비트(2비트 및 그 이하) 성능은 8B의 경우 70B보다 크게 나빠질 수 있으며, 특정 초저비트 방법은 성능이 좋지 않다.
  • LoRA-FT 양자화가 LLaMA3-8B의 양자화 오차를 일관되게 보정하지 못하고 비-LoRA-FT 4비트 베이스라인보다 저조할 수 있다.
  • 4비트 LoRA-FT 양자화된 LLaMA3-8B는 일부 4비트 LLaMA1/2 베이스라인보다 우수할 수 있어 newer 모델에서 양자화 역학이 바뀌는 것을 시사한다.
  • 일부 PTQ 방법들(PB-LLM, BiLLM, DB-LLM, QuIP, AWQ, GPTQ)은 강점이 다르게 나타나며, BiLLM과 PB-LLM 같은 초저비트 기법이 1-2비트 성능으로 밀어 올리기도 하지만 전체 정밀도와의 격차를 보편적으로 해소하지는 못한다.
  • SmoothQuant는 일부 구성에 대해 활성화 양자화를 안정시키는 데 도움을 주지만 매우 낮은 비트 폭(예: 4비트)에서는 붕괴된다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.