Python module
lora_config
MAX LoRA configuration.
LoRAConfig
class max.pipelines.lib.lora_config.LoRAConfig(*, config_file=None, section_name=None, enable_lora=False, lora_paths=<factory>, max_lora_rank=16, max_num_loras=1)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
-
Parameters:
enable_lora
enable_lora: bool
Enables LoRA on the server
help()
static help()
lora_paths
List of statically defined LoRA paths
max_lora_rank
max_lora_rank: int
Maximum rank of all possible LoRAs
max_num_loras
max_num_loras: int
The maximum number of active LoRAs in a batch.
This controls how many LoRA adapters can be active simultaneously during inference. Lower values reduce memory usage but limit concurrent adapter usage.
model_config
model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_post_init()
model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
-
Parameters:
-
- self (BaseModel) – The BaseModel instance.
- context (Any) – The context.
-
Return type:
-
None
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!