R&D/AI

Fine Tuning

sunshout 2023. 11. 14. 13:53

Model 의 Fine Tuning 방법은 크게 두가지 종류가 있다.

Full parameter fine-tuning

  • pre-trained model 의 모든  layer 의 parameter에 대해서 fune-tuning 을 하는 방법
  • GPU resource를 많이 사용하며, 시간이 엄청 오래 걸리다는 단점이 있음

PEFT (Parameter Efficient Fine Tuning)

  • 최소 비용과 리소스로 fune tuning 을 하는 방법
  • LoRA (Low Rank Adaptation)
  • QLoRA (Quantized Low Rank Adaptation) - quantized 8-bit and 4-bit weights 모델이 로드됨
  • 일반적으로 LoRA를 사용하며, GPU 리소스가 부족하다면 QLoRA를 사용하면 됨