Table of Contents

Class LoRAConfiguration

Namespace
AiDotNet.Models.Options
Assembly
AiDotNet.dll

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

int

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

string

Dropout

Gets or sets the LoRA dropout rate.

public double Dropout { get; set; }

Property Value

double

QuantizationBits

Gets or sets the quantization bits when UseQuantization is true.

public int QuantizationBits { get; set; }

Property Value

int

Rank

Gets or sets the LoRA rank (r).

public int Rank { get; set; }

Property Value

int

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; }

Property Value

bool