Views
No views yet
0.16.11# ─────────────────────────────────────────────────────────────────────────────
2# Axolotl config: Qwen2.5-7B-Instruct + LoRA (NO quantization)
3# GPU: 4× RTX 2080 (32GB total) — DeepSpeed ZeRO-3 shards 14GB model across GPUs
4#
5# WHY Qwen2.5-7B-Instruct (not Math):
6# The Math variant is over-specialized for \boxed{} problem solving and breaks
7# under FP16 inference on Turing. The general Instruct base is robust,
8# has strong math knowledge from pretraining, and is the correct base for
9# a conversational tutoring task.
10#
11# WHY no quantization:
12# Full FP16 LoRA has no quantization noise in activations → cleaner gradients
13# → better adapter quality. With 4 GPUs and ZeRO-3 this is feasible.
14#
15# Launch with:
16# deepspeed --num_gpus 4 --module axolotl.cli.train training/qwen25_7b_lora_4gpu.yaml
17# ─────────────────────────────────────────────────────────────────────────────
18
19base_model: Qwen/Qwen2.5-7B-Instruct
20model_type: AutoModelForCausalLM
21tokenizer_type: AutoTokenizer
22
23# ── Data ──────────────────────────────────────────────────────────────────────
24datasets:
25 - path: final_ft_dataset/train.jsonl
26 type: alpaca
27 field_instruction: instruction
28 field_input: input
29 field_output: output
30
31test_datasets:
32 - path: final_ft_dataset/val.jsonl
33 type: alpaca
34 field_instruction: instruction
35 field_input: input
36 field_output: output
37 max_samples: 20 # eval on 20 examples — fast, still meaningful signal
38
39dataset_prepared_path: training/.prepared_qwen25_7b
40val_set_size: 0 # don't carve eval from train.jsonl; use test_datasets above
41
42sequence_len: 1024 # reduced from 2048 to fit 11GB GPUs; covers ≥95% of dataset
43sample_packing: false
44train_on_inputs: false # CRITICAL: loss on output tokens only
45
46# ── LoRA (no quantization) ────────────────────────────────────────────────────
47adapter: lora # plain LoRA, not qlora
48lora_r: 32
49lora_alpha: 64
50lora_dropout: 0.05
51lora_target_linear: true # all linear layers
52lora_fan_in_fan_out: false
53
54# Disable Axolotl fused LoRA kernels — designed for Ampere+, cause OOM on Turing (RTX 2080)
55lora_qkv_kernel: false
56lora_mlp_kernel: false
57lora_o_kernel: false
58
59# ── Training ──────────────────────────────────────────────────────────────────
60output_dir: /scratch/atharv.johar/AOLM/outputs/qwen25_7b_4gpu_lora_r32
61
62num_epochs: 3
63micro_batch_size: 1 # per GPU; effective batch = 1 × 4 GPUs × 8 accum = 32
64gradient_accumulation_steps: 8
65optimizer: adamw_torch_fused
66lr_scheduler: cosine
67learning_rate: 2e-4
68weight_decay: 0.0
69max_grad_norm: 1.0
70warmup_ratio: 0.03
71
72gradient_checkpointing: true
73
74# ── Precision ─────────────────────────────────────────────────────────────────
75bf16: false
76fp16: true # Turing has FP16 tensor cores; no BF16 hardware
77tf32: false
78
79# ── DeepSpeed ZeRO-3 ─────────────────────────────────────────────────────────
80deepspeed: training/deepspeed_zero3.json
81
82# ── Logging & checkpointing ───────────────────────────────────────────────────
83logging_steps: 10
84eval_steps: 100 # evaluate every 100 steps on the 20-sample val set
85save_steps: 100
86save_total_limit: 3
87
88wandb_project: aolm-ft
89wandb_run_id: qwen25-7b-lora-r32-4gpu-noquant
90wandb_watch: "false"
91
92seed: 42
93| Training Loss | Epoch | Step | Validation Loss | Ppl | Active (gib) | Allocated (gib) | Reserved (gib) |
|---|---|---|---|---|---|---|---|
| No log | 0 | 0 | 2.0092 | 7.4574 | 4.68 | 4.68 | 8.83 |
| 0.1003 | 0.8273 | 100 | 0.0996 | 1.1047 | 4.75 | 4.75 | 9.31 |
| 0.0641 | 1.6536 | 200 | 0.0750 | 1.0779 | 4.75 | 4.75 | 9.65 |
| 0.0295 | 2.4798 | 300 | 0.0748 | 1.0777 | 4.75 | 4.75 | 9.71 |
| 0.0257 | 3.0 | 363 | 0.0749 | 1.0778 | 6.56 | 5.98 | 9.54 |