data
TunerModelStatus
TunerModelStatus(base_model_type: str, adapter_model_type: str, peft_types: dict[str, str], trainable_params: int, total_params: int, num_adapter_layers: int, enabled: bool | Irregular, active_adapters: list[str] | Irregular, merged_adapters: list[str] | Irregular, requires_grad: dict[str, GradState], available_adapters: list[str], devices: dict[str, list[str]])The state of the adapters of a whole model, folded from its layers.
Attributes
base_ model_ typestrThe class name of the model that was adapted (
"other" for a
model not wrapped in a PeftModel).adapter_ model_ typestrThe class name of the tuner (
"LoraModel"), "None" when unwrapped.peft_ typesdictEach adapter's method by name, e.g.
{"default": "LORA"}.trainable_ params, total_ paramsintParameter element counts, each shared parameter once.
num_ adapter_ layersintHow many adapter layers the model holds.
enabledbool or irregularWhether every layer applies adapters.
active_ adapterslist of str or "irregular"The adapters in use, if every layer agrees.
merged_ adapterslist of str or "irregular"The adapters merged into the base, unless one is merged on a layer
and not on another that holds it.
requires_ graddictPer adapter, whether its parameters train in every layer (
True),
in none (False) or in some ("irregular").available_ adapterslist of strEvery adapter any layer holds, sorted.
devicesdictPer adapter, the device types its parameters are on, sorted.
Used by 2
Class methods
1of(layers: Sequence[TunerLayerStatus], base_model_type: str, adapter_model_type: str, peft_types: dict[str, str], parameter_counts: tuple[int, int])The model's status from its layers (at least one) and what the wrapper knows.