Views
No views yet
0.9.21base_model: giux78/zagreus-test-202000
2# Automatically upload checkpoint and final model to HF
3# hub_model_id: username/custom_model_name
4
5strict: false
6
7
8# === Datasets ===
9streaming: true
10datasets:
11 - path: /leonardo_work/EUHPC_A04_045/.data
12 type: chat_template
13 chat_template: tokenizer_default_fallback_llama3
14 field_messages: conversations
15 message_property_mappings:
16 role: from
17 content: value
18 roles_to_train: ["gpt", "assistant"]
19 train_on_eos: "turn"
20
21# === Sequencing / packing ===
22sequence_len: 4096
23sample_packing: true
24remove_unused_columns: false # <-- aggiungi questa riga
25eval_sample_packing: false
26pad_to_sequence_len: false
27streaming_multipack_buffer_size: 10000
28
29# === Ottimizzazione ===
30optimizer: adamw_torch_fused
31learning_rate: 2e-5
32lr_scheduler: cosine
33warmup_ratio: 0.1
34weight_decay: 0.0
35
36# === Batch (per GPU) ===
37micro_batch_size: 1
38gradient_accumulation_steps: 8
39# Eff. batch = micro_batch_size * grad_accum * num_gpus = 1 * 8 * 32 = 256
40
41# === Precisione / memoria ===
42bf16: auto
43tf32: true
44flash_attention: true
45gradient_checkpointing: true
46gradient_checkpointing_kwargs:
47 use_reentrant: false
48
49# === FSDP (Axolotl usa fsdp_config; la chiave "fsdp:" è deprecata) ===
50fsdp_config:
51 fsdp_sharding_strategy: FULL_SHARD # shard di param, grad e optimizer state
52 fsdp_auto_wrap_policy: TRANSFORMER_BASED_WRAP
53 fsdp_transformer_layer_cls_to_wrap: LlamaDecoderLayer
54 fsdp_use_orig_params: false
55 fsdp_sync_module_states: true
56 fsdp_limit_all_gathers: true
57 fsdp_cpu_ram_efficient_loading: true
58 fsdp_offload_params: false # attivalo solo se VRAM è stretta (vedi variante)
59 fsdp_state_dict_type: SHARDED_STATE_DICT # checkpoint più leggeri su cluster multi-nodo
60
61# === Loop di training ===
62num_epochs: 1 # con 170GB basta una passata
63# max_steps: 200000 # alternativa: budget a step/token
64
65# === Eval / checkpoint ===
66val_set_size: 0.01
67evals_per_epoch: 5
68save_steps: 2000 # salva ogni 2.000 step (metti il valore che preferisci)
69save_total_limit: 5
70logging_steps: 20
71
72# === Tracciamento ===
73wandb_mode: "offline"
74wandb_project: zagreus-350M-sft
75wandb_entity: mii-llm
76wandb_name: sft
77
78# === Token speciali ===
79special_tokens:
80 pad_token: <|end_of_text|>
81 eos_token: <|end_of_text|>
82| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0.0003 | 1 | 2.1506 |
| 3.6166 | 0.2003 | 681 | 2.1390 |
| 3.4709 | 0.4006 | 1362 | 2.2716 |
| 3.4327 | 0.6008 | 2043 | 2.2737 |
| 3.4102 | 0.8011 | 2724 | 2.2814 |