Views
No views yet
0.6.01# git clone https://github.com/axolotl-ai-cloud/axolotl
2# cd axolotl
3# git checkout d425d5d3c3ca7644a9da8ed93c3d03f4be0c4854
4# pip3 install packaging ninja huggingface_hub[cli]
5# pip install "cut-cross-entropy[transformers] @ git+https://github.com/apple/ml-cross-entropy.git"
6# pip3 install -e '.[flash-attn,deepspeed]'
7# apt update && apt install libopenmpi-dev
8# pip install mpi4py
9# huggingface-cli login --token $hf_key && wandb login $wandb_key
10# python -m axolotl.cli.preprocess qwen-32b-story.yml
11# medpace data analyst
12# accelerate launch -m axolotl.cli.train qwen-32b-story.yml
13# python -m axolotl.cli.merge_lora qwen-32b-story.yml
14# huggingface-cli upload ToastyPigeon/new-ms-rp-test-v0-v3 train-workspace/merged . --exclude "*.md"
15
16# git clone https://github.com/axolotl-ai-cloud/axolotl && cd axolotl && git checkout d8b4027200de0fe60f4ae0a71272c1a8cb2888f7 && pip3 install packaging ninja huggingface_hub[cli,hf_transfer] && pip3 install -e '.[flash-attn,deepspeed]' && cd .. && huggingface-cli login --token $hf_key && wandb login $wandb_key
17
18# Model
19base_model: Qwen/Qwen2.5-32B
20model_type: AutoModelForCausalLM
21tokenizer_type: AutoTokenizer
22
23load_in_8bit: false
24load_in_4bit: true
25strict: false
26bf16: true
27fp16:
28tf32: false
29flash_attention: true
30special_tokens:
31
32# Output
33output_dir: ./train-workspace
34hub_model_id: ToastyPigeon/qwen32-story-ws-v2
35hub_strategy: "checkpoint"
36resume_from_checkpoint:
37saves_per_epoch: 4
38
39# Data
40sequence_len: 4096 # fits
41min_sample_len: 128
42dataset_prepared_path: last_run_prepared
43datasets:
44 - path: ToastyPigeon/story-samples
45 type: completion
46 field: text
47 split: train[:1500]
48warmup_ratio: 0.05
49shuffle_merged_datasets: true
50sample_packing: true
51#pad_to_sequence_len: true
52
53# Batching
54num_epochs: 1
55gradient_accumulation_steps: 4
56micro_batch_size: 1
57eval_batch_size: 1
58
59# Evaluation
60val_set_size: 200
61evals_per_epoch: 10
62eval_table_size:
63eval_max_new_tokens: 256
64eval_sample_packing: true
65
66save_safetensors: true
67
68# WandB
69wandb_project: Qwen-Test
70#wandb_entity:
71
72gradient_checkpointing: 'unsloth'
73#gradient_checkpointing_kwargs:
74# use_reentrant: false
75
76unsloth_cross_entropy_loss: true
77#unsloth_lora_mlp: true
78#unsloth_lora_qkv: true
79#unsloth_lora_o: true
80
81# LoRA
82adapter: qlora
83lora_model_dir:
84lora_r: 32
85lora_alpha: 32
86lora_dropout: 0.5
87lora_target_linear:
88lora_fan_in_fan_out:
89lora_target_modules:
90 - gate_proj
91 - down_proj
92 - up_proj
93 - q_proj
94 - v_proj
95 - k_proj
96 - o_proj
97lora_modules_to_save:
98#peft_layers_to_transform: [35,36,37,38,39]
99
100# Optimizer
101optimizer: paged_ademamix_8bit # adamw_8bit
102lr_scheduler: cosine
103learning_rate: 5e-5
104cosine_min_lr_ratio: 0.5
105weight_decay: 0.01
106max_grad_norm: 1.0
107
108# Misc
109train_on_inputs: false
110#group_by_length: true
111early_stopping_patience:
112local_rank:
113logging_steps: 1
114xformers_attention:
115debug:
116deepspeed: /workspace/axolotl/deepspeed_configs/zero3_bf16.json # previously blank
117fsdp:
118fsdp_config:
119
120plugins:
121 - axolotl.integrations.liger.LigerPlugin
122# - axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
123#cut_cross_entropy: true
124liger_rope: true
125liger_rms_norm: true
126liger_layer_norm: true
127liger_glu_activation: true
128liger_fused_linear_cross_entropy: true
129
130gc_steps: 10
131seed: 69| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.1763 | 0.0092 | 1 | 2.3021 |
| 2.129 | 0.1014 | 11 | 2.2997 |
| 2.2385 | 0.2028 | 22 | 2.2945 |
| 2.233 | 0.3041 | 33 | 2.2906 |
| 2.0907 | 0.4055 | 44 | 2.2874 |
| 2.2263 | 0.5069 | 55 | 2.2848 |
| 2.2703 | 0.6083 | 66 | 2.2828 |
| 2.4101 | 0.7097 | 77 | 2.2813 |
| 2.2473 | 0.8111 | 88 | 2.2800 |
| 2.1912 | 0.9124 | 99 | 2.2790 |