LoRAยถ

Summaryยถ

LoRA (Low-Rank Adaptation) is a technique used for fine-tuning large language models (LLMs) in a parameter-efficient way. It modifies the fine-tuning process by freezing the original model weights and applying changes to a separate set of weights, which are then added to the original parameters. This approach significantly reduces the memory and computational requirements for fine-tuning, making it possible for smaller organizations and individual developers to train specialized LLMs over their data.

Key Conceptsยถ

  • LoRA์˜ ์ •์˜ : LoRA๋Š” ๋Œ€ํ˜• ์–ธ์–ด ๋ชจ๋ธ์„ ํšจ์œจ์ ์œผ๋กœ fine-tuningํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ๋ฒ•์œผ๋กœ, ๋ชจ๋ธ์˜ ์›๋ž˜ ๊ฐ€์ค‘์น˜๋ฅผ ๊ณ ์ •ํ•˜๊ณ  ๋ณ„๋„์˜ ๊ฐ€์ค‘์น˜๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ fine-tuning์„ ์ˆ˜ํ–‰ํ•œ๋‹ค.

  • LoRA์˜ ์žฅ์  : LoRA๋Š” fine-tuning ๊ณผ์ •์—์„œ ํ•„์š”ํ•œ ๋ฉ”๋ชจ๋ฆฌ์™€ ๊ณ„์‚ฐ ์ž์›์„ ํฌ๊ฒŒ ์ค„์—ฌ์ฃผ์–ด, ์†Œ๊ทœ๋ชจ ์กฐ์ง์ด๋‚˜ ๊ฐœ์ธ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋Œ€ํ˜• ์–ธ์–ด ๋ชจ๋ธ์„ ํŠน์ • ๋„๋ฉ”์ธ์— ๋งž๊ฒŒ fine-tuningํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค.

  • LoRA์˜ ์ ์šฉ : LoRA๋Š” ๋‹ค์–‘ํ•œ ๋Œ€ํ˜• ์–ธ์–ด ๋ชจ๋ธ์— ์ ์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ํŠนํžˆ ๋‹ค์ค‘ ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์œ„ํ•ด fine-tuned ๋ชจ๋ธ์„ ํ•„์š”๋กœ ํ•  ๋•Œ ์œ ์šฉํ•˜๋‹ค.

Referencesยถ

URL ์ด๋ฆ„

URL

Easily Train a Specialized LLM: PEFT, LoRA, QLoRA, LLaMA

https://cameronrwolfe.substack.com/p/easily-train-a-specialized-llm-peft

Mastering Low-Rank Adaptation (LoRA): Enhancing Large Language Models for Efficient Adaptation

https://www.datacamp.com/tutorial/mastering-low-rank-adaptation-lora-enhancing-large-language-models-for-efficient-adaptation

Understanding LLM Fine Tuning with LoRA (Low-Rank Adaptation)

https://www.run.ai/guides/generative-ai/lora-fine-tuning

A beginners guide to fine tuning LLM using LoRA

https://zohaib.me/a-beginners-guide-to-fine-tuning-llm-using-lora/

What is low-rank adaptation (LoRA)?

https://bdtechtalks.com/2023/05/22/what-is-lora/