深入指南:使用LoRA和QLoRA微调LLMs

Language Models like GPT-4 have become the de facto standard in the NLP industry for building products and applications. These models are capable of performing a plethora of tasks and can easily adapt to new tasks using Prompt Engineering Techniques. But these models also present a massive challenge around training. Massive models like GPT-4 cost millions of dollars to train, hence we use smaller models in production settings. 

像GPT-4这样的语言模型已成为NLP行业构建产品和应用的事实标准。这些模型能够执行大量任务,并且可以通过使用提示工程技术轻松适应新任务。但这些模型在训练方面也带来了巨大的挑战。像GPT-4这样的大型模型训练成本高达数百万美元,因此我们在生产环境中使用较小的模型。 

But smaller models on the other hand cannot generalize to multiple tasks, and we end up having multiple models for multiple tasks of multiple users. This is where PEFT techniques like LoRA come in, these techniques allow you to train large models much more efficiently compared to fully finetuning them. In this blog, we will walk through LoRA, QLoRA, and other popular techniques that emerged specifically from LoRA.

但较小的模型无法对多个任务进行泛化,最终我们不得不为多个用户的多个任务拥有多个模型。这就是像LoRA这样的PEFT技术发挥作用的地方,这些技术使您能够比完全微调模型更高效地训练大型模型。在这篇博客中,我们将介绍LoRA、QLoRA以及其他专门从LoRA中衍生出的流行技术。

What is PEFT Finetuning?

什么是PEFT微调?

PEFT Finetuning is Parameter Efficient Fine Tuning, a set of fine-tuning techniques that allows you to fine-tune and train models much more efficiently than normal training. PEFT techniques usually work by reducing the number of trainable parameters in a neural network. The most famous and in-use PEFT techniques are Prefix Tuning, P-tuning, LoRA, etc. LoRA is perhaps the most used one. LoRA also has many variants like QLoRA and LongLoRA, which have their own applications.

PEFT微调是参数高效微调,一组微调技术,使您能够比正常训练更高效地微调和训练模型。PEFT技术通常通过减少神经网络中的可训练参数数量来工作。最著名和正在使用的PEFT技术包括前缀调优、P调优、LoRA等。LoRA可能是使用最广泛的。LoRA还有许多变体,如QLoRA和LongLoRA,它们各自有自己的应用。

Why use PEFT Finetuning?

为什么使用PEFT微调?

There are many reasons to use PEFT techniques, they have become the go-to way to finetune LLMs and other models. But here are some reasons why even enterprises and large businesses like to use these approaches.

使用 PEFT 技...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2025 iteam. Current version is 2.144.0. UTC+08:00, 2025-06-21 11:08
浙ICP备14020137号-1 $访客地图$