API Reference
This is the reference for all the classes and functions available in ScaleDown. We also have a User Guide that contains technical information and implementation details about the algorithms available as a part of this framework. If you want to learn more about TinyML and how it works, check out our free books and videos.
scaledown.load_model
: Loading Models
Utilities for loading supported models to scaledown. This is usually the first step that you need to do when working with scaledown. Once the models are loaded, you can then optimize them, benchmark their performance and then deploy them to different devices.
For more information on how to load models and get started with ScaleDown, check out our User Guide.
scaledown.load_model(model, model_type): Wrapper function for loading supported models
scaledown.quantization
: Quantizing Models
Utilities for optimizing models uing quantizing.
User Guide: See Quantization to learn more about the supported quantization algorithms and how they work
quantization.WeightQuantization
: Perform only weight quantization of models. Good for reducing model size with less drop in accuracy.
quantization.ActivationQuantization
:
Perform weight and activation quantization of models. Good for reducing model size and for using INT8
operations for executing models.
scaledown.distillation
: Distilling Large Models
Utilities for distilling the knowledge of large models to smaller ones.
User Guide: See Distillation to learn more about the supported knowledge distillation algorithms and how they work
distillation.KnowledgeDistillation
: Distill models using the original knowledge distillation technique proposed by Hinton et. al. Supports add temperature to distillation as well.
scaledown.pruning
: Pruning Models
Utilities for optimizing models using different pruning techniques.
User Guide: See Pruning to learn more about the supported pruning algorithms and how they work
pruning.MagnitudePruning
: Prune models by removing weights with high magnitude. Support for finetuning model after pruning is present.