Skip to navigation

nemo_automodel.shared.peft_config

View as Markdown

PEFT configuration without adapter or distributed runtime dependencies.

Module Contents

Classes

NameDescription
PeftConfigDeclarative adapter settings shared by execution and checkpoint boundaries.

API

class nemo_automodel.shared.peft_config.PeftConfig(
target_modules: list[str] | str | None = list(),
exclude_modules: list[str] | str | None = list(),
match_all_linear: bool = False,
dim: int = 8,
alpha: int = 32,
use_dora: bool = False,
dropout: float = 0.0,
dropout_position: typing.Literal['pre', 'post'] = 'post',
lora_A_init: str = 'xavier',
lora_dtype: torch.dtype | str | None = None,
use_memory_efficient_lora: bool = True,
use_triton: bool = False,
moe_rank_scaling: bool = False,
expert_weight_format: typing.Literal['unquantized', 'mxfp4'] = 'unquantized'
)
Dataclass

Declarative adapter settings shared by execution and checkpoint boundaries.

alpha
int = 32
dim
int = 8
dropout
float = 0.0
dropout_position
Literal['pre', 'post'] = 'post'
exclude_modules
list[str] | str | None = field(default_factory=list)
expert_weight_format
Literal['unquantized', 'mxfp4'] = 'unquantized'
lora_A_init
str = 'xavier'
lora_dtype
dtype | str | None = None
match_all_linear
bool = False
moe_rank_scaling
bool = False
target_modules
list[str] | str | None = field(default_factory=list)
use_dora
bool = False
use_memory_efficient_lora
bool = True
use_triton
bool = False