已合并
QLoRA特性支持 #2139
Slightwind创建于 2025年1月8日
QLoRA特性支持 #2139
已合并
Slightwind创建于 2025年1月8日
refs/pull/2139/head合入到master
Slightwind
Slightwind
2025年1月8日

特性介绍

1、权重转换过程中新增'--qlora-nf4'选项,开启时启用权重量化,将浮点的hf权重转换到量化后到mcore权重;
2、在lora和cclora的forward和backward中增加对权重的检测,如果是量化权重,那么反量化后再进行矩阵乘。

验证报告

llama2-70b 开启--lora-fusion

平均绝对误差:
输入图片说明
平均相对误差:
输入图片说明

llama2-70b 关闭--lora-fusion

平均绝对误差:
输入图片说明
平均相对误差:
输入图片说明

Mixtral-8x7B

NPU: LoRA vs QLoRA 平均相对误差:
Mixtral
GPU: LoRA vs QLoRA 平均相对误差:
输入图片说明

likedislike
Pull Request已成功合入, 合并人@
(感谢 Slightwind 的贡献)
AtlasAccountAtlasAccount成员
2025年1月9日 移除了   ci-pipeline-failed 标签
AtlasAccountAtlasAccount成员
2025年1月9日 移除了   ci-pipeline-running 标签
AtlasAccountAtlasAccount成员
2025年1月9日 添加了   ci-pipeline-passed 标签
SlightwindSlightwind
2025年1月10日 更新了说明
SlightwindSlightwind
2025年1月10日 推送了代码
此处折叠了73条消息 查看更多
AtlasAccountAtlasAccount成员
2025年1月10日 添加了   ci-pipeline-running 标签
AtlasAccountAtlasAccount成员
2025年1月10日 移除了   ci-pipeline-failed 标签
AtlasAccountAtlasAccount成员
2025年1月10日 移除了   ci-pipeline-failed 标签
AtlasAccountAtlasAccount成员
2025年1月10日 移除了   ci-pipeline-running 标签
AtlasAccountAtlasAccount成员
2025年1月10日 移除了   ci-pipeline-running 标签