[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
LoRA(Low-Rank Adaptation of Large Language
Models,大型语言模型的低秩适应)是微软研究员提出的一种新颖技术,旨在解决微调大型语言模型的问题。具有数十亿参数的强大模型,如GPT-3,要对其进行微调以适应特定任务或领域的成本非常高。LoRA提议冻结预训练模型的权重,并在每个Transformer块中注入可训练层(称为秩分解矩阵)。这大大减少了可训练参数的数量和GPU内存需求,因为大部分模型权重不需要计算梯度。研究人员发现,通过专注于大型语言模型的Transformer注意力块,LoRA的微调质量与完整模型的微调相当,同时速度更快,计算需求更低。
尽管LoRA最初是为大型语言模型提出的,但这种技术也可以应用在其他地方。在Stable
Diffusion微调的情况下,LoRA可以应用于与描述它们的提示相关的图像表示之间的交叉注意力层。LoRA微调的优点包括:
* 训练速度更快
* 计算需求更低
* 训练权重更小,因为原始模型被冻结,我们注入新的可训练层,可以将新层的权重保存为一个约3MB大小的文件,比UNet模型的原始大小小了近一千倍。
LoRA可以与其他技术结合使用,例如Dreambooth,使训练更快、只需少量图像即可实现目标学习,还可以调整文本编码器以获得更高的主题保真度。总之,LoRA为微调大型语言模型提供了一种快速、低成本的解决方案,使模型能够更容易地适应新的领域或数据集。