nemo_automodel.components.models#

Convenience model builders for NeMo Automodel.

Currently includes: • build_gpt2_model – returns a GPT-2 causal language model (Flash-Attention-2 by default).

Subpackages#

Submodules#

Package Contents#

Classes#

_MissingModelFinder

Produces a helpful error when importing a non-existent model subpackage.

Functions#

_available_model_submodules

Return the set of model sub-package names shipped with this installation.

_make_upgrade_message

__getattr__

Data#

API#

nemo_automodel.components.models.__all__#

[‘build_gpt2_model’]

nemo_automodel.components.models._MODELS_DIR#

None

nemo_automodel.components.models._PACKAGE_PREFIX#

None

nemo_automodel.components.models._available_model_submodules() set[str]#

Return the set of model sub-package names shipped with this installation.

nemo_automodel.components.models._make_upgrade_message(name: str) str#
nemo_automodel.components.models.__getattr__(name: str)#
class nemo_automodel.components.models._MissingModelFinder#

Bases: importlib.abc.MetaPathFinder

Produces a helpful error when importing a non-existent model subpackage.

Installed at the end of sys.meta_path so it is only consulted after all real finders have already returned None. For any import of the form nemo_automodel.components.models.<name> (direct child only), it raises a ModuleNotFoundError with upgrade instructions instead of the default unhelpful message.

find_spec(fullname, path, target=None)#