File size: 3,363 Bytes
f6bdcf7
 
18257ed
f6bdcf7
 
 
 
 
 
 
 
f374bb6
f6bdcf7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c58ed8b
 
f6bdcf7
 
 
 
 
8ef55a9
eab09f4
c58ed8b
 
18257ed
 
c58ed8b
f6bdcf7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0a1769d
 
 
 
 
 
 
 
 
 
 
 
15ea6e6
 
 
0a1769d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15ea6e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6bdcf7
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
  "model_config": {
    "model_name_or_path": "unsloth/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit",
    "use_cache": false,
    "rope_scaling": {
      "type": "dynamic",
      "factor": 2.0
    }
  },
  "training_config": {
    "num_train_epochs": 3,
    "per_device_train_batch_size": 4,
    "gradient_accumulation_steps": 4,
    "learning_rate": 2e-5,
    "lr_scheduler_type": "cosine",
    "warmup_ratio": 0.03,
    "weight_decay": 0.01,
    "optim": "adamw_torch",
    "max_grad_norm": 0.3,
    "max_seq_length": 2048,
    "logging_steps": 10,
    "save_steps": 200,
    "save_total_limit": 3,
    "evaluation_strategy": "steps",
    "eval_steps": 200,
    "load_best_model_at_end": true,
    "output_dir": "fine_tuned_model",
    "disable_tqdm": false,
    "report_to": ["tensorboard"],
    "logging_first_step": true,
    "dataloader_num_workers": 4
  },
  "hardware_config": {
    "fp16": true,
    "bf16": false,
    "gradient_checkpointing": true,
    "device_map": "auto",
    "attn_implementation": "eager",
    "use_flash_attention": false,
    "memory_optimization": {
      "expandable_segments": true,
      "max_memory_fraction": 0.95
    }
  },
  "quantization_config": {
    "load_in_4bit": true,
    "bnb_4bit_compute_dtype": "float16",
    "bnb_4bit_quant_type": "nf4",
    "bnb_4bit_use_double_quant": true
  },
  "lora_config": {
    "r": 16,
    "lora_alpha": 32,
    "lora_dropout": 0.05,
    "bias": "none",
    "target_modules": [
      "q_proj",
      "k_proj",
      "v_proj",
      "o_proj",
      "gate_proj",
      "up_proj",
      "down_proj"
    ]
  },
  "dataset_config": {
    "sort_by_field": "prompt_number",
    "max_tokens": 2048,
    "text_field": "conversations",
    "training_phase_only": true,
    "pre_tokenized": true,
    "input_ids_field": "input_ids",
    "skip_tokenization": true
  },
  "deepspeed_config": {
    "zero_optimization": {
      "stage": 2,
      "offload_optimizer": {
        "device": "cpu",
        "pin_memory": true
      },
      "contiguous_gradients": true,
      "overlap_comm": true,
      "reduce_scatter": true,
      "reduce_bucket_size": 5e8,
      "allgather_bucket_size": 5e8,
      "allgather_partitions": true,
      "allgather_no_copy": true
    },
    "gradient_accumulation_steps": 4,
    "gradient_clipping": 0.3,
    "fp16": {
      "enabled": true,
      "loss_scale": 0,
      "loss_scale_window": 1000,
      "initial_scale_power": 16,
      "hysteresis": 2,
      "min_loss_scale": 1
    },
    "optimizer": {
      "type": "AdamW",
      "params": {
        "lr": 2e-5,
        "betas": [0.9, 0.999],
        "eps": 1e-8,
        "weight_decay": 0.01
      }
    },
    "activation_checkpointing": {
      "partition_activations": true,
      "cpu_checkpointing": true,
      "contiguous_memory_optimization": true,
      "number_checkpoints": null,
      "synchronize_checkpoint_boundary": false,
      "profile": false
    },
    "steps_per_print": 10,
    "train_batch_size": "auto",
    "train_micro_batch_size_per_gpu": "auto",
    "wall_clock_breakdown": false,
    "communication_data_type": "fp16",
    "comms_logger": {
      "enabled": false
    },
    "amp": {
      "enabled": false
    },
    "aio": {
      "block_size": 1048576,
      "queue_depth": 8,
      "thread_count": 1,
      "single_submit": false,
      "overlap_events": true
    }
  }
}