bridge.recipes.nemotron_vl.nemotron_nano_v2_vl#

Nemotron Nano V2 VL finetuning recipes with parameterless defaults.

This module provides SFT and PEFT configurations for Nemotron Nano V2 VL 12B.

Module Contents#

Functions#

_nemotron_vl_target_modules

Return adapter target modules for the selected Nemotron VL components.

_nemotron_vl_lora_config

Build a Nemotron VL LoRA config that respects component selection flags.

nemotron_nano_v2_vl_12b_sft_config

Return a full SFT config for Nemotron Nano V2 VL 12B.

nemotron_nano_v2_vl_12b_peft_config

Return a PEFT config for Nemotron Nano V2 VL 12B.

Data#

API#

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl._DEFAULT_HF_MODEL_PATH#

‘nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16’

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl._ALL_COMPONENT_LORA_TARGET_MODULES#

[‘linear_qkv’, ‘linear_proj’, ‘linear_fc1’, ‘linear_fc2’]

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl._LANGUAGE_LORA_TARGET_MODULES#

[’language_model.linear_qkv’, ‘language_model.linear_proj’, ‘language_model.linear_fc1’, ‘*lan…

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl._VISION_LORA_TARGET_MODULES#

[’vision_model.linear_qkv’, ‘vision_model.linear_proj’, ‘vision_model.linear_fc1’, ‘*vision_mo…

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl._nemotron_vl_target_modules(
*,
lora_on_language_model: bool = True,
lora_on_vision_model: bool = True,
) list[str]#

Return adapter target modules for the selected Nemotron VL components.

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl._nemotron_vl_lora_config(
*,
lora_on_language_model: bool = True,
lora_on_vision_model: bool = True,
) megatron.bridge.peft.lora.VLMLoRA#

Build a Nemotron VL LoRA config that respects component selection flags.

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl.nemotron_nano_v2_vl_12b_sft_config(
hf_model_path: str = _DEFAULT_HF_MODEL_PATH,
pretrained_checkpoint: str | None = None,
) megatron.bridge.training.config.ConfigContainer#

Return a full SFT config for Nemotron Nano V2 VL 12B.

Default configuration: 1 node, 8 GPUs

  • TP=4, PP=1

  • LR=1e-5 (finetune default)

  • Sequence length: 4096

Parameters:
  • hf_model_path – Hugging Face model path used for provider and processor setup.

  • pretrained_checkpoint – Optional checkpoint path to load before finetuning.

bridge.recipes.nemotron_vl.nemotron_nano_v2_vl.nemotron_nano_v2_vl_12b_peft_config(
peft_scheme: str | megatron.bridge.peft.base.PEFT = 'lora',
*,
hf_model_path: str = _DEFAULT_HF_MODEL_PATH,
pretrained_checkpoint: str | None = None,
lora_on_language_model: bool = True,
lora_on_vision_model: bool = True,
) megatron.bridge.training.config.ConfigContainer#

Return a PEFT config for Nemotron Nano V2 VL 12B.

Default configuration: 1 node, 8 GPUs

  • TP=2, PP=1

  • LR=5e-5 (PEFT)

  • Sequence length: 4096

Parameters:
  • peft_scheme – PEFT scheme - “lora”, “dora”, or a custom PEFT instance. Note: Default uses VLMLoRA targeting all model components.

  • hf_model_path – Hugging Face model path used for provider and processor setup.

  • pretrained_checkpoint – Optional checkpoint path to load before finetuning.

  • lora_on_language_model – Whether LoRA targets the language model when PEFT is “lora” or “dora”.

  • lora_on_vision_model – Whether LoRA targets the vision model when PEFT is “lora” or “dora”.