# LoRA Configuration classes for the pipeline LoRA feature. ## LoRAFeatureConfig - *class* qairt.experimental.pipeline.torch.llm.lora.configs.LoRAFeatureConfig(*\**, *adapters: dict[str, [qairt.experimental.pipeline.torch.llm.lora.configs.LoRAAdapterConfig](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-pipeline-lora.html#qairt.experimental.pipeline.torch.llm.lora.configs.LoRAAdapterConfig)] = None*, *use\_cases: dict[str, [qairt.experimental.pipeline.torch.llm.lora.configs.LoRAUseCaseConfig](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-pipeline-lora.html#qairt.experimental.pipeline.torch.llm.lora.configs.LoRAUseCaseConfig)] = None*, *quant\_updatable\_mode: Literal['adapter\_only', 'all', 'none'] = 'adapter\_only'*) - Bases: `BaseModel` Top-level LoRA feature configuration for the pipeline. - *field* adapters*: dict[str, [LoRAAdapterConfig](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-pipeline-lora.html#qairt.experimental.pipeline.torch.llm.lora.configs.LoRAAdapterConfig)]* *[Optional]* - - Validated by - - `_check_use_case_adapter_refs` - model\_computed\_fields*: ClassVar[dict[str, ComputedFieldInfo]]* *= {}* - A dictionary of computed field names and their corresponding ComputedFieldInfo objects. - model\_config*: ClassVar[ConfigDict]* *= {}* - Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - model\_fields*: ClassVar[dict[str, FieldInfo]]* *= {'adapters': FieldInfo(annotation=dict[str, LoRAAdapterConfig], required=False, default\_factory=dict), 'quant\_updatable\_mode': FieldInfo(annotation=Literal['adapter\_only', 'all', 'none'], required=False, default='adapter\_only'), 'use\_cases': FieldInfo(annotation=dict[str, LoRAUseCaseConfig], required=False, default\_factory=dict)}* - Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo]. This replaces Model.__fields__ from Pydantic V1. - *field* quant\_updatable\_mode*: Literal['adapter\_only', 'all', 'none']* *= 'adapter\_only'* - - Validated by - - `_check_use_case_adapter_refs` - *field* use\_cases*: dict[str, [LoRAUseCaseConfig](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-pipeline-lora.html#qairt.experimental.pipeline.torch.llm.lora.configs.LoRAUseCaseConfig)]* *[Optional]* - - Validated by - - `_check_use_case_adapter_refs` ## LoRAAdapterConfig - *class* qairt.experimental.pipeline.torch.llm.lora.configs.LoRAAdapterConfig(*\**, *path: Path*) - Bases: `BaseModel` Configuration for a single LoRA adapter. - model\_computed\_fields*: ClassVar[dict[str, ComputedFieldInfo]]* *= {}* - A dictionary of computed field names and their corresponding ComputedFieldInfo objects. - model\_config*: ClassVar[ConfigDict]* *= {}* - Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - model\_fields*: ClassVar[dict[str, FieldInfo]]* *= {'path': FieldInfo(annotation=Path, required=True, metadata=[PathType(path\_type='dir')])}* - Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo]. This replaces Model.__fields__ from Pydantic V1. - *field* path*: DirectoryPath* *[Required]* - - Constraints - - **path\_type** = dir ## LoRAUseCaseConfig - *class* qairt.experimental.pipeline.torch.llm.lora.configs.LoRAUseCaseConfig(*\**, *adapters: list[str]*, *calibration\_dataset: str*, *calibration\_dataset\_path: Optional[str] = None*, *lora\_scaling: list[float]*) - Bases: `BaseModel` Configuration for a LoRA use case (adapter subset + calibration). - *field* adapters*: list[str]* *[Required]* - - Validated by - - `_check_scaling_length` - *field* calibration\_dataset*: str* *[Required]* - - Validated by - - `_check_scaling_length` - *field* calibration\_dataset\_path*: Optional[str]* *= None* - - Validated by - - `_check_scaling_length` - *field* lora\_scaling*: list[float]* *[Required]* - - Validated by - - `_check_scaling_length` - model\_computed\_fields*: ClassVar[dict[str, ComputedFieldInfo]]* *= {}* - A dictionary of computed field names and their corresponding ComputedFieldInfo objects. - model\_config*: ClassVar[ConfigDict]* *= {}* - Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. - model\_fields*: ClassVar[dict[str, FieldInfo]]* *= {'adapters': FieldInfo(annotation=list[str], required=True), 'calibration\_dataset': FieldInfo(annotation=str, required=True), 'calibration\_dataset\_path': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'lora\_scaling': FieldInfo(annotation=list[float], required=True)}* - Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo]. This replaces Model.__fields__ from Pydantic V1. ## UseCaseRunConfig - *class* qairt.modules.lora.lora\_config.UseCaseRunConfig(*\*args: Any*, *\*\*kwargs: Any*) - Bases: `AISWBaseModel` Defines the configuration for a specific use case involving one or more LoRA adapters. - adapters*: List[[AdapterRunConfig](https://docs.qualcomm.com/doc/80-87189-2/topic/qairt-gen-ai-modules-lora.html#qairt.modules.lora.lora_config.AdapterRunConfig)]* - A list of LoRA adapter configurations to be used in this use case. Each adapter is defined by its own AdapterRunConfig, specifying parameters such as adapter name and scaling factor. - use\_case\_name*: str* - A unique identifier for the use case, representing a single adapter or a group of adapters. ## AdapterRunConfig - *class* qairt.modules.lora.lora\_config.AdapterRunConfig(*\*args: Any*, *\*\*kwargs: Any*) - Bases: `AISWBaseModel` Defines the configuration parameters for executing a LoRA (Low-Rank Adaptation) model. This configuration is used to control how the LoRA adapter is applied during model inference. - adapter\_name*: str* - The name or identifier of the LoRA adapter to be used during execution. - alpha*: float* *= 1.0* - A scaling factor applied to the LoRA weights. Last Published: Aug 26, 2026 [Previous Topic run\_evaluation()](https://docs.qualcomm.com/bundle/publicresource/80-87189-2/topics/qairt-pipeline-generation.md)