bridge.models.gpt.gpt_builder#
Module Contents#
Functions#
Create a Transformer Engine layer specification based on the provided config. |
|
Create a full Transformer Engine layer specification with autocast support. |
|
Create a local layer specification without Transformer Engine. |
|
Layer specification for quantization with ModelOpt. |
|
Determine the most appropriate layer specification based on availability. |
Data#
API#
- bridge.models.gpt.gpt_builder.logger#
‘getLogger(…)’
- bridge.models.gpt.gpt_builder.transformer_engine_layer_spec(
- config: megatron.training.models.gpt.GPTModelConfig,
Create a Transformer Engine layer specification based on the provided config.
- bridge.models.gpt.gpt_builder.transformer_engine_full_layer_spec(
- config: megatron.bridge.models.transformer_config.TransformerConfig,
Create a full Transformer Engine layer specification with autocast support.
- Parameters:
config – GPT configuration object
- Returns:
Module specification for full TE layers
- Return type:
ModuleSpec
- bridge.models.gpt.gpt_builder.local_layer_spec(
- config: megatron.bridge.models.transformer_config.TransformerConfig,
Create a local layer specification without Transformer Engine.
- Parameters:
config – GPT configuration object
- Returns:
Module specification for local implementation layers
- Return type:
ModuleSpec
- bridge.models.gpt.gpt_builder.modelopt_transformer_layer_spec(
- config: megatron.training.models.gpt.GPTModelConfig,
Layer specification for quantization with ModelOpt.
- bridge.models.gpt.gpt_builder.default_layer_spec(
- config: megatron.training.models.gpt.GPTModelConfig,
Determine the most appropriate layer specification based on availability.
- bridge.models.gpt.gpt_builder.__all__#
[‘GPTModelConfig’, ‘GPTModelBuilder’, ‘mtp_block_spec’, ‘transformer_engine_layer_spec’, ‘transforme…