LoRA & QLoRA Fine-Tuning Recipes

•
39k
•

Configures production-grade LoRA and QLoRA supervised fine-tuning recipes with optimal rank, alpha, learning rate, and target module hyperparameters.

Provides reference hyperparameters, target module configurations, and best practices for LoRA and QLoRA supervised fine-tuning (SFT) based on current empirical research. It standardizes adapter sizing (rank and alpha scaling), module targeting across attention and MLP layers, precision handling (BF16 vs. FP16), and framework configurations for Unsloth, TRL, and PEFT to eliminate common training failure modes like loss spikes and overfitting.

主な機能

01Standardizes all-linear module targeting across attention and essential MLP layers
02Recommends validated learning rates and batch size thresholds for stable convergence
03Prevents divergence and OOM errors from incorrect dtypes or transient memory spikes
0439,277 GitHub stars
05Calculates optimal LoRA rank and derived alpha (alpha = 2 * r) by task scale
06Provides verified Unsloth fast-path configs and seamless TRL/PEFT mappings

ユースケース

01Evaluating trade-offs between standard LoRA, 4-bit QLoRA, and full fine-tuning based on hardware VRAM
02Auditing existing fine-tuning training scripts to resolve loss divergence or memorization issues
03Configuring PEFT and TRL adapter hyperparameters before launching an SFT training run