bridge.recipes.nemotronh.h100.nemotron_3_nano_4b#

Recipes for the dense NVIDIA Nemotron 3 Nano 4B model.

Module Contents#

Functions#

_model_config

Build the exact dense Nemotron 3 Nano 4B architecture.

_configure_tokenizer

Pin the model-native tokenizer revision.

_configure_kernels

Set the common BF16 execution and memory policy.

_configure_optimizer

Apply the bounded model-card convergence cohort optimizer contract.

nemotron_3_nano_4b_pretrain_8gpu_h100_bf16_config

Return the bounded random-init pretraining config for eight H100 GPUs.

nemotron_3_nano_4b_sft_8gpu_h100_bf16_config

Return the 2K packed full-SFT config for eight H100 GPUs.

nemotron_3_nano_4b_sft_8gpu_h100_bf16_32k_config

Return the packed 32K full-SFT config with CP=2 for eight H100 GPUs.

nemotron_3_nano_4b_peft_8gpu_h100_bf16_config

Return the packed attention-LoRA config for eight H100 GPUs.

Data#

API#

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b._HF_MODEL_ID#

‘nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16’

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b._HF_MODEL_REVISION#

‘dfaf35de3e30f1867dd8dbc38a7fc9fb52d3914f’

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b._model_config(
*,
seq_length: int,
context_parallel_size: int = 1,
) megatron.bridge.models.hybrid.hybrid_provider.HybridModelProvider#

Build the exact dense Nemotron 3 Nano 4B architecture.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b._configure_tokenizer(
cfg: megatron.bridge.training.config.ConfigContainer,
) None#

Pin the model-native tokenizer revision.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b._configure_kernels(
cfg: megatron.bridge.training.config.ConfigContainer,
) None#

Set the common BF16 execution and memory policy.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b._configure_optimizer(
cfg: megatron.bridge.training.config.ConfigContainer,
*,
lr: float,
min_lr: float,
grad_reduce_in_fp32: bool,
) None#

Apply the bounded model-card convergence cohort optimizer contract.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b.nemotron_3_nano_4b_pretrain_8gpu_h100_bf16_config() megatron.bridge.training.config.ConfigContainer#

Return the bounded random-init pretraining config for eight H100 GPUs.

Recommended parallelism is TP=1, PP=1, CP=1, DP=8. The recipe is random initialization by default; loading the released HF checkpoint is not part of this recipe’s verification contract.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b.nemotron_3_nano_4b_sft_8gpu_h100_bf16_config() megatron.bridge.training.config.ConfigContainer#

Return the 2K packed full-SFT config for eight H100 GPUs.

Recommended parallelism is TP=1, PP=1, CP=1, DP=8.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b.nemotron_3_nano_4b_sft_8gpu_h100_bf16_32k_config() megatron.bridge.training.config.ConfigContainer#

Return the packed 32K full-SFT config with CP=2 for eight H100 GPUs.

Recommended parallelism is TP=1, PP=1, CP=2, DP=4.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b.nemotron_3_nano_4b_peft_8gpu_h100_bf16_config(
peft_scheme: str | megatron.bridge.peft.base.PEFT = 'lora',
) megatron.bridge.training.config.ConfigContainer#

Return the packed attention-LoRA config for eight H100 GPUs.

Parameters:

peft_scheme – PEFT scheme ("lora", "dora"), or a custom PEFT instance.

Recommended parallelism is TP=1, PP=1, CP=1, DP=8.

bridge.recipes.nemotronh.h100.nemotron_3_nano_4b.__all__#

[‘nemotron_3_nano_4b_peft_8gpu_h100_bf16_config’, ‘nemotron_3_nano_4b_pretrain_8gpu_h100_bf16_config…