@@ -568,6 +568,46 @@ def gpt_oss_120b_sft_32gpu_h100_bf16_config() -> ConfigContainer:
568568 return cfg
569569
570570
571+ def gpt_oss_120b_sft_48gpu_h100_bf16_32k_config () -> ConfigContainer :
572+ """Return the 32K-context full SFT config for GPT-OSS 120B.
573+
574+ Default parallelism: TP=2, PP=6, CP=4, EP=4
575+
576+ Returns:
577+ ConfigContainer with settings pre-configured for GPT-OSS 120B long-context SFT.
578+ """
579+ cfg = gpt_oss_120b_sft_32gpu_h100_bf16_config ()
580+
581+ seq_length = 32768
582+ cfg .model .seq_length = seq_length
583+ cfg .dataset .seq_length = seq_length
584+ cfg .dataset .offline_packing_specs .packed_sequence_size = seq_length
585+ cfg .dataset .offline_packing_specs .pad_seq_to_mult = 8
586+
587+ cfg .model .tensor_model_parallel_size = 2
588+ cfg .model .sequence_parallel = True
589+ cfg .model .context_parallel_size = 4
590+ cfg .model .pipeline_model_parallel_size = 6
591+ cfg .model .expert_model_parallel_size = 4
592+ cfg .model .cp_comm_type = "a2a"
593+ cfg .model .calculate_per_token_loss = True
594+
595+ cfg .model .cross_entropy_loss_fusion = False
596+ cfg .model .bias_activation_fusion = False
597+ cfg .model .recompute_granularity = "selective"
598+ cfg .model .recompute_modules = ["moe_act" ]
599+
600+ cfg .train .global_batch_size = 4
601+ cfg .train .micro_batch_size = 1
602+ cfg .ddp .average_in_collective = False
603+
604+ # Keep the complete process environment visible on the recipe.
605+ cfg .env_vars = {
606+ ** COMMON_RECIPE_ENV_VARS ,
607+ }
608+ return cfg
609+
610+
571611def gpt_oss_20b_sft_8gpu_h100_fp8cs_config () -> ConfigContainer :
572612 """Return a full SFT config for GPT-OSS 20B with Hopper FP8 current scaling."""
573613 cfg = gpt_oss_20b_sft_8gpu_h100_bf16_config ()
@@ -946,6 +986,7 @@ def gpt_oss_20b_sft_8gpu_h100_bf16_openmathinstruct2_thinking_packed_config() ->
946986 "gpt_oss_120b_peft_8gpu_h100_bf16_config" ,
947987 "gpt_oss_120b_pretrain_64gpu_h100_bf16_config" ,
948988 "gpt_oss_120b_sft_32gpu_h100_bf16_config" ,
989+ "gpt_oss_120b_sft_48gpu_h100_bf16_32k_config" ,
949990 "gpt_oss_20b_peft_1gpu_h100_bf16_config" ,
950991 "gpt_oss_20b_peft_1gpu_h100_fp8cs_config" ,
951992 "gpt_oss_20b_peft_1gpu_h100_fp8mx_config" ,
0 commit comments