15juneee commited on
Commit
cafcb4d
·
verified ·
1 Parent(s): 9e07fa5

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: meta-llama/Llama-3.2-3B-Instruct
4
+ datasets:
5
+ - 15juneee/hr-practitioner-adapted-v1
6
+ tags:
7
+ - hr
8
+ - adaption-autoscientist
9
+ - lora
10
+ language:
11
+ - en
12
+ ---
13
+
14
+ # HR Practitioner (hr)
15
+
16
+ Fine-tuned for HR and people operations, trained with
17
+ [Adaption AutoScientist](https://docs.adaptionlabs.ai/guides/autoscientist-api/) for the
18
+ AutoScientist Challenge (Part 2).
19
+
20
+ - **Base model:** `meta-llama/Llama-3.2-3B-Instruct`
21
+ - **Training data:** [`15juneee/hr-practitioner-adapted-v1`](https://huggingface.co/datasets/15juneee/hr-practitioner-adapted-v1)
22
+ (also on [Kaggle](https://www.kaggle.com/datasets/junesdata/hr-practitioner-adapted-v1))
23
+ - **Method:** AutoScientist co-optimised data adaptation and training recipe
24
+
25
+ ## Measured improvement
26
+
27
+ AutoScientist reported **best_win_rate = 0.5492** over 2 iterations against `meta-llama/Llama-3.2-3B-Instruct` - i.e. the fine-tuned model is preferred over its own baseline in 54.9% of comparisons. An earlier 5-iteration run of the same dataset reached 0.5674 before the job wedged at iteration 4/5 and had to be cancelled, so 0.5492 is the reproducible, completed figure.
28
+
29
+ Evaluation methodology, including the position-swap and dual-judge controls, is in
30
+ `EVAL.md` in the project repository. The held-out split used is published alongside the
31
+ training data so the number can be reproduced.
32
+
33
+ ## Intended use and limitations
34
+
35
+ Intended for HR and people operations assistance. **Output is not legal advice.** Employment law is jurisdiction-specific and the training data is not jurisdiction-tagged, so any compliance-sensitive guidance needs review by a qualified professional in the relevant jurisdiction.
36
+
37
+ Training data is drawn from English-language job adverts and generic HR questions weighted toward salaried office employment.
38
+
39
+ ## Reproducing
40
+
41
+ The dataset build, training pipeline and evaluation harness are all scripted; see the
42
+ project repository.
adapter_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "togethercomputer/Meta-Llama-3.2-3B-Instruct-Reference__TOG__FT",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": [],
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "r": 16,
24
+ "rank_pattern": {},
25
+ "revision": null,
26
+ "target_modules": [
27
+ "gate_proj",
28
+ "v_proj",
29
+ "up_proj",
30
+ "down_proj",
31
+ "o_proj",
32
+ "k_proj",
33
+ "q_proj"
34
+ ],
35
+ "task_type": "CAUSAL_LM",
36
+ "trainable_token_indices": null,
37
+ "use_dora": false,
38
+ "use_rslora": false
39
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50cdd02bcab4ed669c2d113478231d85a5caa3e102a5ca7b7da951ff915d930d
3
+ size 97307544
chat_template.jinja ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token }}
2
+ {%- if custom_tools is defined %}
3
+ {%- set tools = custom_tools %}
4
+ {%- endif %}
5
+ {%- if not tools_in_user_message is defined %}
6
+ {%- set tools_in_user_message = true %}
7
+ {%- endif %}
8
+ {%- if not date_string is defined %}
9
+ {%- if strftime_now is defined %}
10
+ {%- set date_string = strftime_now("%d %b %Y") %}
11
+ {%- else %}
12
+ {%- set date_string = "26 Jul 2024" %}
13
+ {%- endif %}
14
+ {%- endif %}
15
+ {%- if not tools is defined %}
16
+ {%- set tools = none %}
17
+ {%- endif %}
18
+
19
+ {#- This block extracts the system message, so we can slot it into the right place. #}
20
+ {%- if messages[0]['role'] == 'system' %}
21
+ {%- set system_message = messages[0]['content']|trim %}
22
+ {%- set messages = messages[1:] %}
23
+ {%- else %}
24
+ {%- set system_message = "" %}
25
+ {%- endif %}
26
+
27
+ {#- System message #}
28
+ {{- "<|start_header_id|>system<|end_header_id|>\n\n" }}
29
+ {%- if tools is not none %}
30
+ {{- "Environment: ipython\n" }}
31
+ {%- endif %}
32
+ {{- "Cutting Knowledge Date: December 2023\n" }}
33
+ {{- "Today Date: " + date_string + "\n\n" }}
34
+ {%- if tools is not none and not tools_in_user_message %}
35
+ {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }}
36
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
37
+ {{- "Do not use variables.\n\n" }}
38
+ {%- for t in tools %}
39
+ {{- t | tojson(indent=4) }}
40
+ {{- "\n\n" }}
41
+ {%- endfor %}
42
+ {%- endif %}
43
+ {{- system_message }}
44
+ {{- "<|eot_id|>" }}
45
+
46
+ {#- Custom tools are passed in a user message with some extra guidance #}
47
+ {%- if tools_in_user_message and not tools is none %}
48
+ {#- Extract the first user message so we can plug it in here #}
49
+ {%- if messages | length != 0 %}
50
+ {%- set first_user_message = messages[0]['content']|trim %}
51
+ {%- set messages = messages[1:] %}
52
+ {%- else %}
53
+ {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }}
54
+ {%- endif %}
55
+ {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}}
56
+ {{- "Given the following functions, please respond with a JSON for a function call " }}
57
+ {{- "with its proper arguments that best answers the given prompt.\n\n" }}
58
+ {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }}
59
+ {{- "Do not use variables.\n\n" }}
60
+ {%- for t in tools %}
61
+ {{- t | tojson(indent=4) }}
62
+ {{- "\n\n" }}
63
+ {%- endfor %}
64
+ {{- first_user_message + "<|eot_id|>"}}
65
+ {%- endif %}
66
+
67
+ {%- for message in messages %}
68
+ {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %}
69
+ {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }}
70
+ {%- elif 'tool_calls' in message %}
71
+ {%- if not message.tool_calls|length == 1 %}
72
+ {{- raise_exception("This model only supports single tool-calls at once!") }}
73
+ {%- endif %}
74
+ {%- set tool_call = message.tool_calls[0].function %}
75
+ {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}}
76
+ {{- '{"name": "' + tool_call.name + '", ' }}
77
+ {{- '"parameters": ' }}
78
+ {{- tool_call.arguments | tojson }}
79
+ {{- "}" }}
80
+ {{- "<|eot_id|>" }}
81
+ {%- elif message.role == "tool" or message.role == "ipython" %}
82
+ {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }}
83
+ {%- if message.content is mapping or message.content is iterable %}
84
+ {{- message.content | tojson }}
85
+ {%- else %}
86
+ {{- message.content }}
87
+ {%- endif %}
88
+ {{- "<|eot_id|>" }}
89
+ {%- endif %}
90
+ {%- endfor %}
91
+ {%- if add_generation_prompt %}
92
+ {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
93
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 128000,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 128009,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 3072,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 8192,
15
+ "max_position_embeddings": 131072,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 24,
19
+ "num_hidden_layers": 28,
20
+ "num_key_value_heads": 8,
21
+ "pad_token_id": 128009,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "factor": 32.0,
26
+ "high_freq_factor": 4.0,
27
+ "low_freq_factor": 1.0,
28
+ "original_max_position_embeddings": 8192,
29
+ "rope_theta": 500000.0,
30
+ "rope_type": "llama3"
31
+ },
32
+ "tie_word_embeddings": true,
33
+ "transformers_version": "5.13.0",
34
+ "use_cache": false,
35
+ "vocab_size": 128256,
36
+ "torch_dtype": "bfloat16"
37
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|begin_of_text|>",
3
+ "eos_token": "<|eot_id|>",
4
+ "pad_token": "<|eot_id|>"
5
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
3
+ size 17209920
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|begin_of_text|>",
4
+ "clean_up_tokenization_spaces": true,
5
+ "eos_token": "<|eot_id|>",
6
+ "is_local": false,
7
+ "local_files_only": true,
8
+ "model_input_names": [
9
+ "input_ids",
10
+ "attention_mask"
11
+ ],
12
+ "model_max_length": 131072,
13
+ "pad_token": "<|eot_id|>",
14
+ "padding_side": "right",
15
+ "tokenizer_class": "TokenizersBackend"
16
+ }
trainer_state.json ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 1.0,
6
+ "eval_steps": 4,
7
+ "global_step": 21,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.047619047619047616,
14
+ "grad_norm": 0.26583361625671387,
15
+ "learning_rate": 0.0,
16
+ "loss": 1.838623046875,
17
+ "step": 1
18
+ },
19
+ {
20
+ "epoch": 0.09523809523809523,
21
+ "grad_norm": 0.2549391984939575,
22
+ "learning_rate": 3.3333333333333333e-06,
23
+ "loss": 1.7900390625,
24
+ "step": 2
25
+ },
26
+ {
27
+ "epoch": 0.14285714285714285,
28
+ "grad_norm": 0.27876609563827515,
29
+ "learning_rate": 6.666666666666667e-06,
30
+ "loss": 1.8592529296875,
31
+ "step": 3
32
+ },
33
+ {
34
+ "epoch": 0.19047619047619047,
35
+ "grad_norm": 0.2896035611629486,
36
+ "learning_rate": 1e-05,
37
+ "loss": 1.801513671875,
38
+ "step": 4
39
+ },
40
+ {
41
+ "epoch": 0.23809523809523808,
42
+ "grad_norm": 0.3665730953216553,
43
+ "learning_rate": 9.931634888554937e-06,
44
+ "loss": 1.545654296875,
45
+ "step": 5
46
+ },
47
+ {
48
+ "epoch": 0.23809523809523808,
49
+ "eval_loss": 1.732421875,
50
+ "eval_runtime": 2.193,
51
+ "eval_samples_per_second": 1.368,
52
+ "eval_steps_per_second": 0.456,
53
+ "step": 5
54
+ },
55
+ {
56
+ "epoch": 0.2857142857142857,
57
+ "grad_norm": 0.2946288287639618,
58
+ "learning_rate": 9.728616793536588e-06,
59
+ "loss": 1.818359375,
60
+ "step": 6
61
+ },
62
+ {
63
+ "epoch": 0.3333333333333333,
64
+ "grad_norm": 0.2675096094608307,
65
+ "learning_rate": 9.397114317029975e-06,
66
+ "loss": 1.7734375,
67
+ "step": 7
68
+ },
69
+ {
70
+ "epoch": 0.38095238095238093,
71
+ "grad_norm": 0.2651223838329315,
72
+ "learning_rate": 8.947199994035402e-06,
73
+ "loss": 1.78955078125,
74
+ "step": 8
75
+ },
76
+ {
77
+ "epoch": 0.42857142857142855,
78
+ "grad_norm": 0.31145110726356506,
79
+ "learning_rate": 8.392544243589428e-06,
80
+ "loss": 1.8505859375,
81
+ "step": 9
82
+ },
83
+ {
84
+ "epoch": 0.42857142857142855,
85
+ "eval_loss": 1.724609375,
86
+ "eval_runtime": 2.188,
87
+ "eval_samples_per_second": 1.371,
88
+ "eval_steps_per_second": 0.457,
89
+ "step": 9
90
+ },
91
+ {
92
+ "epoch": 0.47619047619047616,
93
+ "grad_norm": 0.27500542998313904,
94
+ "learning_rate": 7.75e-06,
95
+ "loss": 1.796630859375,
96
+ "step": 10
97
+ },
98
+ {
99
+ "epoch": 0.5238095238095238,
100
+ "grad_norm": 0.27637097239494324,
101
+ "learning_rate": 7.0390906449655104e-06,
102
+ "loss": 1.82177734375,
103
+ "step": 11
104
+ },
105
+ {
106
+ "epoch": 0.5714285714285714,
107
+ "grad_norm": 0.28143683075904846,
108
+ "learning_rate": 6.281416799501188e-06,
109
+ "loss": 1.84130859375,
110
+ "step": 12
111
+ },
112
+ {
113
+ "epoch": 0.6190476190476191,
114
+ "grad_norm": 0.29704588651657104,
115
+ "learning_rate": 5.500000000000001e-06,
116
+ "loss": 1.807373046875,
117
+ "step": 13
118
+ },
119
+ {
120
+ "epoch": 0.6190476190476191,
121
+ "eval_loss": 1.71875,
122
+ "eval_runtime": 2.1801,
123
+ "eval_samples_per_second": 1.376,
124
+ "eval_steps_per_second": 0.459,
125
+ "step": 13
126
+ },
127
+ {
128
+ "epoch": 0.6666666666666666,
129
+ "grad_norm": 0.2861112654209137,
130
+ "learning_rate": 4.718583200498814e-06,
131
+ "loss": 1.81103515625,
132
+ "step": 14
133
+ },
134
+ {
135
+ "epoch": 0.7142857142857143,
136
+ "grad_norm": 0.3324793577194214,
137
+ "learning_rate": 3.960909355034491e-06,
138
+ "loss": 1.796875,
139
+ "step": 15
140
+ },
141
+ {
142
+ "epoch": 0.7619047619047619,
143
+ "grad_norm": 0.25911256670951843,
144
+ "learning_rate": 3.2500000000000015e-06,
145
+ "loss": 1.736572265625,
146
+ "step": 16
147
+ },
148
+ {
149
+ "epoch": 0.8095238095238095,
150
+ "grad_norm": 0.2930397391319275,
151
+ "learning_rate": 2.607455756410573e-06,
152
+ "loss": 1.818359375,
153
+ "step": 17
154
+ },
155
+ {
156
+ "epoch": 0.8095238095238095,
157
+ "eval_loss": 1.7109375,
158
+ "eval_runtime": 2.19,
159
+ "eval_samples_per_second": 1.37,
160
+ "eval_steps_per_second": 0.457,
161
+ "step": 17
162
+ },
163
+ {
164
+ "epoch": 0.8571428571428571,
165
+ "grad_norm": 0.29004520177841187,
166
+ "learning_rate": 2.0528000059646e-06,
167
+ "loss": 1.81201171875,
168
+ "step": 18
169
+ },
170
+ {
171
+ "epoch": 0.9047619047619048,
172
+ "grad_norm": 0.2956332862377167,
173
+ "learning_rate": 1.602885682970026e-06,
174
+ "loss": 1.8251953125,
175
+ "step": 19
176
+ },
177
+ {
178
+ "epoch": 0.9523809523809523,
179
+ "grad_norm": 0.3092670440673828,
180
+ "learning_rate": 1.2713832064634127e-06,
181
+ "loss": 1.779296875,
182
+ "step": 20
183
+ },
184
+ {
185
+ "epoch": 1.0,
186
+ "grad_norm": 0.29927435517311096,
187
+ "learning_rate": 1.0683651114450641e-06,
188
+ "loss": 1.79345703125,
189
+ "step": 21
190
+ },
191
+ {
192
+ "epoch": 1.0,
193
+ "eval_loss": 1.7109375,
194
+ "eval_runtime": 2.1924,
195
+ "eval_samples_per_second": 1.368,
196
+ "eval_steps_per_second": 0.456,
197
+ "step": 21
198
+ }
199
+ ],
200
+ "logging_steps": 1.0,
201
+ "max_steps": 21,
202
+ "num_input_tokens_seen": 0,
203
+ "num_train_epochs": 1,
204
+ "save_steps": 0,
205
+ "stateful_callbacks": {
206
+ "TrainerControl": {
207
+ "args": {
208
+ "should_epoch_stop": false,
209
+ "should_evaluate": false,
210
+ "should_log": false,
211
+ "should_save": true,
212
+ "should_training_stop": true
213
+ },
214
+ "attributes": {}
215
+ }
216
+ },
217
+ "total_flos": 1.722081761694843e+17,
218
+ "train_batch_size": 1,
219
+ "trial_name": null,
220
+ "trial_params": null
221
+ }