Settings
CLASS - Settings(
- training_settings:
TrainingSettings
= |factory|- global_quantization_settings:
BaseQATQuantizationSettings
= |factory|- deployment_settings:
Optional[BaseDeploymentSettings]
= None- layer_settings:
Optional[Dict[str, LayerSettings]]
= |factory|)
This Dataclass holds all the information necessary to run CLIKA Compression.
Class Variables
- training_settings (
TrainingSettings
) - Training Settings - global_quantization_settings (
BaseQATQuantizationSettings
) - Quantization Settings that are applied Globally - deployment_settings (
Optional[BaseDeploymentSettings]
) - Deployment Settings that are applied Globally. Must be set. - layer_settings (
Optional[Dict[str, LayerSettings]]
) - Settings that are applied for specific Layers.
Methods
get_layer_settings
get_layer_settings(
- name:
str
) ‑>
Optional[LayerSettings]
Get the LayerSettings for a given Name.
Parameters:
- name (
str
) - Name of Layer
Returns:
Optional[LayerSettings]
: The Layer Settings for the given Layer with the name argument
set_layer_settings
set_layer_settings(
- name:
str
- settings:
LayerSettings
) ‑>
None
Set LayerSettings for a given Layer name.
Parameters:
- name (
str
) - Name of Layer - settings (
LayerSettings
) - Settings of the Layer.
set_quantization_settings_for_layer
set_quantization_settings_for_layer(
- name:
str
- settings:
BaseQuantizationSettings
) ‑>
None
Set Quantization Settings for a specific Layer. This is basically a shortcut instead of putting Quantization Settings in LayerSettings and then setting it for a specific layer.
Parameters:
- name (
str
) - name of the Layer, can be derived either from the pytorch model standard layer name, or from the block name on the model architecture CLIKA Graph that is generated after training as "model_post_preprocessing.png" inside the outputs folder - settings (
BaseQuantizationSettings
) - The Quantization Settings for a specific Layer.