Beyond LoRA: Can you beat the most popular fine-tuning technique? Hugging Face's PEFT library challenges the dominance of LoRA in parameter-efficient fine-tuning, revealing that while LoRA accounts for over 98% of PEFT usage on the Hugging Face Hub, alternative methods may offer better performance for specific tasks. The analysis suggests that the popularity of LoRA may be due to its early adoption rather than superior effectiveness. Viewer • Updated • 615k • 694 • 23 Beyond LoRA: Can you beat the most popular fine-tuning technique? Update on GitHub https://github.com/huggingface/blog/blob/main/peft-beyond-lora.md When you plan to fine-tune a model in a parameter-efficient way, think beyond LoRA If you want to fine-tune an open model on your own data, you are probably interested in so-called parameter-efficient fine-tuning, in short PEFT . This term describes techniques that significantly reduce the memory requirement to fine-tune a model. Although there are dozens of these techniques, almost everyone chooses one called “LoRA”. In this blog post, we explore whether LoRA is really the best choice, what tools are available to make an informed decision, and how you can benefit from extending your horizon beyond LoRA. What is PEFT and when do you need it There are countless open models available, but they often aren't quite good enough for your use case. Prompting may help, but it usually isn't enough. Rather than training a new model from scratch, you should consider fine-tuning an existing one. Fine-tuning, however, is memory-hungry: you generally need enough memory to fit the whole model several times over. Quantization reduces a model's memory footprint, but quantized models can't be fine-tuned directly. So a set of techniques emerged to cut the memory needed for fine-tuning, called "parameter-efficient fine-tuning", or PEFT. With PEFT, you can fine-tune a model using only a fraction of that memory and even fine-tune quantized models. It offers other advantages, such as tiny checkpoint sizes, greater resistance to catastrophic forgetting, and the ability to serve multiple fine-tunes from the same base model. At Hugging Face, we develop the PEFT library https://github.com/huggingface/peft , which implements many PEFT techniques behind a unified API and integrates well with the ecosystem, for example and https://huggingface.co/docs/transformers/main/en/peft Transformers . It also supports https://huggingface.co/docs/diffusers/main/en/api/loaders/peft Diffusers multiple quantization methods https://huggingface.co/docs/peft/developer guides/quantization , enabling further accessibility in parameter-efficient fine-tuning. PEFT provides a good starting point, whether you want to fine-tune on your own data or you're researching a new PEFT method. LoRA: The queen of fine-tuning techniques 👑 One parameter-efficient fine-tuning technique that emerged early and proved to be quite effective is called “Low Rank Adaptation”, or short “LoRA” https://huggingface.co/papers/2106.09685 . It works by adding a handful of parameters on top of the base model, freezing the base model weights, and only training those few parameters. Among all PEFT techniques, LoRA is by far the most popular. Here are a few estimates: - Of a sample of 20,834 model cards on Hugging Face Hub https://huggingface.co/datasets/librarian-bots/model cards with metadata that mention exactly one PEFT technique, 20,509 mention LoRA 98.4% . - We checked which PEFT techniques are popular for image generation on an external site, too. Using a sample of 10,000 checkpoints, we found 7,111 to be LoRAs. The other identified PEFT techniques are LoCon 363 and DoRA 11, arguably a LoRA variant . That means 95.0% of PEFT checkpoints are LoRAs. - Searching for the code snippet from peft import