base_model: openai/gpt-oss-20b use_kernels: true model_quantization_config: Mxfp4Config model_quantization_config_kwargs: dequantize: true plugins: - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin experimental_skip_move_to_device: true # prevent OOM by NOT putting model to GPU before sharding datasets: - path: HuggingFaceH4/Multilingual-Thinking type: chat_template field_thinking: thinking template_thinking_key: thinking dataset_prepared_path: ./outputs/last_run_prepared val_set_size: 0 output_dir: ./outputs/gpt-oss-out/ sequence_len: 4096 sample_packing: true pad_to_sequence_len: true wandb_project: wandb_entity: wandb_watch: wandb_name: wandb_log_model: trackio_project_name: trackio_run_name: trackio_space_id: gradient_accumulation_steps: 2 micro_batch_size: 1 num_epochs: 1 optimizer: adamw_torch_fused # 8bit optimizers do not work with FSDP2 offload lr_scheduler: constant_with_warmup learning_rate: 2e-5 bf16: true tf32: true flash_attention: true attn_implementation: kernels-community/vllm-flash-attn3 # this is not needed if using flash_attn >= 2.8.3 gradient_checkpointing: true activation_offloading: true logging_steps: 1 saves_per_epoch: 1 warmup_ratio: 0.03 special_tokens: eot_tokens: - "<|end|>" fsdp_version: 2 fsdp_config: offload_params: true state_dict_type: SHARDED_STATE_DICT auto_wrap_policy: TRANSFORMER_BASED_WRAP transformer_layer_cls_to_wrap: GptOssDecoderLayer reshard_after_forward: true # cpu_ram_efficient_loading: true # cpu_ram_efficient_loading cannot be used with MXFP4 model quantization. # It can only be used with a dequantized model like `axolotl-ai-co/gpt-oss-120b-dequantized`