mode
Interface and utilities for optimization modes/algorithms.
A mode is a specific type or algorithms for model optimization, e.g., some type of algorithm for pruning or quantization. It can also specify a single step within an optimization algorithm instead of the whole algorithm. For example, a mode can prepare a model for pruning or export (i.e. fix the optimal model configuration) after pruning.
Within modelopt
, a mode
constitutes the unit for model optimization. We can define arbitrary
modes, each mode gets recorded in the model’s modelopt state dict, and we can define workflows as a
sequence of modes.
Classes
|
Helper class that provides a standard way to create an ABC using inheritance. |
|
Special type indicating an unconstrained type. |
|
A basic search interface that can be used to search/optimize a model. |
|
Type variable. |
Functions
|
A decorator indicating abstract methods. |
|
Standardize mode to ModeConfigDict and return. |
|
Repeat val for repeat_time times and return the list or val if list/tuple. |