Views
No views yet
0.13.0.dev01# axolotl train config.yaml
2
3# Prevent NCCL timeout
4ddp_timeout: 7200 # 2 hours timeout instead of 10 minutes
5
6# Load model from local models directory first, fallback to HuggingFace if not found
7base_model: AiForgeMaster/Qwen3-4B-P3-TC-1 # Local path - will fallback to Qwen/Qwen3-4B if not found locally
8# Automatically upload checkpoint and final model to HF
9hub_model_id: AiForgeMaster/Qwen3-4B-P3-TC-RSSFT-1
10
11load_in_8bit: false
12load_in_4bit: false
13strict: false
14
15# SFT dataset configuration - using HuggingFace datasets
16datasets:
17 - path: AiForgeMaster/glaiceai-natural-reasoning-10k # Private HF dataset - requires API key
18 type: alpaca_chat.load_qa
19 # skip: 0 # number of rows of data to skip over from the beginning
20
21# Local paths relative to working directory
22dataset_prepared_path: ./data/prepared
23val_set_size: 0.0 # Set to 0 for SFT (no validation split)
24output_dir: ./outputs
25
26# Cache directories for HuggingFace downloads (relative to working dir)
27# This ensures models and datasets are downloaded to local directories
28hf_use_auth_token: true # Use HF token for private repos if needed
29
30sequence_len: 8192
31sample_packing: false # Standard for SFT
32eval_sample_packing: false # Disable for SFT
33
34# WandB configuration - fill in your details
35wandb_project: ngpt-cpt
36wandb_entity: null
37wandb_watch: gradients
38wandb_name: qwen3_4b_p3_tc_rssft_1
39wandb_log_model: end
40
41# Batch size configuration (total effective batch size = micro_batch_size * gradient_accumulation_steps * num_gpus)
42# For batch size 8-16: micro_batch_size=2, gradient_accumulation_steps=4 gives effective batch size of 8 per GPU
43gradient_accumulation_steps: 4
44micro_batch_size: 8 # Adjust based on your GPU memory
45optimizer: adamw_torch_fused
46lr_scheduler: cosine
47learning_rate: 2e-5 # Good learning rate for SFT
48
49bf16: auto
50tf32: true
51
52max_grad_norm: 1.0
53
54gradient_checkpointing: true
55gradient_checkpointing_kwargs:
56 use_reentrant: false
57logging_steps: 10 # Log every 10 steps
58flash_attention: true
59
60warmup_steps: 150 # Good warmup for SFT
61# Checkpoint saving configuration - save every 50 steps
62save_steps: 50
63save_strategy: steps
64save_total_limit: 5 # Keep only 5 most recent checkpoints
65save_only_model: false # Save full checkpoint including optimizer state
66
67# Evaluation configuration removed for pure SFT (val_set_size: 0.0)
68# eval_steps: 2000 # Not supported when val_set_size == 0
69# eval_strategy: steps # Not supported when val_set_size == 0
70weight_decay: 0.01 # Good weight decay for SFT
71
72# Liger optimizations for memory efficiency and speed
73plugins:
74 - axolotl.integrations.liger.LigerPlugin
75
76liger_rope: true
77liger_rms_norm: true
78liger_glu_activation: true
79liger_layer_norm: true
80liger_fused_linear_cross_entropy: true
81
82# Additional SFT optimizations
83# Enable for first run to validate checkpoint saving works
84save_first_step: true
85
86# Memory optimizations
87dataloader_pin_memory: true
88dataloader_num_workers: 4
89remove_unused_columns: true
90
91# Advanced training settings for SFT
92# Calculate max_steps for full epoch: dataset_size / (micro_batch_size * gradient_accumulation_steps * num_gpus)
93# max_steps: 175 # Set for one full epoch with your dataset size
94num_epochs: 1
95group_by_length: true # Good for SFT efficiency
96train_on_inputs: true # train on user inputs in SFT
97
98# Loss monitoring
99loss_watchdog_threshold: 10.0 # Stop if loss exceeds this value
100loss_watchdog_patience: 3
101
102# Garbage collection to manage memory
103gc_steps: 100 # Run garbage collection every 100 steps