WangXFng commited on
Commit
23709db
·
verified ·
1 Parent(s): a03cfdc

Model save

Browse files
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
 
2
  library_name: peft
3
  license: llama3.2
4
- base_model: meta-llama/Llama-3.2-1B-Instruct
5
  tags:
6
  - generated_from_trainer
7
  model-index:
@@ -39,7 +39,7 @@ The following hyperparameters were used during training:
39
  - seed: 42
40
  - gradient_accumulation_steps: 16
41
  - total_train_batch_size: 256
42
- - optimizer: Use adamw_hf with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
43
  - lr_scheduler_type: linear
44
  - lr_scheduler_warmup_steps: 2
45
  - num_epochs: 4
@@ -50,7 +50,7 @@ The following hyperparameters were used during training:
50
 
51
  ### Framework versions
52
 
53
- - PEFT 0.14.0
54
- - Transformers 4.47.1
55
- - Pytorch 2.5.1
56
- - Tokenizers 0.21.0
 
1
  ---
2
+ base_model: meta-llama/Llama-3.2-1B-Instruct
3
  library_name: peft
4
  license: llama3.2
 
5
  tags:
6
  - generated_from_trainer
7
  model-index:
 
39
  - seed: 42
40
  - gradient_accumulation_steps: 16
41
  - total_train_batch_size: 256
42
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
43
  - lr_scheduler_type: linear
44
  - lr_scheduler_warmup_steps: 2
45
  - num_epochs: 4
 
50
 
51
  ### Framework versions
52
 
53
+ - PEFT 0.13.0
54
+ - Transformers 4.45.2
55
+ - Pytorch 2.4.0
56
+ - Tokenizers 0.20.0
adapter_config.json CHANGED
@@ -3,8 +3,6 @@
3
  "auto_mapping": null,
4
  "base_model_name_or_path": "meta-llama/Llama-3.2-1B-Instruct",
5
  "bias": "none",
6
- "eva_config": null,
7
- "exclude_modules": null,
8
  "fan_in_fan_out": false,
9
  "inference_mode": true,
10
  "init_lora_weights": true,
@@ -13,7 +11,6 @@
13
  "layers_to_transform": null,
14
  "loftq_config": {},
15
  "lora_alpha": 32,
16
- "lora_bias": false,
17
  "lora_dropout": 0.05,
18
  "megatron_config": null,
19
  "megatron_core": "megatron.core",
@@ -23,10 +20,10 @@
23
  "rank_pattern": {},
24
  "revision": null,
25
  "target_modules": [
26
- "q_proj",
27
  "v_proj",
28
- "o_proj",
29
  "down_proj",
 
 
30
  "up_proj",
31
  "k_proj",
32
  "gate_proj"
 
3
  "auto_mapping": null,
4
  "base_model_name_or_path": "meta-llama/Llama-3.2-1B-Instruct",
5
  "bias": "none",
 
 
6
  "fan_in_fan_out": false,
7
  "inference_mode": true,
8
  "init_lora_weights": true,
 
11
  "layers_to_transform": null,
12
  "loftq_config": {},
13
  "lora_alpha": 32,
 
14
  "lora_dropout": 0.05,
15
  "megatron_config": null,
16
  "megatron_core": "megatron.core",
 
20
  "rank_pattern": {},
21
  "revision": null,
22
  "target_modules": [
 
23
  "v_proj",
 
24
  "down_proj",
25
+ "q_proj",
26
+ "o_proj",
27
  "up_proj",
28
  "k_proj",
29
  "gate_proj"
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2732480d838f6a594720039f553bf95f76c81ef8d5bfcda0a43aee9cebe059d4
3
  size 1103312056
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b18f29da02c62e5c2a05f485a8bfdf25f5714242477af3bc367c82510e1b0b2
3
  size 1103312056
config.json CHANGED
@@ -33,7 +33,7 @@
33
  "rope_theta": 500000.0,
34
  "tie_word_embeddings": true,
35
  "torch_dtype": "bfloat16",
36
- "transformers_version": "4.47.1",
37
  "use_cache": true,
38
  "vocab_size": 129174
39
  }
 
33
  "rope_theta": 500000.0,
34
  "tie_word_embeddings": true,
35
  "torch_dtype": "bfloat16",
36
+ "transformers_version": "4.45.2",
37
  "use_cache": true,
38
  "vocab_size": 129174
39
  }
tokenizer_config.json CHANGED
@@ -9397,7 +9397,6 @@
9397
  "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- System message #}\n{{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n{%- if tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n{%- endif %}\n{{- \"Cutting Knowledge Date: December 2023\\n\" }}\n{{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n{%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n{%- endif %}\n{{- system_message }}\n{{- \"<|eot_id|>\" }}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {{- \"<|eot_id|>\" }}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
9398
  "clean_up_tokenization_spaces": true,
9399
  "eos_token": "<|eot_id|>",
9400
- "extra_special_tokens": {},
9401
  "model_input_names": [
9402
  "input_ids",
9403
  "attention_mask"
 
9397
  "chat_template": "{{- bos_token }}\n{%- if custom_tools is defined %}\n {%- set tools = custom_tools %}\n{%- endif %}\n{%- if not tools_in_user_message is defined %}\n {%- set tools_in_user_message = true %}\n{%- endif %}\n{%- if not date_string is defined %}\n {%- if strftime_now is defined %}\n {%- set date_string = strftime_now(\"%d %b %Y\") %}\n {%- else %}\n {%- set date_string = \"26 Jul 2024\" %}\n {%- endif %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = none %}\n{%- endif %}\n\n{#- This block extracts the system message, so we can slot it into the right place. #}\n{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n{%- endif %}\n\n{#- System message #}\n{{- \"<|start_header_id|>system<|end_header_id|>\\n\\n\" }}\n{%- if tools is not none %}\n {{- \"Environment: ipython\\n\" }}\n{%- endif %}\n{{- \"Cutting Knowledge Date: December 2023\\n\" }}\n{{- \"Today Date: \" + date_string + \"\\n\\n\" }}\n{%- if tools is not none and not tools_in_user_message %}\n {{- \"You have access to the following functions. To call a function, please respond with JSON for a function call.\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n{%- endif %}\n{{- system_message }}\n{{- \"<|eot_id|>\" }}\n\n{#- Custom tools are passed in a user message with some extra guidance #}\n{%- if tools_in_user_message and not tools is none %}\n {#- Extract the first user message so we can plug it in here #}\n {%- if messages | length != 0 %}\n {%- set first_user_message = messages[0]['content']|trim %}\n {%- set messages = messages[1:] %}\n {%- else %}\n {{- raise_exception(\"Cannot put tools in the first user message when there's no first user message!\") }}\n{%- endif %}\n {{- '<|start_header_id|>user<|end_header_id|>\\n\\n' -}}\n {{- \"Given the following functions, please respond with a JSON for a function call \" }}\n {{- \"with its proper arguments that best answers the given prompt.\\n\\n\" }}\n {{- 'Respond in the format {\"name\": function name, \"parameters\": dictionary of argument name and its value}.' }}\n {{- \"Do not use variables.\\n\\n\" }}\n {%- for t in tools %}\n {{- t | tojson(indent=4) }}\n {{- \"\\n\\n\" }}\n {%- endfor %}\n {{- first_user_message + \"<|eot_id|>\"}}\n{%- endif %}\n\n{%- for message in messages %}\n {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}\n {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\\n\\n'+ message['content'] | trim + '<|eot_id|>' }}\n {%- elif 'tool_calls' in message %}\n {%- if not message.tool_calls|length == 1 %}\n {{- raise_exception(\"This model only supports single tool-calls at once!\") }}\n {%- endif %}\n {%- set tool_call = message.tool_calls[0].function %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' -}}\n {{- '{\"name\": \"' + tool_call.name + '\", ' }}\n {{- '\"parameters\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- \"}\" }}\n {{- \"<|eot_id|>\" }}\n {%- elif message.role == \"tool\" or message.role == \"ipython\" %}\n {{- \"<|start_header_id|>ipython<|end_header_id|>\\n\\n\" }}\n {%- if message.content is mapping or message.content is iterable %}\n {{- message.content | tojson }}\n {%- else %}\n {{- message.content }}\n {%- endif %}\n {{- \"<|eot_id|>\" }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|start_header_id|>assistant<|end_header_id|>\\n\\n' }}\n{%- endif %}\n",
9398
  "clean_up_tokenization_spaces": true,
9399
  "eos_token": "<|eot_id|>",
 
9400
  "model_input_names": [
9401
  "input_ids",
9402
  "attention_mask"
trainer_state.json CHANGED
@@ -10,68 +10,68 @@
10
  "log_history": [
11
  {
12
  "epoch": 0.4854368932038835,
13
- "grad_norm": 11.98136043548584,
14
  "learning_rate": 8.794946550048592e-05,
15
- "loss": 14.4561,
16
  "step": 250
17
  },
18
  {
19
  "epoch": 0.970873786407767,
20
- "grad_norm": 11.208343505859375,
21
  "learning_rate": 7.580174927113704e-05,
22
- "loss": 7.3145,
23
  "step": 500
24
  },
25
  {
26
  "epoch": 1.4563106796116505,
27
- "grad_norm": 10.085871696472168,
28
  "learning_rate": 6.365403304178815e-05,
29
- "loss": 6.2815,
30
  "step": 750
31
  },
32
  {
33
  "epoch": 1.941747572815534,
34
- "grad_norm": 9.594468116760254,
35
  "learning_rate": 5.150631681243926e-05,
36
- "loss": 5.9342,
37
  "step": 1000
38
  },
39
  {
40
  "epoch": 2.4271844660194173,
41
- "grad_norm": 8.205252647399902,
42
  "learning_rate": 3.9358600583090386e-05,
43
- "loss": 5.7463,
44
  "step": 1250
45
  },
46
  {
47
  "epoch": 2.912621359223301,
48
- "grad_norm": 8.472267150878906,
49
  "learning_rate": 2.72108843537415e-05,
50
- "loss": 5.6393,
51
  "step": 1500
52
  },
53
  {
54
  "epoch": 3.3980582524271843,
55
- "grad_norm": 8.200423240661621,
56
  "learning_rate": 1.5063168124392615e-05,
57
- "loss": 5.4863,
58
  "step": 1750
59
  },
60
  {
61
  "epoch": 3.883495145631068,
62
- "grad_norm": 7.509068965911865,
63
  "learning_rate": 2.915451895043732e-06,
64
- "loss": 5.4096,
65
  "step": 2000
66
  },
67
  {
68
  "epoch": 4.0,
69
  "step": 2060,
70
- "total_flos": 5.02338223728341e+17,
71
- "train_loss": 6.985684559646162,
72
- "train_runtime": 10644.5792,
73
- "train_samples_per_second": 49.541,
74
- "train_steps_per_second": 0.194
75
  }
76
  ],
77
  "logging_steps": 250,
@@ -91,7 +91,7 @@
91
  "attributes": {}
92
  }
93
  },
94
- "total_flos": 5.02338223728341e+17,
95
  "train_batch_size": 16,
96
  "trial_name": null,
97
  "trial_params": null
 
10
  "log_history": [
11
  {
12
  "epoch": 0.4854368932038835,
13
+ "grad_norm": 0.8612512350082397,
14
  "learning_rate": 8.794946550048592e-05,
15
+ "loss": 0.9361,
16
  "step": 250
17
  },
18
  {
19
  "epoch": 0.970873786407767,
20
+ "grad_norm": 0.882792592048645,
21
  "learning_rate": 7.580174927113704e-05,
22
+ "loss": 0.4637,
23
  "step": 500
24
  },
25
  {
26
  "epoch": 1.4563106796116505,
27
+ "grad_norm": 0.7288907766342163,
28
  "learning_rate": 6.365403304178815e-05,
29
+ "loss": 0.3773,
30
  "step": 750
31
  },
32
  {
33
  "epoch": 1.941747572815534,
34
+ "grad_norm": 0.7898958325386047,
35
  "learning_rate": 5.150631681243926e-05,
36
+ "loss": 0.3425,
37
  "step": 1000
38
  },
39
  {
40
  "epoch": 2.4271844660194173,
41
+ "grad_norm": 0.7035888433456421,
42
  "learning_rate": 3.9358600583090386e-05,
43
+ "loss": 0.3212,
44
  "step": 1250
45
  },
46
  {
47
  "epoch": 2.912621359223301,
48
+ "grad_norm": 0.7669738531112671,
49
  "learning_rate": 2.72108843537415e-05,
50
+ "loss": 0.3091,
51
  "step": 1500
52
  },
53
  {
54
  "epoch": 3.3980582524271843,
55
+ "grad_norm": 0.7301594018936157,
56
  "learning_rate": 1.5063168124392615e-05,
57
+ "loss": 0.2961,
58
  "step": 1750
59
  },
60
  {
61
  "epoch": 3.883495145631068,
62
+ "grad_norm": 0.6761432886123657,
63
  "learning_rate": 2.915451895043732e-06,
64
+ "loss": 0.2897,
65
  "step": 2000
66
  },
67
  {
68
  "epoch": 4.0,
69
  "step": 2060,
70
+ "total_flos": 5.02561395295531e+17,
71
+ "train_loss": 0.4131525734095898,
72
+ "train_runtime": 6771.2897,
73
+ "train_samples_per_second": 77.88,
74
+ "train_steps_per_second": 0.304
75
  }
76
  ],
77
  "logging_steps": 250,
 
91
  "attributes": {}
92
  }
93
  },
94
+ "total_flos": 5.02561395295531e+17,
95
  "train_batch_size": 16,
96
  "trial_name": null,
97
  "trial_params": null
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f190173de478fd494cc1496b844a09f5ab571440d89be552908a3d995152da95
3
- size 5304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6a0c99b0cfdab87b2889b420d51b85c5da8ce3804ab1449a0108b8c05d84877
3
+ size 5240