> Documentation Index
> Fetch the complete documentation index at: https://docs.mobilint.com/compiler/en/v0.12.0.0/llms.txt
> Use this file to discover all available pages before exploring further.
> Append index.md to any page URL for its Markdown.
> All Mobilint manuals: https://docs.mobilint.com/llms.txt

# qubee.configs.search\_weight\_scale\_config

## SearchWeightScaleConfig

```python
class SearchWeightScaleConfig(ConfigABC)
```

Configuration for searching weight scale.

### Attributes

| Name | Description |
| --- | --- |
| [`optional`](<#searchweightscaleconfig-optional>) |  |
| [`DEFAULTS`](<#searchweightscaleconfig-defaults>) |  |

#### optional

```python
optional = False
```

#### DEFAULTS

```python
DEFAULTS = {
    "apply": False,
    "query": False,
    "key": False,
    "value": False,
    "out": False,
    "ffn": False,
}
```

### Methods

| Name | Description |
| --- | --- |
| [`__init__`](<#searchweightscaleconfig-init>) | Initialize the [SearchWeightScaleConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.search_weight_scale_config/#searchweightscaleconfig>). |
| [`default_config`](<#searchweightscaleconfig-default-config>) |  |
| [`from_dict`](<#searchweightscaleconfig-from-dict>) | Create [SearchWeightScaleConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.search_weight_scale_config/#searchweightscaleconfig>) from dictionary (JSON structure) |
| [`to_dict`](<#searchweightscaleconfig-to-dict>) |  |

#### \_\_init\_\_

```python
def __init__(
    self,
    apply: bool,
    query: bool,
    key: bool,
    value: bool,
    out: bool,
    ffn: bool,
    optional: bool = optional,
)
```

Initialize the [SearchWeightScaleConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.search_weight_scale_config/#searchweightscaleconfig>).

**Parameters**

- `apply` — bool. Whether to apply weight scale search.
- `query` — bool. Apply to query layer.
- `key` — bool. Apply to key layer.
- `value` — bool. Apply to value layer.
- `out` — bool. Apply to output layer.
- `ffn` — bool. Apply to FFN layer.
- `optional` — bool. Indicates whether this config is optional. Use the default value defined as a class variable.

#### default\_config

```python
def default_config(cls)
```

#### from\_dict

```python
def from_dict(cls, config_dict: dict)
```

Create [SearchWeightScaleConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.search_weight_scale_config/#searchweightscaleconfig>) from dictionary (JSON structure)

#### to\_dict

```python
def to_dict(self)
```

## Functions

| Name | Description |
| --- | --- |
| [`get_search_weight_scale_config`](<#get-search-weight-scale-config>) | Create [SearchWeightScaleConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.search_weight_scale_config/#searchweightscaleconfig>) with partial parameters merged with defaults. |

### get\_search\_weight\_scale\_config

```python
def get_search_weight_scale_config(**kwargs) -> SearchWeightScaleConfig
```

Create [SearchWeightScaleConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.search_weight_scale_config/#searchweightscaleconfig>) with partial parameters merged with defaults.
