opt

Modules

modelopt.torch.opt.config

Modelopt's pydantic BaseModel used for any type of configuration in algorithms and mode.

modelopt.torch.opt.conversion

Module to handle model converting and restoring for optimization methods.

modelopt.torch.opt.dynamic

Basic dynamic module class and hparam class.

modelopt.torch.opt.hparam

Standard hyperparameter class for regular symbol.

modelopt.torch.opt.mode

Interface and utilities for optimization modes/algorithms.

modelopt.torch.opt.plugins

Handles plugins for third-party modules.

modelopt.torch.opt.searcher

Standard interface to implement a searcher algorithm.

modelopt.torch.opt.utils

Utilities for optimization.

Module for general-purpose model optimization infrastructure.

modelopt.torch.opt contains tooling to:

  • ingest a user-provided model and set it up for optimization;

  • define and implement search and optimization procedures;

  • export a model back to a regular pytorch model after optimization;

  • save, restore, and manage checkpoints from which the model modifications can be resumed.

Please refer to each individual sub-module to learn more about the various concepts wihin modelopt.torch.opt and how to use them to implement a model optimization algorithm.