Skip to content

[#recipebot] Add Llama 3.1 405B nvfp4 Megatron-Bridge A4X recipe - #283

Open
wenqinI wants to merge 1 commit into
AI-Hypercomputer:mainfrom
wenqinI:wenqinyang-llama31-405b-a4x-recipe
Open

wenqinI wants to merge 1 commit into
AI-Hypercomputer:mainfrom
wenqinI:wenqinyang-llama31-405b-a4x-recipe

Conversation

@wenqinI

@wenqinI wenqinI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Adding a recipe for Llama 3.1 405B Megatron-Bridge on A4X.

run_id: wenqinyang-ubench-m9hm78qy

Final Diff: https://paste.googleplex.com/6704000242679808?raw

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a Helm chart and launcher recipe for pretraining llama31-405b workloads on GKE using the Megatron-Bridge framework. Feedback highlights several critical improvements: passing parsed configuration overrides to the training script, using environment variables instead of hardcoded node/GPU counts in torchrun, avoiding memory accumulation in the log-streaming script, adding retries for runtime git clones, defensively checking privileges before executing dmesg, and correcting a version mismatch in the documentation.

Comment on lines +136 to +157
python scripts/performance/run_script.py \
--model_family_name llama \
--model_recipe_name llama31_405b \
--config_variant v2 \
--gpu gb200 \
--num_gpus 256 \
--gpus_per_node 4 \
--compute_dtype nvfp4 \
--seq_length 8192 \
--global_batch_size 1536 \
--micro_batch_size 1 \
--tensor_model_parallel_size 4 \
--pipeline_model_parallel_size 16 \
--virtual_pipeline_model_parallel_size 8 \
--context_parallel_size 1 \
--expert_model_parallel_size 1 \
--expert_tensor_parallel_size 1 \
--cuda_graph_impl none \
--max_steps 30 \
logger.log_throughput=True \
dataset.num_workers=0 \
train.manual_gc_interval=100

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The parsed config_overrides are never passed to the Python execution command. This means any custom arguments passed via Helm (such as trainer.max_steps=100 as shown in the README examples) will be completely ignored, and the job will run with default parameters. Append ${config_overrides} to the python command to ensure overrides are applied.

  python scripts/performance/run_script.py \
    --model_family_name llama \
    --model_recipe_name llama31_405b \
    --config_variant v2 \
    --gpu gb200 \
    --num_gpus \${WORLD_SIZE} \
    --gpus_per_node \${GPUS_PER_NODE} \
    --compute_dtype nvfp4 \
    --seq_length 8192 \
    --global_batch_size 1536 \
    --micro_batch_size 1 \
    --tensor_model_parallel_size 4 \
    --pipeline_model_parallel_size 16 \
    --virtual_pipeline_model_parallel_size 8 \
    --context_parallel_size 1 \
    --expert_model_parallel_size 1 \
    --expert_tensor_parallel_size 1 \
    --cuda_graph_impl none \
    --max_steps 30 \
    logger.log_throughput=True \
    dataset.num_workers=0 \
    train.manual_gc_interval=100 \
    ${config_overrides}

@wenqinI
wenqinI force-pushed the wenqinyang-llama31-405b-a4x-recipe branch from aa7a05f to aa6a5ee Compare September 1, 2026 04:20
@wenqinI wenqinI changed the title [#recipebot] Add Llama 3.1 405B Megatron-Bridge A4X recipe [#recipebot] Add Llama 3.1 405B nvfp4 Megatron-Bridge A4X recipe Sep 1, 2026
@wenqinI
wenqinI marked this pull request as ready for review September 10, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant