dragon_lora: LoRA settings

View source: R/config.R

dragon_loraR Documentation

LoRA settings

Description

LoRA settings

Usage

dragon_lora(r = 16, alpha = 32, dropout = 0.05, target_modules = "auto")

Arguments

r

Rank of the adapter matrices. Higher learns more, costs more memory.

alpha

Scaling factor. A common rule is alpha = 2 * r.

dropout

Dropout applied to the adapter input.

target_modules

"auto" adapts every linear layer except the output head (peft's "all-linear"). Or a character vector of module names such as c("q_proj", "v_proj").

Value

A dragon_lora object.

Examples

dragon_lora(r = 8, alpha = 16)

dragonfarm documentation built on Oct. 12, 2026, 5:07 p.m.