0.10.0.dev01# === Model Configuration ===
2base_model: Qwen/Qwen3-14B-Base
3load_in_8bit: false
4load_in_4bit: true
5
6# === HF Configuration ===
7hub_model_id: ToastyPigeon/q3-14b-completion-lora
8hub_strategy: "every_save"
9
10# === Training Setup ===
11num_epochs: 2
12micro_batch_size: 1
13gradient_accumulation_steps: 8
14sequence_len: 16384
15sample_packing: true
16pad_to_sequence_len: false
17
18# === Evaluation ===
19#val_set_size: 250
20#evals_per_epoch: 5
21#eval_steps: 20
22#max_steps: 60
23#eval_table_size:
24#eval_max_new_tokens: 256
25#eval_sample_packing: true
26eval_strategy: "no"
27
28# === Experimental QAT ===
29qat:
30 activation_dtype: int4
31 weight_dtype: int4
32 group_size: 32
33 fake_quant_after_n_steps: 10
34
35
36# === LoRA Configuration ===
37adapter: qlora
38lora_model_dir:
39lora_r: 16
40lora_alpha: 32
41lora_dropout: 0.25
42lora_target_linear:
43lora_fan_in_fan_out:
44lora_target_modules:
45 - gate_proj
46 - down_proj
47 - up_proj
48 - q_proj
49 - v_proj
50 - k_proj
51 - o_proj
52
53#lora_mlp_kernel: true
54#lora_qkv_kernel: true
55#lora_o_kernel: true
56
57# === Hyperparameter Configuration ===
58#optimizer: apollo_adamw_layerwise
59warmup_steps: 20
60optimizer: adamw_torch_fused
61#optimizer: paged_adamw_8bit
62#optim_args:
63# enable_stochastic_rounding: true
64# enable_cautious: true
65# enable_8bit: true
66# Apollo-mini configuration:
67#optim_args: "proj=random,rank=128,scale=128.0,scale_type=tensor,update_proj_gap=100"
68# Regular Apollo configuration:
69# optim_args:
70#optim_target_modules: all_linear
71learning_rate: 1e-5
72lr_scheduler: rex
73cosine_min_lr_ratio: 0.2
74#lr_scheduler: cosine_with_min_lr
75#lr_scheduler_kwargs:
76# cosine_min_lr: 1e-6
77weight_decay: 0.01
78max_grad_norm: 1.0
79#warmup_steps: 0
80#warmup_ratio: 0.025
81
82
83# === Data Configuration ===
84#chat_template: jinja
85#chat_template_jinja: "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '\n' + message['content'] | trim + '<end_of_turn>\n' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model\n'}}{% endif %}"
86special_tokens:
87 eos_token: "<|im_end|>"
88#chat_template: jinja
89#chat_template_jinja: chat_template.jinja
90shuffle_merged_datasets: true
91datasets:
92 - path: ToastyPigeon/new-story-dataset
93 type: completion
94 data_files: new-story-dataset-v2.json
95 - path: ToastyPigeon/new-story-dataset
96 type: completion
97 data_files: ehl_samples.json
98 - path: ToastyPigeon/some-erotica
99 type: completion
100 split: train[:50%]
101 - path: ToastyPigeon/skein-text-adventures
102 type: completion
103 split: train[:50%]
104 - path: ToastyPigeon/SpringDragon
105 type: completion
106 split: train
107 - path: ToastyPigeon/disco-chat
108 type: completion
109 split: train
110dataset_prepared_path: last_run_prepared
111
112
113# === Plugins ===
114plugins:
115 - axolotl.integrations.liger.LigerPlugin
116 - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
117
118# === Hardware Optimization ===
119#gradient_checkpointing: offload
120#gradient_checkpointing_kwargs:
121# use_reentrant: false
122liger_rope: true
123liger_rms_norm: true
124liger_layer_norm: true
125liger_glu_activation: true
126cut_cross_entropy: true
127
128#deepspeed: axolotl/deepspeed_configs/zero3_bf16.json
129
130# === FSDP Config ===
131fsdp:
132 - full_shard
133 - auto_wrap
134fsdp_config:
135 fsdp_limit_all_gathers: true
136 fsdp_sync_module_states: true
137 fsdp_offload_params: true
138 fsdp_activation_checkpointing: true
139 fsdp_use_orig_params: false
140 fsdp_cpu_ram_efficient_loading: true
141 fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
142 fsdp_transformer_layer_cls_to_wrap: Qwen3DecoderLayer
143 fsdp_state_dict_type: FULL_STATE_DICT
144 fsdp_sharding_strategy: FULL_SHARD
145
146
147# === Wandb Tracking ===
148wandb_project: Qwen3
149# wandb_entity: [WANDB_ENTITY]
150# wandb_name: [WANDB_RUN_NAME]
151
152# === Checkpointing ===
153saves_per_epoch: 20
154save_total_limit: 1
155
156# === Advanced Settings ===
157output_dir: /workspace/aibox-standalone-pool/axolotl/qwen14b-ckpts
158bf16: auto
159flash_attention: true
160train_on_inputs: false
161group_by_length: false
162save_safetensors: true
163logging_steps: 1
164gc_steps: 10
165seed: 69
166