Views
No views yet
1# =============================================================================
2# BASE MODEL
3# =============================================================================
4base_model: /home/arli/models/gemma-4-E4B-it
5
6
7# =============================================================================
8# PLUGINS & KERNEL OPTIMIZATIONS
9# =============================================================================
10plugins:
11 - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
12cut_cross_entropy: true
13
14
15# =============================================================================
16# QUANTIZATION
17# =============================================================================
18load_in_8bit: false
19load_in_4bit: false
20
21
22# =============================================================================
23# DATASET
24# =============================================================================
25shuffle_merged_datasets: true
26datasets:
27 - path: allura-forge/musica-sft-v1-gemma4-pretok
28 ds_type: parquet
29 type:
30
31dataset_prepared_path: ./last_run_prepared
32val_set_size: 0
33
34
35# =============================================================================
36# OUTPUT & ADAPTER
37# =============================================================================
38output_dir: ./outputs/v1
39adapter: lora
40save_safetensors: true
41
42
43# =============================================================================
44# SEQUENCE & SAMPLE PACKING
45# =============================================================================
46sequence_len: 8192
47sample_packing: true # DOES in fact work with SDPA
48pad_to_sequence_len: false
49
50
51# =============================================================================
52# LORA
53# =============================================================================
54lora_r: 64
55lora_alpha: 64
56lora_dropout: 0.0
57lora_target_modules: 'model.language_model.layers.[\d]+.(_checkpoint_wrapped_module.)?(mlp|self_attn).(up|down|gate|q|k|v|o)_proj'
58
59lora_mlp_kernel: false
60lora_qkv_kernel: false
61lora_o_kernel: false
62
63
64# =============================================================================
65# TRAINING HYPERPARAMETERS
66# =============================================================================
67gradient_accumulation_steps: 8
68micro_batch_size: 1
69num_epochs: 2
70optimizer: adamw_torch_fused
71lr_scheduler: rex
72learning_rate: 1e-5
73warmup_ratio: 0.05
74max_grad_norm: 1.0
75weight_decay: 0.05
76
77# =============================================================================
78# PRECISION
79# =============================================================================
80bf16: auto
81
82
83# =============================================================================
84# ATTENTION
85# =============================================================================
86#sdp_attention: true
87#flash_attention: true
88#flex_attention: true
89#torch_compile: true
90gemma4_hybrid_attn_impl: true
91
92# =============================================================================
93# LOGGING & MONITORING
94# =============================================================================
95use_comet: true # install comet-ml with pip and do comet login before starting
96comet_project_name: musica-e4b
97logging_steps: 1
98
99
100# =============================================================================
101# CHECKPOINTING & SAVING
102# =============================================================================
103auto_resume_from_checkpoints: false
104evals_per_epoch: 0
105saves_per_epoch: 4
106save_total_limit: 4
107
108gradient_checkpointing: false
109gradient_checkpointing_kwargs:
110 use_reentrant: false
111
112fsdp_config:
113 fsdp_version: 2
114 offload_params: false
115 cpu_ram_efficient_loading: false
116 auto_wrap_policy: TRANSFORMER_BASED_WRAP
117 transformer_layer_cls_to_wrap: Gemma4TextDecoderLayer
118 state_dict_type: FULL_STATE_DICT
119 sharding_strategy: FULL_SHARD
120 reshard_after_forward: false
121 activation_checkpointing: true
122