yamle.pruning.unstructured.magnitude module#

class yamle.pruning.unstructured.magnitude.UnstructuredMagnitudePruner(percentage, *args, **kwargs)[source]#

Bases: BasePruner

This is the base class for unstructured magnitude-based pruning.

It will prune the weights with the lowest absolute magnitude. The threshold is determined by the pruning percentage. The pruning percentage is the percentageage of weights to prune.

Parameters:

pruning_percentage (float) – The percentageage of weights to prune.

static add_specific_args(parent_parser)[source]#

This method is used to add the pruner specific arguments to the parent parser.

Return type:

ArgumentParser