Views
No views yet
0.8.0.dev01# === Start-up Commands ===
2# curl -LsSf https://astral.sh/uv/install.sh | sh
3# export PATH="$HOME/.local/bin:$PATH"
4# git clone https://github.com/axolotl-ai-cloud/axolotl
5# cd axolotl
6# git checkout d8b4027200de0fe60f4ae0a71272c1a8cb2888f7
7# uv venv
8# source .venv/bin/activate
9# uv pip install packaging ninja setuptools huggingface_hub[cli,hf_transfer]
10# uv pip install "cut-cross-entropy[transformers] @ git+https://github.com/apple/ml-cross-entropy.git@24fbe4b5dab9a6c250a014573613c1890190536c"
11# uv pip install apollo-torch
12# uv pip install --no-build-isolation -e .[flash-attn,deepspeed]
13# uv pip install git+https://github.com/huggingface/transformers.git
14# export HF_HUB_ENABLE_HF_TRANSFER=1
15# huggingface-cli login --token $hf_key && wandb login $wandb_key
16# axolotl preprocess qwen21-pretrain.yml
17# axolotl train qwen21-pretrain.yml
18
19# curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH="$HOME/.local/bin:$PATH" && git clone https://github.com/axolotl-ai-cloud/axolotl && cd axolotl && uv venv && source .venv/bin/activate && uv pip install torch==2.5.1 packaging ninja setuptools huggingface_hub[cli,hf_transfer] && uv pip install "cut-cross-entropy[transformers] @ git+https://github.com/apple/ml-cross-entropy.git@24fbe4b5dab9a6c250a014573613c1890190536c" && uv pip install apollo-torch && uv pip install --no-build-isolation -e .[flash-attn,deepspeed] && uv pip install git+https://github.com/huggingface/transformers.git && export HF_HUB_ENABLE_HF_TRANSFER=1 && cd .. && huggingface-cli login --token $hf_key && wandb login $wandb_key
20
21# === Model Configuration ===
22base_model: Columbidae/gemma-2-24b-pruned
23load_in_8bit: false
24load_in_4bit: true
25
26# === HF Configuration ===
27hub_model_id: Columbidae/gemma-2-24b-retrained-base
28hub_strategy: "every_save"
29
30# === Training Setup ===
31num_epochs: 1
32micro_batch_size: 3
33gradient_accumulation_steps: 2
34sequence_len: 8192
35sample_packing: true
36pad_to_sequence_len: true
37
38# === Evaluation ===
39#val_set_size: 100
40#evals_per_epoch: 10
41#eval_table_size:
42#eval_max_new_tokens: 256
43#eval_sample_packing: true
44eval_strategy: "no"
45
46# === LoRA Configuration ===
47adapter: qlora
48lora_model_dir:
49lora_r: 64
50lora_alpha: 64
51lora_dropout: 0.5
52lora_target_linear:
53lora_fan_in_fan_out:
54lora_target_modules:
55 - gate_proj
56 - down_proj
57 - up_proj
58 - q_proj
59 - v_proj
60 - k_proj
61 - o_proj
62
63#lora_mlp_kernel: true
64#lora_qkv_kernel: true
65#lora_o_kernel: true
66
67# === Hyperparameter Configuration ===
68#optimizer: apollo_adamw_layerwise
69optimizer: paged_ademamix_8bit
70# Apollo-mini configuration:
71#optim_args: "proj=random,rank=1,scale=128.0,scale_type=tensor,update_proj_gap=200"
72# Regular Apollo configuration:
73# optim_args:
74#optim_target_modules: all_linear
75learning_rate: 1e-5
76lr_scheduler: rex
77weight_decay: 0.01
78warmup_ratio: 0.05
79
80
81# === Data Configuration ===
82shuffle_merged_datasets: true
83datasets:
84 - path: allura-org/roselily-furryinflation
85 type: completion
86 field: text
87 - path: allura-org/not_gutenberg_json
88 type: completion
89 field: text
90 split: train[:100]
91 - path: ToastyPigeon/roselily-v0-expanded-deduped
92 type: completion
93 field: text
94 split: train[:50%]
95 data_files:
96 - extra-pony-16k-dedup-small.json
97
98dataset_prepared_path: last_run_prepared
99# chat_template: tokenizer_default
100# Example custom template:
101# chat_template: jinja
102# chat_template_jinja: |
103# {{- bos_token }}{%- for message in messages %}
104# {%- if message['role'] == 'system' %}
105# {{- '[SYSTEM_PROMPT]' + message['content'] + '[/SYSTEM_PROMPT]' }}
106# {%- elif message['role'] == 'user' %}
107# {{- '[INST]' + message['content'] + '[/INST]' }}
108# {%- elif message['role'] == 'assistant' %}
109# {{- message['content'] + eos_token }}
110# {%- endif %}
111# {%- endfor %}
112
113# === Plugins ===
114plugins:
115 - axolotl.integrations.liger.LigerPlugin
116 - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
117
118# === Hardware Optimization ===
119gradient_checkpointing: offload
120#gradient_checkpointing_kwargs:
121# use_reentrant: true
122liger_rope: true
123liger_rms_norm: true
124liger_glu_activation: true
125#liger_fused_linear_cross_entropy: true
126unsloth_cross_entropy_loss: true
127cut_cross_entropy: true
128# Only if using multiple GPUs:
129deepspeed: axolotl/deepspeed_configs/zero3_bf16.json
130
131# === Wandb Tracking ===
132wandb_project: Gemma
133# wandb_entity: [WANDB_ENTITY]
134# wandb_name: [WANDB_RUN_NAME]
135
136# === Checkpointing ===
137saves_per_epoch: 20
138save_total_limit: 1
139
140# === Advanced Settings ===
141output_dir: ./ckpts
142bf16: auto
143flash_attention: true
144train_on_inputs: false
145group_by_length: false
146save_safetensors: true
147max_grad_norm: 10.0
148logging_steps: 1
149gc_steps: 10
150seed: 69