nip.language_model_server.types.LmLoraAdapterConfig#
- class nip.language_model_server.types.LmLoraAdapterConfig(*, r: int, lora_alpha: int, lora_dropout: float)[source]#
Configuration for a LoRA adapter to be applied on top of a base model.
See Yu et al. [YYK+23] for the original LoRA paper.
Attributes
__fields_set__
model_computed_fields
model_config
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extra
Get extra fields set during validation.
model_fields
model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
r
The rank of the LoRA adapter, controlling the number of trainable parameters.
lora_alpha
The scaling factor for the LoRA adapter, for the strength of the adapter.
lora_dropout
The dropout rate for the LoRA layers.
Methods