Views
No views yet
0.13.0.dev01# ===== Modelo =====
2base_model: meta-llama/Llama-3.1-8B
3tokenizer_type: AutoTokenizer
4trust_remote_code: true
5
6# Llama 3.1 é derivado de Llama, isso ajuda Axolotl a aplicar otmizações corretas
7is_llama_derived_model: true
8
9# Template de conversa
10chat_template: chatml
11
12plugins:
13 - axolotl.integrations.liger.LigerPlugin
14
15special_tokens:
16 pad_token: "<|eot_id|>"
17
18# ===== Dataset (Nemotron Post-Training SFT) =====
19datasets:
20 - path: nvidia/Llama-Nemotron-Post-Training-Dataset
21 name: SFT # subset da HF
22 split: chat # você pode duplicar este bloco para math_v1.1, science, etc.
23 type: chat_template
24 field_messages: input # coluna com a lista de {role, content}
25 # Se os campos já forem "role" e "content", não precisa do mapping abaixo.
26 message_property_mappings:
27 role: role
28 content: content
29 # A coluna "output" é a resposta; o Axolotl converte input+output em conversa interna.
30 field_output: output
31
32# Não treinar nos tokens do usuário/system
33train_on_inputs: false
34
35# ===== Comprimento de contexto =====
36sequence_len: 8192
37eval_sequence_len: 8192
38pad_to_sequence_len: true
39sample_packing: true
40sample_packing_group_size: 100000
41sample_packing_bin_size: 200
42group_by_length: true
43
44# ===== Batch / epochs – hiperparâmetros do paper =====
45micro_batch_size: 1 # per-device batch size
46gradient_accumulation_steps: 8 # 4 GPUs -> effective batch = 32
47num_epochs: 2
48
49# (opcional) se quiser deixar explícito que você tem 4 GPUs para DP
50# dp_shard_size: 4
51
52# ===== Otimizador / LR =====
53learning_rate: 2.0e-5
54optimizer: adamw_torch_fused
55adam_beta1: 0.9
56adam_beta2: 0.999
57adam_epsilon: 1.0e-8
58
59lr_scheduler: cosine
60warmup_steps: 100
61weight_decay: 0.0 # paper não especifica, então deixei 0.0 (padrão)
62
63# ===== Precisão / memória =====
64bf16: true # ou "auto" se preferir
65tf32: true
66gradient_checkpointing: true
67activation_offloading: false
68
69# ===== Eval / logging / checkpoints =====
70val_set_size: 0.01 # 1% do dataset para validação (ajuste se quiser)
71eval_strategy: steps
72eval_steps: 100
73
74save_strategy: steps
75save_steps: 100
76save_total_limit: 3
77save_only_model: false
78save_safetensors: true
79load_best_model_at_end: true
80metric_for_best_model: eval_loss
81greater_is_better: false
82
83logging_steps: 10
84
85# ===== Saída / reproducibilidade / tracking =====
86output_dir: ./outputs/llama31_8b_nemotron_full_sft
87seed: 42
88
89use_wandb: true
90wandb_project: "llama31_nemotron_sft"
91wandb_name: "llama31-8b-full-sft-chatml"
92| Training Loss | Epoch | Step | Validation Loss | Active (gib) | Allocated (gib) | Reserved (gib) |
|---|---|---|---|---|---|---|
| No log | 0 | 0 | 3.7258 | 27.81 | 27.81 | 28.15 |
| 1.2797 | 0.3498 | 100 | 1.2345 | 61.65 | 61.65 | 87.65 |
| 0.9685 | 0.6996 | 200 | 0.9419 | 61.65 | 61.65 | 88.96 |
| 0.5627 | 1.0490 | 300 | 0.7959 | 61.65 | 61.65 | 88.27 |
| 0.4859 | 1.3988 | 400 | 0.6849 | 61.65 | 61.65 | 88.96 |
| 0.4636 | 1.7486 | 500 | 0.6628 | 61.65 | 61.65 | 88.96 |