qbcompiler.configs.models.LoadScaleConfig Class Reference

qbcompiler.configs.models.LoadScaleConfig Class Reference#

Mobilint SDK qb Compiler: qbcompiler.configs.models.LoadScaleConfig Class Reference
Mobilint SDK qb Compiler v1.2
MCS002-KR
qbcompiler.configs.models.LoadScaleConfig Class Reference
Inheritance diagram for qbcompiler.configs.models.LoadScaleConfig:

Public Member Functions

"LoadScaleConfig" with_updates (self, **kwargs)
 Return a copy with updated fields.

Static Public Attributes

 model_config
bool apply
Any entries

Detailed Description

@brief QAT activation scale loading configuration

@details Loads pre-trained activation scales from safetensors files and applies them
to specified layers before scale/zeropoint computation.
NOTE: entries is stored as raw JSON (type: list) because the generator does
not support list[CustomStruct]. The schema records the field shape; parsing
is done manually in applyQATLoadScaleQuantType / applyQATLoadScales.

@param apply bool. If true, load and apply QAT scales from safetensors files
@param entries List. List of file entries. Each entry is a dict:

{ path: str, scales: [ { key: str, layers: [str] } ] } path: safetensors file path; key: tensor name in the file; layers: layer names whose activation scale will be overridden.

Definition at line 1474 of file models.py.

Member Function Documentation

◆ with_updates()

"LoadScaleConfig" qbcompiler.configs.models.LoadScaleConfig.with_updates ( self,
** kwargs )

Return a copy with updated fields.

Definition at line 1506 of file models.py.

Member Data Documentation

◆ model_config

qbcompiler.configs.models.LoadScaleConfig.model_config
static
Initial value:
= ConfigDict(
populate_by_name=True,
extra="forbid",
)

Definition at line 1492 of file models.py.

◆ apply

bool qbcompiler.configs.models.LoadScaleConfig.apply
static
Initial value:
= Field(
default=False,
description="If true, load and apply QAT scales from safetensors files",
)

Definition at line 1497 of file models.py.

◆ entries

Any qbcompiler.configs.models.LoadScaleConfig.entries
static
Initial value:
= Field(
default=[],
description="List of file entries. Each entry is a dict: { path: str, scales: [ { key: str, layers: [str] } ] } path: safetensors file path; key: tensor name in the file; layers: layer names whose activation scale will be overridden.",
)

Definition at line 1501 of file models.py.


The documentation for this class was generated from the following file: