neural_compressor.compression.pruner.pruners.sparse_gpt
Module Contents
Classes
Pruning Pruner. |
- class neural_compressor.compression.pruner.pruners.sparse_gpt.SparseGPTPruner(config, modules, framework='pytorch')[source]
Pruning Pruner. The sparse_gpt pruner_class is derived from PytorchBasePruner. SparseGPTPruner supports one-shot pruning of most Large Language Models(LLMs). Please refer to SparseGPT: Massive Language Models Can be Accurately Pruned in One-shot.
- Parameters:
modules – A dict {“module_name”: Tensor} that stores the pruning modules’ weights.
config – A config dict object that contains the pruner information.