1# the original mxfp4 quantized model is not supported with FSDP cpu_ram_efficient_loading
2# FSDP cpu_ram_efficient_loading is used to reduce the initial CPU memory usage when loading the model
3base_model: axolotl-ai-co/gpt-oss-20b-dequantized
4
5use_kernels: false
6
7dp_shard_size: 8 # requires 2x8xH100 nodes
8
9plugins:
10 - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
11
12experimental_skip_move_to_device: true # prevent OOM by NOT putting model to GPU before sharding
13
14datasets:
15 - path: HuggingFaceH4/Multilingual-Thinking
16 type: chat_template
17 field_thinking: thinking
18 template_thinking_key: thinking
19
20dataset_prepared_path: last_run_prepared
21val_set_size: 0
22output_dir: ./outputs/gpt-oss-20b/
23#save_only_model: true
24
25sequence_len: 4096
26sample_packing: true
27pad_to_sequence_len: true
28
29wandb_project: gpt-oss-20b
30wandb_name: fft-20b
31
32gradient_accumulation_steps: 1
33micro_batch_size: 4
34num_epochs: 1
35
36optimizer: adamw_torch_fused # 8bit optimizers do not work with FSDP2 offload
37lr_scheduler: constant_with_warmup
38learning_rate: 2e-5
39load_best_model_at_end: false
40
41bf16: true
42tf32: true
43
44flash_attention: true
45attn_implementation: kernels-community/vllm-flash-attn3
46
47gradient_checkpointing: true
48activation_offloading: true
49
50logging_steps: 1
51saves_per_epoch: 1
52
53warmup_ratio: 0.03
54
55special_tokens:
56eot_tokens:
57 - "<|end|>"
58
59#deepspeed: /workspace/axolotl/deepspeed_configs/zero3_bf16.json
60fsdp_version: 2
61fsdp_config:
62 offload_params: true
63 state_dict_type: SHARDED_STATE_DICT
64 auto_wrap_policy: TRANSFORMER_BASED_WRAP
65 transformer_layer_cls_to_wrap: GptOssDecoderLayer
66 reshard_after_forward: true
67 cpu_ram_efficient_loading: true