Views
No views yet
0.10.01# Configure the base model and output directory
2base_model: NousResearch/Llama-3.2-1B
3output_dir: ./outputs/lora-out
4
5# Lora configuration
6load_in_8bit: true
7load_in_4bit: false
8strict: false
9adapter: lora
10lora_r: 32
11lora_alpha: 16
12lora_dropout: 0.05
13lora_target_linear: true
14lora_fan_in_fan_out:
15lora_target_modules:
16 - gate_proj
17 - down_proj
18 - up_proj
19 - q_proj
20 - v_proj
21 - k_proj
22 - o_proj
23
24
25# Data configuration
26chat_template: llama3
27datasets:
28 - path: chatml_training_data.jsonl
29 type: chat_template
30 field_messages: conversations
31dataset_prepared_path: last_run_prepared
32
33test_datasets:
34 - path: chatml_evaluation_data.jsonl
35 type: chat_template
36 field_messages: conversations
37 split: train
38
39sequence_len: 2048
40sample_packing: true
41eval_sample_packing: false # with a larger eval dataset, we would do this, but we don't have a large enough one today.
42pad_to_sequence_len: true
43
44# [optional] weights and biases configuration
45wandb_project:
46wandb_entity:
47wandb_watch:
48wandb_name:
49wandb_log_model:
50
51# Training hyperparameters
52gradient_accumulation_steps: 4
53micro_batch_size: 2
54num_epochs: 10
55optimizer: adamw_bnb_8bit
56lr_scheduler: cosine
57learning_rate: 0.0002
58
59# Masking
60train_on_inputs: false
61group_by_length: false
62bf16: auto
63fp16:
64tf32: false
65
66gradient_checkpointing: true
67early_stopping_patience:
68resume_from_checkpoint:
69local_rank:
70logging_steps: 1
71xformers_attention:
72flash_attention: true
73
74loss_watchdog_threshold: 5.0
75loss_watchdog_patience: 3
76
77warmup_steps: 10
78save_strategy: steps
79save_steps: 10
80eval_strategy: steps
81eval_steps: 10
82eval_table_size:
83eval_max_new_tokens: 128
84debug:
85deepspeed:
86weight_decay: 0.0
87fsdp:
88fsdp_config:
89special_tokens:
90 pad_token: <|finetune_right_pad_id|>
91 eos_token: <|eot_id|>
92
93# Added for saving best checkpoint and pushing to Hugging Face Hub
94save_only_k_checkpoints: 1
95save_total_limit: 1
96load_best_model_at_end: true
97metric_for_best_model: eval_loss # Or any other metric you want to track
98greater_is_better: false # True if the metric should be maximized, False if minimized
99
100# Push to Hugging Face Hub
101# push_to_hub: false
102# hub_model_id: your_huggingface_username/your_model_name # Replace with your desired repo ID
103# hub_private_repo: false # Set to true if you want a private repo
104# hub_always_push: false
105# hub_strategy: every_save # "end" to push only at the end of training
106| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0 | 0 | 0.8705 |
| 0.561 | 2.0 | 10 | 0.5094 |
| 0.3346 | 4.0 | 20 | 0.3791 |
| 0.2661 | 6.0 | 30 | 0.3666 |
| 0.2516 | 8.0 | 40 | 0.3590 |