Class LoRAConfiguration
LoRA configuration for parameter-efficient fine-tuning.
public class LoRAConfiguration
- Inheritance
-
LoRAConfiguration
- Inherited Members
Properties
Alpha
Gets or sets the LoRA alpha scaling factor.
public int Alpha { get; set; }
Property Value
Remarks
Default: 32 (alpha/rank = 2 is common)
BiasMode
Gets or sets whether to use bias terms in LoRA layers.
public string BiasMode { get; set; }
Property Value
Dropout
Gets or sets the LoRA dropout rate.
public double Dropout { get; set; }
Property Value
QuantizationBits
Gets or sets the quantization bits when UseQuantization is true.
public int QuantizationBits { get; set; }
Property Value
Rank
Gets or sets the LoRA rank (r).
public int Rank { get; set; }
Property Value
Remarks
Lower rank = fewer parameters but less expressiveness.
Default: 16 (good balance)
TargetModules
Gets or sets which modules to apply LoRA to.
public string[] TargetModules { get; set; }
Property Value
- string[]
Remarks
Common choices: ["q_proj", "v_proj"] for attention-only, or ["q_proj", "k_proj", "v_proj", "o_proj"] for full attention.
UseQuantization
Gets or sets whether to use quantization (QLoRA).
public bool UseQuantization { get; set; }