Skip to content

Commit 333f3c5

Browse files
author
mollys
committed
missing imports, updated names
1 parent 84fba28 commit 333f3c5

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

src/megatron/bridge/perf_recipes/llama/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
llama31_405b_pretrain_256gpu_b300_fp8mx_config,
4747
llama31_405b_pretrain_256gpu_b300_nvfp4_config,
4848
)
49+
from megatron.bridge.perf_recipes.llama.gb200.llama2 import (
50+
llama2_70b_peft_4gpu_gb200_fp8ds_config,
51+
llama2_70b_peft_8gpu_gb200_fp8ds_config,
52+
llama2_70b_peft_8gpu_gb200_nvfp4_config,
53+
llama2_70b_peft_72gpu_gb200_fp8ds_config,
54+
llama2_70b_peft_512gpu_gb200_fp8ds_config,
55+
)
4956
from megatron.bridge.perf_recipes.llama.gb200.llama3 import (
5057
llama3_8b_pretrain_8gpu_gb200_bf16_config,
5158
llama3_8b_pretrain_8gpu_gb200_fp8cs_config,
@@ -79,6 +86,12 @@
7986
llama31_405b_pretrain_256gpu_gb200_fp8mx_config,
8087
llama31_405b_pretrain_256gpu_gb200_nvfp4_config,
8188
)
89+
from megatron.bridge.perf_recipes.llama.gb300.llama2 import (
90+
llama2_70b_peft_4gpu_gb300_fp8ds_config,
91+
llama2_70b_peft_8gpu_gb300_fp8ds_config,
92+
llama2_70b_peft_72gpu_gb300_fp8ds_config,
93+
llama2_70b_peft_512gpu_gb300_fp8ds_config,
94+
)
8295
from megatron.bridge.perf_recipes.llama.gb300.llama3 import (
8396
llama3_8b_pretrain_8gpu_gb300_bf16_config,
8497
llama3_8b_pretrain_8gpu_gb300_fp8cs_config,

src/megatron/bridge/perf_recipes/llama/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
_enable_overlap_param_gather_with_optimizer_step,
2020
_perf_precision,
2121
)
22+
from megatron.bridge.recipes.llama.llama2 import (
23+
llama2_70b_peft_config,
24+
)
2225
from megatron.bridge.recipes.llama.llama3 import (
2326
llama3_8b_pretrain_config,
2427
llama3_8b_sft_config,

src/megatron/bridge/recipes/llama/h100/llama2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from megatron.bridge import AutoBridge
1818
from megatron.bridge.peft.base import PEFT
1919
from megatron.bridge.recipes.common import _peft_common, _pretrain_common
20-
from megatron.bridge.recipes.utils.finetune_utils import default_peft_confi
20+
from megatron.bridge.recipes.utils.dataset_utils import default_peft_config
2121
from megatron.bridge.recipes.utils.environment_utils import COMMON_RECIPE_ENV_VARS
2222
from megatron.bridge.recipes.utils.tokenizer_utils import DEFAULT_NULL_TOKENIZER_VOCAB_SIZE
2323
from megatron.bridge.training.comm_overlap import CommOverlapConfig
@@ -152,7 +152,7 @@ def llama2_70b_peft_config(
152152
seq_length = 8192
153153
cfg.model.seq_length = seq_length
154154
cfg.dataset.seq_length = seq_length
155-
cfg.dataset.packed_sequence_specs.packed_sequence_size = seq_length
155+
cfg.dataset.offline_packing_specs.packed_sequence_size = seq_length
156156

157157
# PEFT config - 70B uses dim=16, alpha=32
158158
peft_cfg = default_peft_config(peft_scheme)
@@ -164,7 +164,7 @@ def llama2_70b_peft_config(
164164

165165
# Packed sequence settings
166166
if cfg.model.context_parallel_size > 1:
167-
cfg.dataset.packed_sequence_specs.pad_seq_to_mult = cfg.model.context_parallel_size * 2
167+
cfg.dataset.offline_packing_specs.pad_seq_to_mult = cfg.model.context_parallel_size * 2
168168

169169
# Parallelism settings - 70B PEFT uses TP=8
170170
cfg.model.pipeline_model_parallel_layout = None

0 commit comments

Comments
 (0)