Training Configuration
Want to learn about training concepts at a high level? Check out the Customization concepts page.
NeMo Customizer ships two training backends, and each accepts its own job configuration. Choose the backend that matches your hardware and training goal, then configure the hyperparameters from that backend’s schema below.
The two backends do not share field names. For example, Automodel uses batch.global_batch_size / batch.micro_batch_size and a parallelism block; Unsloth uses batch.per_device_train_batch_size / batch.gradient_accumulation_steps and a hardware block. Both schemas reject unknown keys, so a field from one backend will not validate against the other.
Each backend can also print its live schema, and the generated REST shapes are in the Customizer API Reference (search for AutomodelJobInput and UnslothJobInput).
Start from a Reference Recipe
The training libraries publish benchmarked recipes per model. Start a job from the closest one instead of from defaults:
- Automodel jobs: Automodel
r0.7.0LLM fine-tuning recipes. Nemotron recipes are underllm_finetune/nemotron. - RL jobs (DPO, GRPO): NeMo-RL
r0.8.0recipes. Only thefsdp2andautomodelrecipes apply; Megatron recipes do not.
Copy the learning rate, LoRA rank and alpha, batch sizes, sequence length, and parallel layout into the job, then scale the batch to your GPU count. Ignore max_steps and the ci block; those are CI smoke-test settings.
Automodel Configuration
An Automodel job is configured with the following top-level sections: model, dataset, training, schedule, batch, optimizer, parallelism, output, and (optionally) integrations.
Model and Dataset
Training Method
Each processor bounds image size through its own keys, so there is no single pixel limit. Set the keys your model’s processor reads in training.processor_arguments:
Other processors use a fixed size or soft-token count (Gemma 3, Gemma 4), tile the image (Llama 3.2 Vision, Nemotron Nano VL, Phi-4), or take a token limit (Kimi-VL).
A processor drops a key it does not read, so the platform rejects any key outside the model’s processor config and lists the keys it does set. use_fast is also accepted. Models registered before the model spec recorded these keys are not checked, so a misspelled key is silently ignored for them.
When to set training.tokenizer_backend:
- Usually never. For every Nemotron and Qwen checkpoint Customizer documents, the unset default loads the right tokenizer.
- Nemotron 3 Embed 1B declares model type
ministral3, which Automodel maps to Mistral’stekken.json, but the checkpoint ships onlytokenizer.json. The retrieval default handles this, so never setnemo_autofor it. - SFT or distillation on such a checkpoint: set
nemo_wrapped_auto. - Mistral-family LLMs that ship
tekken.json: keep the default.
When a full-weight distillation job leaves training.precision unset and uses Adam or AdamW, the student is stored in fp32. Those optimizers keep no separate fp32 copy of the weights, so bf16 storage would make every update bf16.
LoRA parameters (training.lora):
On a NemotronH checkpoint, such as Nemotron 3.5 Super VL, a job that leaves target_modules unset also has *.out_proj excluded, so the Mamba out_proj modules are not adapted. Name them in target_modules to adapt them. Reference Recipe: Nemotron 3.5 Super VL does that.
Merge an Existing Adapter
To merge an adapter you already trained, run a merge job. It merges the adapter into the base model, uploads the 16-bit result to a new fileset, and registers a Model Entity with finetuning_type: lora_merged. The base model and adapter are unchanged.
From Python, use customization.automodel.merge_jobs.create(spec={...}, workspace="default") with the same model, adapter and output fields. The merge runs on the CPU and needs no GPU. It reads the base checkpoint one safetensors shard at a time and writes each back with the adapter’s weights added, so its memory does not grow with the model: the default memory of 16Gi is enough when the shards are a few GiB, as they are for a 120B model. PEFT does the arithmetic for each adapted weight, so rsLoRA, DoRA and per-module rank or alpha merge this way too. An adapter it cannot merge that way (a module that is not a single tensor in the checkpoint, such as experts fused on load, or modules_to_save or lora_bias) is merged through PEFT, which loads the whole model in bf16; the job log says so. For those, set memory to about 1.5 times the checkpoint’s size, for example "400Gi" for a 120B model. The merged checkpoint keeps the base’s tensor names, config, tokenizer and remote code. The adapter must be a LoRA adapter trained on model, and output.name cannot be the name of either. Embedding and ranking models are not supported.
Schedule
Batch
Optimizer
Retrieval recipes replace the batch and optimizer defaults above. When training.recipe resolves to bi_encoder or cross_encoder, either set explicitly or chosen by auto from the checkpoint head, each of these fields you leave unset takes the recipe’s value:
auto reads the checkpoint head that model registration infers from the checkpoint’s files. A Qwen3 reranker (a Qwen3ForCausalLM that scores with its yes/no logits) looks like a chat model unless its model card sets pipeline_tag: text-ranking, as the published Qwen3-Reranker does. A Qwen3 reranker trained by Customizer, or fine-tuned elsewhere, doesn’t carry that tag, so auto trains it with sft. Set training.recipe: cross_encoder explicitly to re-tune it.
Parallelism
The parallelism block scales Automodel training across GPUs and nodes.
GPU relationships and constraints:
total_gpus = num_gpus_per_node × num_nodes.total_gpusmust be divisible bytensor_parallel_size × pipeline_parallel_size × context_parallel_size.data_parallel_sizeis derived astotal_gpus / (TP × PP × CP), andglobal_batch_sizemust be divisible bymicro_batch_size × data_parallel_size.- For MoE models, when
expert_parallel_sizeis set: the number of experts must be divisible byexpert_parallel_size,(data_parallel_size × context_parallel_size)must be divisible byexpert_parallel_size, andtensor_parallel_sizemust be1whenexpert_parallel_size > 1.
Reference Recipe: Nemotron 3.5 Super VL
This spec reproduces the upstream Automodel CORD-v2 LoRA recipe on one node of 8 GPUs. It trains 177,012,736 parameters, the same count upstream reports, and 400 steps took about 18 minutes on 8x B200. Scores and the walkthrough that builds it are on Nemotron Vision-Language Models and Vision LoRA on CORD-v2.
Why each setting is there:
target_modules. Names all 272 modules the upstream recipe adapts: Mambain_projandout_proj, attentionq_proj,k_proj,v_projando_proj, the mixture-of-experts latent projections, and the shared experts. Left unset, the platform excludes the Mambaout_projand adapts 232. None of the patterns match the vision tower.dispatcher. Upstream useshybridep. The platform’s training image does not include it, so the spec leavesdispatcherunset and the compiler usestorch. It changes how tokens are routed between expert-parallel ranks, not the model’s math.optimizer. Upstream also sets FusedAdammaster_weights,store_param_remaindersand bf16 moments. The job spec has no fields for them, so they are not matched.parallelism.expert_parallel_size8 divides the 8 GPUs and stays on one node. Tensor parallel stays at 1, as the mixture-of-experts rule requires.
Distillation
When training.training_type is "distillation", the following additional fields configure knowledge distillation from a teacher model:
- Knowledge distillation uses logit-pair distillation — the student learns to match the teacher’s output probability distribution.
- Both student and teacher must be full-weight Model Entities and share the same tokenizer and vocabulary. Use models from the same family (for example, Qwen3 0.6B + Qwen3 8B).
- Both models are loaded during training; plan GPU memory accordingly (or set
offload_teacher).
Unsloth Configuration
An Unsloth job is configured with the following top-level sections: model, dataset, training, schedule, batch, optimizer, hardware, output, and (optionally) integrations. Unsloth runs on a single GPU and supports 4-bit / 8-bit quantized loading for LoRA. Full-weight training must load the model without quantization.
Model
Full-weight training (training.finetuning_type: "all_weights") cannot be combined with quantized loading. Set load_in_4bit and load_in_8bit to false for full-weight runs.
Dataset
Training Method
LoRA parameters (training.lora):
Fully trained modules in a LoRA adapter, from lora.modules_to_save or from unfreeze_modules with finetuning_type: lora, have two limits:
- For Llama, Mistral, Gemma, and Qwen2/Qwen3 models, Unsloth accepts only
embed_tokensandlm_head. Any other module fails the job; usefinetuning_type: all_weightsto train it. - vLLM can’t serve the adapter unmerged, because it rejects adapters that carry full modules. Set
output.save_methodtomerged_16bitand deploy the merged model.
Schedule
Batch
Optimizer
Hardware
Output
The output.save_method field accepts:
The merged_* methods are only valid when training.finetuning_type is lora. When training.finetuning_type is all_weights, omit output.save_method; the training driver saves the full trained checkpoint.
Reinforcement Learning Configuration (DPO and GRPO)
The rl backend runs two methods on a Ray cluster, selected by training.type. It requires a platform configured with platform.runtime: kubernetes and has no local Docker fallback.
training.type is required. It is the union discriminator, so a payload that omits it is rejected with union_tag_not_found rather than defaulting to one of the two.
Unlike the other backends, model, dataset, and (for GRPO) environment are plain string references rather than objects:
Shared Fields
DPO Fields
DPO is full-weight only.
GRPO Fields
Advanced controls, collapsed by default in most workflows:
Parameter Efficiency (GRPO)
DPO is full-weight only. GRPO trains either way, selected by training.finetuning_type.
The output type is inferred from this field; output carries only name.
Leaving both target_modules and exclude_modules unset adapts every linear layer. Setting either one turns that off, so exclude_modules alone does not mean “all linear layers except these.” Supplying a lora block alongside all_weights is rejected.
GRPO progress is read on reward, not loss — the surrogate loss oscillates near zero and says nothing about run quality. See GRPO and Reward Environments for environment packaging, dataset format, and the metrics to monitor.
GPU Memory Guidelines
Estimated GPU requirements by model size:
Use LoRA for most fine-tuning tasks — it is significantly more memory-efficient and often achieves results comparable to full fine-tuning. On a single memory-constrained GPU, the Unsloth backend with 4-bit loading fits the largest adapters.