Skip to main content
Version: 0.2

Settings

CLASS - Settings(

)

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[strLayerSettings]]) - Settings that are applied for specific Layers.

Methods

get_layer_settings

get_layer_settings(

) ‑> Optional[LayerSettings]

Get the LayerSettings for a given Name.

Parameters:

  • name (str) - Name of Layer

Returns:

set_layer_settings

set_layer_settings(

) ‑> None

Set LayerSettings for a given Layer name.

Parameters:

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.