For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
LoRATargetModule
LoRATargetModule
class max.pipelines.lora.LoRATargetModule(path, projections, stacked=False)
Bases: object
One wrappable projection module and the PEFT projections it fuses.
path is the module’s location within a decoder layer (such as
self_attn.qkv); projections are the PEFT projection names it covers,
in fused order – ("q_proj", "k_proj", "v_proj") for a fused qkv, or a
single name like ("o_proj",). A per-arch tuple of these is the single
source of truth that drives adapter wrapping, base-weight fusion, and the
slot->PEFT-key map, so a new model declares its targets rather than
hand-writing three matching transforms.
stacked marks a wrapped module that stores one pre-fused base weight (a
stacked=True
QKVLinear), so its base
q/k/v weights are concatenated into that single weight. The default
(False) is a name-transparent module that keeps separate per-projection
children, whose base weights stay under their native checkpoint names.
Either way the adapter is fused into one slot; only the base layout
differs.
path
path: str
projections
stacked
stacked: bool = False