AI・機械学習
上級
DoRA ウェイト分解ファインチューニング(ドーラウェイトブンカイファインチューニング)
LoRAをmagnitude(大きさ)とdirection(方向)に分解して学習するPEFT手法。magnitudeベクトルは学習可能、direction成分にLoRAを適用。Liu et al. 2024提案。フルファインチューニングの学習パターンをLoRAより忠実に模倣し、精度を向上させる。
0 回閲覧
0 いいね
2026/6/6 更新
関連タグ
DoRA
PEFT
ウェイト分解
LoRA改良
magnitude
direction
LLMファインチューニング
DoRA ウェイト分解ファインチューニング
DoRA(Weight-Decomposed Low-Rank Adaptation)は、2024年にLiu et al.(NVIDIA / UT Austin)が提案したLoRAの改良PEFT手法。フルファインチューニングとLoRAの「学習パターンの違い」を分析し、その差を埋めることを目指す。
フルFTとLoRAの学習パターンの違い
- Full FT: magnitudeとdirectionを独立してかつバランスよく更新
- LoRA: magnitudeとdirectionを結合して更新(非効率なパターン)
この差が精度差を生む原因と特定した。
DoRAのウェイト分解
W = m * (V / ||V||) = magnitude * direction
学習時:
- m: スカラーベクトル(magnitude)→ 直接学習
- V: 方向行列(direction)→ LoRAで更新: ΔV = BA
実験結果
| タスク | LoRA | DoRA | Full FT |
|---|---|---|---|
| CommonSense | 74.0 | 76.1 | 78.5 |
| Math | 51.2 | 54.3 | 56.1 |
| VQA | 82.1 | 83.0 | 83.8 |
HuggingFace PEFTでの実装
from peft import LoraConfig, get_peft_model
lora_config = LoraConfig(
r=16,
use_dora=True, # DoRA有効化
target_modules=["q_proj", "v_proj"],
)
model = get_peft_model(base_model, lora_config)
まとめ
DoRAは「LoRAと同パラメータ数でより高い精度を達成する」実用的な改良。HuggingFace PEFTで一行設定変更で適用できるため、LoRAユーザーの第一候補となっている。