cuijian0819 commited on
Commit
22b7872
·
verified ·
1 Parent(s): c3424da

Add PyTorch model files

Browse files
.gitattributes CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  checkpoint-14/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  checkpoint-14/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
38
+ checkpoint-26/tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,100 +1,61 @@
1
  ---
 
 
 
2
  tags:
3
- - pytorch
4
- - safetensors
 
5
  - transformers
6
- - gpt-oss
7
- - multilingual
8
- - text-generation
9
- language:
10
- - en
11
- - es
12
- - fr
13
- - de
14
- - it
15
- - pt
16
- license: apache-2.0
17
- model_type: gpt-oss
18
- pipeline_tag: text-generation
19
- base_model: openai/gpt-oss-20b
20
  ---
21
 
22
- # GPT-OSS-20B Function Calling Model
23
-
24
- This repository contains the GPT-OSS-20B model fine-tuned on function calling data in PyTorch/Safetensors format, ready for use with the Transformers library.
25
-
26
- ## Model Details
27
-
28
- - **Base Model:** openai/gpt-oss-20b
29
- - **Fine-tuning Dataset:** Salesforce/xlam-function-calling-60k (2000 samples)
30
- - **Fine-tuning Method:** LoRA (r=8, alpha=16)
31
- - **Context Length:** 131,072 tokens
32
- - **Model Size:** 20B parameters
33
-
34
- ## Files
35
-
36
- - `model.safetensors`: Model weights in Safetensors format
37
- - `config.json`: Model configuration
38
- - `tokenizer.json`, `tokenizer_config.json`: Tokenizer files
39
- - `generation_config.json`: Generation configuration
40
 
41
- ## Usage
 
42
 
43
- ### With Transformers Library
44
 
45
  ```python
46
- from transformers import AutoModelForCausalLM, AutoTokenizer
47
 
48
- # Load model and tokenizer
49
- model = AutoModelForCausalLM.from_pretrained(
50
- "cuijian0819/gpt-oss-20b-function-calling",
51
- torch_dtype="auto",
52
- device_map="auto"
53
- )
54
- tokenizer = AutoTokenizer.from_pretrained("cuijian0819/gpt-oss-20b-function-calling")
55
-
56
- # Generate text
57
- inputs = tokenizer("Your prompt here", return_tensors="pt")
58
- outputs = model.generate(**inputs, max_length=100, temperature=0.7)
59
- response = tokenizer.decode(outputs[0], skip_special_tokens=True)
60
  ```
61
 
62
- ### Fine-tuning
63
-
64
- This model can be further fine-tuned using standard PyTorch/Transformers workflows:
65
 
66
- ```python
67
- from transformers import AutoModelForCausalLM, AutoTokenizer, Trainer, TrainingArguments
68
 
69
- model = AutoModelForCausalLM.from_pretrained("cuijian0819/gpt-oss-20b-function-calling")
70
- tokenizer = AutoTokenizer.from_pretrained("cuijian0819/gpt-oss-20b-function-calling")
71
 
72
- # Your fine-tuning code here
73
- ```
74
 
75
- ## GGUF Version
76
 
77
- For efficient inference with llama.cpp or Ollama, check out the GGUF version: [cuijian0819/gpt-oss-20b-function-calling-gguf](https://huggingface.co/cuijian0819/gpt-oss-20b-function-calling-gguf)
 
 
 
 
 
78
 
79
- ## Training Details
80
 
81
- - **Training Epochs:** 2
82
- - **Learning Rate:** 0.0002
83
- - **Batch Size:** 4
84
- - **Gradient Accumulation:** 4
85
- - **Max Length:** 1024
86
 
87
- ## License
88
-
89
- This model inherits the license from the base openai/gpt-oss-20b model.
90
-
91
- ## Citation
92
 
 
 
93
  ```bibtex
94
- @misc{gpt-oss-20b-function-calling,
95
- title={GPT-OSS-20B Function Calling Model},
96
- author={cuijian0819},
97
- year={2025},
98
- url={https://huggingface.co/cuijian0819/gpt-oss-20b-function-calling}
 
 
99
  }
100
- ```
 
1
  ---
2
+ base_model: openai/gpt-oss-20b
3
+ library_name: peft
4
+ model_name: fine_tuned
5
  tags:
6
+ - base_model:adapter:openai/gpt-oss-20b
7
+ - lora
8
+ - sft
9
  - transformers
10
+ - trl
11
+ licence: license
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
+ # Model Card for fine_tuned
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ This model is a fine-tuned version of [openai/gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b).
17
+ It has been trained using [TRL](https://github.com/huggingface/trl).
18
 
19
+ ## Quick start
20
 
21
  ```python
22
+ from transformers import pipeline
23
 
24
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
25
+ generator = pipeline("text-generation", model="None", device="cuda")
26
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
27
+ print(output["generated_text"])
 
 
 
 
 
 
 
 
28
  ```
29
 
30
+ ## Training procedure
 
 
31
 
32
+
 
33
 
 
 
34
 
35
+ This model was trained with SFT.
 
36
 
37
+ ### Framework versions
38
 
39
+ - PEFT 0.17.0
40
+ - TRL: 0.21.0
41
+ - Transformers: 4.55.0
42
+ - Pytorch: 2.7.1+cu118
43
+ - Datasets: 4.0.0
44
+ - Tokenizers: 0.21.4
45
 
46
+ ## Citations
47
 
 
 
 
 
 
48
 
 
 
 
 
 
49
 
50
+ Cite TRL as:
51
+
52
  ```bibtex
53
+ @misc{vonwerra2022trl,
54
+ title = {{TRL: Transformer Reinforcement Learning}},
55
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
56
+ year = 2020,
57
+ journal = {GitHub repository},
58
+ publisher = {GitHub},
59
+ howpublished = {\url{https://github.com/huggingface/trl}}
60
  }
61
+ ```
adapter_config.json CHANGED
@@ -28,10 +28,10 @@
28
  "rank_pattern": {},
29
  "revision": null,
30
  "target_modules": [
31
- "q_proj",
32
  "v_proj",
33
  "o_proj",
34
- "k_proj"
 
35
  ],
36
  "target_parameters": [
37
  "7.mlp.experts.gate_up_proj",
 
28
  "rank_pattern": {},
29
  "revision": null,
30
  "target_modules": [
 
31
  "v_proj",
32
  "o_proj",
33
+ "k_proj",
34
+ "q_proj"
35
  ],
36
  "target_parameters": [
37
  "7.mlp.experts.gate_up_proj",
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e0ccd5a6fa568e8146512322223427c2fcb56499dbb36023c7daa7cdc8f0e865
3
  size 60189176
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:324d3315e5f8c25d367aa6c7df88dd02beb1bae363c3d88045566d8a6a4234b5
3
  size 60189176
checkpoint-26/README.md ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: openai/gpt-oss-20b
3
+ library_name: peft
4
+ tags:
5
+ - base_model:adapter:openai/gpt-oss-20b
6
+ - lora
7
+ - sft
8
+ - transformers
9
+ - trl
10
+ ---
11
+
12
+ # Model Card for Model ID
13
+
14
+ <!-- Provide a quick summary of what the model is/does. -->
15
+
16
+
17
+
18
+ ## Model Details
19
+
20
+ ### Model Description
21
+
22
+ <!-- Provide a longer summary of what this model is. -->
23
+
24
+
25
+
26
+ - **Developed by:** [More Information Needed]
27
+ - **Funded by [optional]:** [More Information Needed]
28
+ - **Shared by [optional]:** [More Information Needed]
29
+ - **Model type:** [More Information Needed]
30
+ - **Language(s) (NLP):** [More Information Needed]
31
+ - **License:** [More Information Needed]
32
+ - **Finetuned from model [optional]:** [More Information Needed]
33
+
34
+ ### Model Sources [optional]
35
+
36
+ <!-- Provide the basic links for the model. -->
37
+
38
+ - **Repository:** [More Information Needed]
39
+ - **Paper [optional]:** [More Information Needed]
40
+ - **Demo [optional]:** [More Information Needed]
41
+
42
+ ## Uses
43
+
44
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
45
+
46
+ ### Direct Use
47
+
48
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Downstream Use [optional]
53
+
54
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
55
+
56
+ [More Information Needed]
57
+
58
+ ### Out-of-Scope Use
59
+
60
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ## Bias, Risks, and Limitations
65
+
66
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
+
68
+ [More Information Needed]
69
+
70
+ ### Recommendations
71
+
72
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
+
74
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
75
+
76
+ ## How to Get Started with the Model
77
+
78
+ Use the code below to get started with the model.
79
+
80
+ [More Information Needed]
81
+
82
+ ## Training Details
83
+
84
+ ### Training Data
85
+
86
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
87
+
88
+ [More Information Needed]
89
+
90
+ ### Training Procedure
91
+
92
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
93
+
94
+ #### Preprocessing [optional]
95
+
96
+ [More Information Needed]
97
+
98
+
99
+ #### Training Hyperparameters
100
+
101
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
102
+
103
+ #### Speeds, Sizes, Times [optional]
104
+
105
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
106
+
107
+ [More Information Needed]
108
+
109
+ ## Evaluation
110
+
111
+ <!-- This section describes the evaluation protocols and provides the results. -->
112
+
113
+ ### Testing Data, Factors & Metrics
114
+
115
+ #### Testing Data
116
+
117
+ <!-- This should link to a Dataset Card if possible. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Factors
122
+
123
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
124
+
125
+ [More Information Needed]
126
+
127
+ #### Metrics
128
+
129
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
130
+
131
+ [More Information Needed]
132
+
133
+ ### Results
134
+
135
+ [More Information Needed]
136
+
137
+ #### Summary
138
+
139
+
140
+
141
+ ## Model Examination [optional]
142
+
143
+ <!-- Relevant interpretability work for the model goes here -->
144
+
145
+ [More Information Needed]
146
+
147
+ ## Environmental Impact
148
+
149
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
150
+
151
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
152
+
153
+ - **Hardware Type:** [More Information Needed]
154
+ - **Hours used:** [More Information Needed]
155
+ - **Cloud Provider:** [More Information Needed]
156
+ - **Compute Region:** [More Information Needed]
157
+ - **Carbon Emitted:** [More Information Needed]
158
+
159
+ ## Technical Specifications [optional]
160
+
161
+ ### Model Architecture and Objective
162
+
163
+ [More Information Needed]
164
+
165
+ ### Compute Infrastructure
166
+
167
+ [More Information Needed]
168
+
169
+ #### Hardware
170
+
171
+ [More Information Needed]
172
+
173
+ #### Software
174
+
175
+ [More Information Needed]
176
+
177
+ ## Citation [optional]
178
+
179
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
180
+
181
+ **BibTeX:**
182
+
183
+ [More Information Needed]
184
+
185
+ **APA:**
186
+
187
+ [More Information Needed]
188
+
189
+ ## Glossary [optional]
190
+
191
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
192
+
193
+ [More Information Needed]
194
+
195
+ ## More Information [optional]
196
+
197
+ [More Information Needed]
198
+
199
+ ## Model Card Authors [optional]
200
+
201
+ [More Information Needed]
202
+
203
+ ## Model Card Contact
204
+
205
+ [More Information Needed]
206
+ ### Framework versions
207
+
208
+ - PEFT 0.17.0
checkpoint-26/adapter_config.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": {
4
+ "base_model_class": "GptOssForCausalLM",
5
+ "parent_library": "transformers.models.gpt_oss.modeling_gpt_oss"
6
+ },
7
+ "base_model_name_or_path": "openai/gpt-oss-20b",
8
+ "bias": "none",
9
+ "corda_config": null,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 16,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.0,
22
+ "megatron_config": null,
23
+ "megatron_core": "megatron.core",
24
+ "modules_to_save": null,
25
+ "peft_type": "LORA",
26
+ "qalora_group_size": 16,
27
+ "r": 8,
28
+ "rank_pattern": {},
29
+ "revision": null,
30
+ "target_modules": [
31
+ "v_proj",
32
+ "o_proj",
33
+ "k_proj",
34
+ "q_proj"
35
+ ],
36
+ "target_parameters": [
37
+ "7.mlp.experts.gate_up_proj",
38
+ "7.mlp.experts.down_proj",
39
+ "15.mlp.experts.gate_up_proj",
40
+ "15.mlp.experts.down_proj",
41
+ "23.mlp.experts.gate_up_proj",
42
+ "23.mlp.experts.down_proj"
43
+ ],
44
+ "task_type": null,
45
+ "trainable_token_indices": null,
46
+ "use_dora": false,
47
+ "use_qalora": false,
48
+ "use_rslora": false
49
+ }
checkpoint-26/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:324d3315e5f8c25d367aa6c7df88dd02beb1bae363c3d88045566d8a6a4234b5
3
+ size 60189176
checkpoint-26/chat_template.jinja ADDED
@@ -0,0 +1,331 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#-
2
+ In addition to the normal inputs of `messages` and `tools`, this template also accepts the
3
+ following kwargs:
4
+ - "builtin_tools": A list, can contain "browser" and/or "python".
5
+ - "model_identity": A string that optionally describes the model identity.
6
+ - "reasoning_effort": A string that describes the reasoning effort, defaults to "medium".
7
+ #}
8
+
9
+ {#- Tool Definition Rendering ============================================== #}
10
+ {%- macro render_typescript_type(param_spec, required_params, is_nullable=false) -%}
11
+ {%- if param_spec.type == "array" -%}
12
+ {%- if param_spec['items'] -%}
13
+ {%- if param_spec['items']['type'] == "string" -%}
14
+ {{- "string[]" }}
15
+ {%- elif param_spec['items']['type'] == "number" -%}
16
+ {{- "number[]" }}
17
+ {%- elif param_spec['items']['type'] == "integer" -%}
18
+ {{- "number[]" }}
19
+ {%- elif param_spec['items']['type'] == "boolean" -%}
20
+ {{- "boolean[]" }}
21
+ {%- else -%}
22
+ {%- set inner_type = render_typescript_type(param_spec['items'], required_params) -%}
23
+ {%- if inner_type == "object | object" or inner_type|length > 50 -%}
24
+ {{- "any[]" }}
25
+ {%- else -%}
26
+ {{- inner_type + "[]" }}
27
+ {%- endif -%}
28
+ {%- endif -%}
29
+ {%- if param_spec.nullable -%}
30
+ {{- " | null" }}
31
+ {%- endif -%}
32
+ {%- else -%}
33
+ {{- "any[]" }}
34
+ {%- if param_spec.nullable -%}
35
+ {{- " | null" }}
36
+ {%- endif -%}
37
+ {%- endif -%}
38
+ {%- elif param_spec.type is defined and param_spec.type is iterable and param_spec.type is not string and param_spec.type is not mapping and param_spec.type[0] is defined -%}
39
+ {#- Handle array of types like ["object", "object"] from Union[dict, list] #}
40
+ {%- if param_spec.type | length > 1 -%}
41
+ {{- param_spec.type | join(" | ") }}
42
+ {%- else -%}
43
+ {{- param_spec.type[0] }}
44
+ {%- endif -%}
45
+ {%- elif param_spec.oneOf -%}
46
+ {#- Handle oneOf schemas - check for complex unions and fallback to any #}
47
+ {%- set has_object_variants = false -%}
48
+ {%- for variant in param_spec.oneOf -%}
49
+ {%- if variant.type == "object" -%}
50
+ {%- set has_object_variants = true -%}
51
+ {%- endif -%}
52
+ {%- endfor -%}
53
+ {%- if has_object_variants and param_spec.oneOf|length > 1 -%}
54
+ {{- "any" }}
55
+ {%- else -%}
56
+ {%- for variant in param_spec.oneOf -%}
57
+ {{- render_typescript_type(variant, required_params) -}}
58
+ {%- if variant.description %}
59
+ {{- "// " + variant.description }}
60
+ {%- endif -%}
61
+ {%- if variant.default is defined %}
62
+ {{ "// default: " + variant.default|tojson }}
63
+ {%- endif -%}
64
+ {%- if not loop.last %}
65
+ {{- " | " }}
66
+ {% endif -%}
67
+ {%- endfor -%}
68
+ {%- endif -%}
69
+ {%- elif param_spec.type == "string" -%}
70
+ {%- if param_spec.enum -%}
71
+ {{- '"' + param_spec.enum|join('" | "') + '"' -}}
72
+ {%- else -%}
73
+ {{- "string" }}
74
+ {%- if param_spec.nullable %}
75
+ {{- " | null" }}
76
+ {%- endif -%}
77
+ {%- endif -%}
78
+ {%- elif param_spec.type == "number" -%}
79
+ {{- "number" }}
80
+ {%- elif param_spec.type == "integer" -%}
81
+ {{- "number" }}
82
+ {%- elif param_spec.type == "boolean" -%}
83
+ {{- "boolean" }}
84
+
85
+ {%- elif param_spec.type == "object" -%}
86
+ {%- if param_spec.properties -%}
87
+ {{- "{\n" }}
88
+ {%- for prop_name, prop_spec in param_spec.properties.items() -%}
89
+ {{- prop_name -}}
90
+ {%- if prop_name not in (param_spec.required or []) -%}
91
+ {{- "?" }}
92
+ {%- endif -%}
93
+ {{- ": " }}
94
+ {{ render_typescript_type(prop_spec, param_spec.required or []) }}
95
+ {%- if not loop.last -%}
96
+ {{-", " }}
97
+ {%- endif -%}
98
+ {%- endfor -%}
99
+ {{- "}" }}
100
+ {%- else -%}
101
+ {{- "object" }}
102
+ {%- endif -%}
103
+ {%- else -%}
104
+ {{- "any" }}
105
+ {%- endif -%}
106
+ {%- endmacro -%}
107
+
108
+ {%- macro render_tool_namespace(namespace_name, tools) -%}
109
+ {{- "## " + namespace_name + "\n\n" }}
110
+ {{- "namespace " + namespace_name + " {\n\n" }}
111
+ {%- for tool in tools %}
112
+ {%- set tool = tool.function %}
113
+ {{- "// " + tool.description + "\n" }}
114
+ {{- "type "+ tool.name + " = " }}
115
+ {%- if tool.parameters and tool.parameters.properties %}
116
+ {{- "(_: {\n" }}
117
+ {%- for param_name, param_spec in tool.parameters.properties.items() %}
118
+ {%- if param_spec.description %}
119
+ {{- "// " + param_spec.description + "\n" }}
120
+ {%- endif %}
121
+ {{- param_name }}
122
+ {%- if param_name not in (tool.parameters.required or []) -%}
123
+ {{- "?" }}
124
+ {%- endif -%}
125
+ {{- ": " }}
126
+ {{- render_typescript_type(param_spec, tool.parameters.required or []) }}
127
+ {%- if param_spec.default is defined -%}
128
+ {%- if param_spec.enum %}
129
+ {{- ", // default: " + param_spec.default }}
130
+ {%- elif param_spec.oneOf %}
131
+ {{- "// default: " + param_spec.default }}
132
+ {%- else %}
133
+ {{- ", // default: " + param_spec.default|tojson }}
134
+ {%- endif -%}
135
+ {%- endif -%}
136
+ {%- if not loop.last %}
137
+ {{- ",\n" }}
138
+ {%- else %}
139
+ {{- ",\n" }}
140
+ {%- endif -%}
141
+ {%- endfor %}
142
+ {{- "}) => any;\n\n" }}
143
+ {%- else -%}
144
+ {{- "() => any;\n\n" }}
145
+ {%- endif -%}
146
+ {%- endfor %}
147
+ {{- "} // namespace " + namespace_name }}
148
+ {%- endmacro -%}
149
+
150
+ {%- macro render_builtin_tools(browser_tool, python_tool) -%}
151
+ {%- if browser_tool %}
152
+ {{- "## browser\n\n" }}
153
+ {{- "// Tool for browsing.\n" }}
154
+ {{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.\n" }}
155
+ {{- "// Cite information from the tool using the following format:\n" }}
156
+ {{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.\n" }}
157
+ {{- "// Do not quote more than 10 words directly from the tool output.\n" }}
158
+ {{- "// sources=web (default: web)\n" }}
159
+ {{- "namespace browser {\n\n" }}
160
+ {{- "// Searches for information related to `query` and displays `topn` results.\n" }}
161
+ {{- "type search = (_: {\n" }}
162
+ {{- "query: string,\n" }}
163
+ {{- "topn?: number, // default: 10\n" }}
164
+ {{- "source?: string,\n" }}
165
+ {{- "}) => any;\n\n" }}
166
+ {{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.\n" }}
167
+ {{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.\n" }}
168
+ {{- "// If `cursor` is not provided, the most recent page is implied.\n" }}
169
+ {{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.\n" }}
170
+ {{- "// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available.\n" }}
171
+ {{- "// Use this function without `id` to scroll to a new location of an opened page.\n" }}
172
+ {{- "type open = (_: {\n" }}
173
+ {{- "id?: number | string, // default: -1\n" }}
174
+ {{- "cursor?: number, // default: -1\n" }}
175
+ {{- "loc?: number, // default: -1\n" }}
176
+ {{- "num_lines?: number, // default: -1\n" }}
177
+ {{- "view_source?: boolean, // default: false\n" }}
178
+ {{- "source?: string,\n" }}
179
+ {{- "}) => any;\n\n" }}
180
+ {{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.\n" }}
181
+ {{- "type find = (_: {\n" }}
182
+ {{- "pattern: string,\n" }}
183
+ {{- "cursor?: number, // default: -1\n" }}
184
+ {{- "}) => any;\n\n" }}
185
+ {{- "} // namespace browser\n\n" }}
186
+ {%- endif -%}
187
+
188
+ {%- if python_tool %}
189
+ {{- "## python\n\n" }}
190
+ {{- "Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files).\n\n" }}
191
+ {{- "When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster.\n\n" }}
192
+ {%- endif -%}
193
+ {%- endmacro -%}
194
+
195
+ {#- System Message Construction ============================================ #}
196
+ {%- macro build_system_message() -%}
197
+ {%- if model_identity is not defined %}
198
+ {%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
199
+ {%- endif %}
200
+ {{- model_identity + "\n" }}
201
+ {{- "Knowledge cutoff: 2024-06\n" }}
202
+ {{- "Current date: " + strftime_now("%Y-%m-%d") + "\n\n" }}
203
+ {%- if reasoning_effort is not defined %}
204
+ {%- set reasoning_effort = "medium" %}
205
+ {%- endif %}
206
+ {{- "Reasoning: " + reasoning_effort + "\n\n" }}
207
+ {%- if builtin_tools %}
208
+ {{- "# Tools\n\n" }}
209
+ {%- set available_builtin_tools = namespace(browser=false, python=false) %}
210
+ {%- for tool in builtin_tools %}
211
+ {%- if tool == "browser" %}
212
+ {%- set available_builtin_tools.browser = true %}
213
+ {%- elif tool == "python" %}
214
+ {%- set available_builtin_tools.python = true %}
215
+ {%- endif %}
216
+ {%- endfor %}
217
+ {{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
218
+ {%- endif -%}
219
+ {{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
220
+ {%- if tools -%}
221
+ {{- "\nCalls to these tools must go to the commentary channel: 'functions'." }}
222
+ {%- endif -%}
223
+ {%- endmacro -%}
224
+
225
+ {#- Main Template Logic ================================================= #}
226
+ {#- Set defaults #}
227
+
228
+ {#- Render system message #}
229
+ {{- "<|start|>system<|message|>" }}
230
+ {{- build_system_message() }}
231
+ {{- "<|end|>" }}
232
+
233
+ {#- Extract developer message #}
234
+ {%- if messages[0].role == "developer" or messages[0].role == "system" %}
235
+ {%- set developer_message = messages[0].content %}
236
+ {%- set loop_messages = messages[1:] %}
237
+ {%- else %}
238
+ {%- set developer_message = "" %}
239
+ {%- set loop_messages = messages %}
240
+ {%- endif %}
241
+
242
+ {#- Render developer message #}
243
+ {%- if developer_message or tools %}
244
+ {{- "<|start|>developer<|message|>" }}
245
+ {%- if developer_message %}
246
+ {{- "# Instructions\n\n" }}
247
+ {{- developer_message }}
248
+ {{- "\n\n" }}
249
+ {%- endif %}
250
+ {%- if tools -%}
251
+ {{- "# Tools\n\n" }}
252
+ {{- render_tool_namespace("functions", tools) }}
253
+ {%- endif -%}
254
+ {{- "<|end|>" }}
255
+ {%- endif %}
256
+
257
+ {#- Render messages #}
258
+ {%- set last_tool_call = namespace(name=none) %}
259
+ {%- for message in loop_messages -%}
260
+ {#- At this point only assistant/user/tool messages should remain #}
261
+ {%- if message.role == 'assistant' -%}
262
+ {#- Checks to ensure the messages are being passed in the format we expect #}
263
+ {%- if "content" in message %}
264
+ {%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
265
+ {{- raise_exception("You have passed a message containing <|channel|> tags in the content field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
266
+ {%- endif %}
267
+ {%- endif %}
268
+ {%- if "thinking" in message %}
269
+ {%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
270
+ {{- raise_exception("You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
271
+ {%- endif %}
272
+ {%- endif %}
273
+ {%- if "tool_calls" in message %}
274
+ {#- We need very careful handling here - we want to drop the tool call analysis message if the model #}
275
+ {#- has output a later <|final|> message, but otherwise we want to retain it. This is the only case #}
276
+ {#- when we render CoT/analysis messages in inference. #}
277
+ {%- set future_final_message = namespace(found=false) %}
278
+ {%- for future_message in loop_messages[loop.index:] %}
279
+ {%- if future_message.role == 'assistant' and "tool_calls" not in future_message %}
280
+ {%- set future_final_message.found = true %}
281
+ {%- endif %}
282
+ {%- endfor %}
283
+ {#- We assume max 1 tool call per message, and so we infer the tool call name #}
284
+ {#- in "tool" messages from the most recent assistant tool call name #}
285
+ {%- set tool_call = message.tool_calls[0] %}
286
+ {%- if tool_call.function %}
287
+ {%- set tool_call = tool_call.function %}
288
+ {%- endif %}
289
+ {%- if message.content and message.thinking %}
290
+ {{- raise_exception("Cannot pass both content and thinking in an assistant message with tool calls! Put the analysis message in one or the other, but not both.") }}
291
+ {%- elif message.content and not future_final_message.found %}
292
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
293
+ {%- elif message.thinking and not future_final_message.found %}
294
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
295
+ {%- endif %}
296
+ {{- "<|start|>assistant to=" }}
297
+ {{- "functions." + tool_call.name + "<|channel|>commentary " }}
298
+ {{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
299
+ {{- tool_call.arguments|tojson }}
300
+ {{- "<|call|>" }}
301
+ {%- set last_tool_call.name = tool_call.name %}
302
+ {%- elif loop.last and not add_generation_prompt %}
303
+ {#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
304
+ {#- This is a situation that should only occur in training, never in inference. #}
305
+ {%- if "thinking" in message %}
306
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
307
+ {%- endif %}
308
+ {#- <|return|> indicates the end of generation, but <|end|> does not #}
309
+ {#- <|return|> should never be an input to the model, but we include it as the final token #}
310
+ {#- when training, so the model learns to emit it. #}
311
+ {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
312
+ {%- else %}
313
+ {#- CoT is dropped during all previous turns, so we never render it for inference #}
314
+ {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
315
+ {%- set last_tool_call.name = none %}
316
+ {%- endif %}
317
+ {%- elif message.role == 'tool' -%}
318
+ {%- if last_tool_call.name is none %}
319
+ {{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
320
+ {%- endif %}
321
+ {{- "<|start|>functions." + last_tool_call.name }}
322
+ {{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
323
+ {%- elif message.role == 'user' -%}
324
+ {{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
325
+ {%- endif -%}
326
+ {%- endfor -%}
327
+
328
+ {#- Generation prompt #}
329
+ {%- if add_generation_prompt -%}
330
+ <|start|>assistant
331
+ {%- endif -%}
checkpoint-26/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7168cc8b8d0112a0393b221f34bfcc4b2749a430c350834798fa4681ccc97c5b
3
+ size 120495883
checkpoint-26/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a794a6cb9cd4bbd0c53d08db0e20a5536c789bba6f22113385c1c408d58908bd
3
+ size 14645
checkpoint-26/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f17833fdb25b8f7e6c59167a9d20cb1aab3ab1167f99f7ee5382c64e4871ec21
3
+ size 1465
checkpoint-26/special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|return|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
checkpoint-26/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
3
+ size 27868174
checkpoint-26/tokenizer_config.json ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "199998": {
4
+ "content": "<|startoftext|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "199999": {
12
+ "content": "<|endoftext|>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "200000": {
20
+ "content": "<|reserved_200000|>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "200001": {
28
+ "content": "<|reserved_200001|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "200002": {
36
+ "content": "<|return|>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "200003": {
44
+ "content": "<|constrain|>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "200004": {
52
+ "content": "<|reserved_200004|>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "200005": {
60
+ "content": "<|channel|>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ },
67
+ "200006": {
68
+ "content": "<|start|>",
69
+ "lstrip": false,
70
+ "normalized": false,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": true
74
+ },
75
+ "200007": {
76
+ "content": "<|end|>",
77
+ "lstrip": false,
78
+ "normalized": false,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": true
82
+ },
83
+ "200008": {
84
+ "content": "<|message|>",
85
+ "lstrip": false,
86
+ "normalized": false,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": true
90
+ },
91
+ "200009": {
92
+ "content": "<|reserved_200009|>",
93
+ "lstrip": false,
94
+ "normalized": false,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": true
98
+ },
99
+ "200010": {
100
+ "content": "<|reserved_200010|>",
101
+ "lstrip": false,
102
+ "normalized": false,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": true
106
+ },
107
+ "200011": {
108
+ "content": "<|reserved_200011|>",
109
+ "lstrip": false,
110
+ "normalized": false,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": true
114
+ },
115
+ "200012": {
116
+ "content": "<|call|>",
117
+ "lstrip": false,
118
+ "normalized": false,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": true
122
+ },
123
+ "200013": {
124
+ "content": "<|reserved_200013|>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": true
130
+ },
131
+ "200014": {
132
+ "content": "<|reserved_200014|>",
133
+ "lstrip": false,
134
+ "normalized": false,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": true
138
+ },
139
+ "200015": {
140
+ "content": "<|reserved_200015|>",
141
+ "lstrip": false,
142
+ "normalized": false,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": true
146
+ },
147
+ "200016": {
148
+ "content": "<|reserved_200016|>",
149
+ "lstrip": false,
150
+ "normalized": false,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": true
154
+ },
155
+ "200017": {
156
+ "content": "<|reserved_200017|>",
157
+ "lstrip": false,
158
+ "normalized": false,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": true
162
+ },
163
+ "200018": {
164
+ "content": "<|endofprompt|>",
165
+ "lstrip": false,
166
+ "normalized": false,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": true
170
+ }
171
+ },
172
+ "bos_token": "<|startoftext|>",
173
+ "clean_up_tokenization_spaces": false,
174
+ "eos_token": "<|return|>",
175
+ "extra_special_tokens": {},
176
+ "model_input_names": [
177
+ "input_ids",
178
+ "attention_mask"
179
+ ],
180
+ "model_max_length": 1000000000000000019884624838656,
181
+ "pad_token": "<|endoftext|>",
182
+ "tokenizer_class": "PreTrainedTokenizerFast"
183
+ }
checkpoint-26/trainer_state.json ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 2.0,
6
+ "eval_steps": 500,
7
+ "global_step": 26,
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.08,
14
+ "grad_norm": 14.987010955810547,
15
+ "learning_rate": 0.0,
16
+ "loss": 4.4135,
17
+ "mean_token_accuracy": 0.3328915312886238,
18
+ "num_tokens": 6654.0,
19
+ "step": 1
20
+ },
21
+ {
22
+ "epoch": 0.16,
23
+ "grad_norm": 15.721894264221191,
24
+ "learning_rate": 0.0002,
25
+ "loss": 4.6497,
26
+ "mean_token_accuracy": 0.30345115065574646,
27
+ "num_tokens": 13035.0,
28
+ "step": 2
29
+ },
30
+ {
31
+ "epoch": 0.24,
32
+ "grad_norm": 11.459243774414062,
33
+ "learning_rate": 0.00019929032311830303,
34
+ "loss": 3.714,
35
+ "mean_token_accuracy": 0.4230290800333023,
36
+ "num_tokens": 19421.0,
37
+ "step": 3
38
+ },
39
+ {
40
+ "epoch": 0.32,
41
+ "grad_norm": 9.725933074951172,
42
+ "learning_rate": 0.00019717248450157681,
43
+ "loss": 3.2146,
44
+ "mean_token_accuracy": 0.485133558511734,
45
+ "num_tokens": 26421.0,
46
+ "step": 4
47
+ },
48
+ {
49
+ "epoch": 0.4,
50
+ "grad_norm": 5.686432838439941,
51
+ "learning_rate": 0.00019367988372994265,
52
+ "loss": 2.6649,
53
+ "mean_token_accuracy": 0.5525170117616653,
54
+ "num_tokens": 33610.0,
55
+ "step": 5
56
+ },
57
+ {
58
+ "epoch": 0.48,
59
+ "grad_norm": 4.1703972816467285,
60
+ "learning_rate": 0.00018886760120394774,
61
+ "loss": 2.3464,
62
+ "mean_token_accuracy": 0.589439257979393,
63
+ "num_tokens": 40558.0,
64
+ "step": 6
65
+ },
66
+ {
67
+ "epoch": 0.56,
68
+ "grad_norm": 3.2032220363616943,
69
+ "learning_rate": 0.00018281152949374527,
70
+ "loss": 2.0934,
71
+ "mean_token_accuracy": 0.6152238696813583,
72
+ "num_tokens": 46971.0,
73
+ "step": 7
74
+ },
75
+ {
76
+ "epoch": 0.64,
77
+ "grad_norm": 2.901901960372925,
78
+ "learning_rate": 0.00017560717646792704,
79
+ "loss": 1.8749,
80
+ "mean_token_accuracy": 0.649490475654602,
81
+ "num_tokens": 52599.0,
82
+ "step": 8
83
+ },
84
+ {
85
+ "epoch": 0.72,
86
+ "grad_norm": 2.4276301860809326,
87
+ "learning_rate": 0.0001673681590773821,
88
+ "loss": 1.8101,
89
+ "mean_token_accuracy": 0.6359337270259857,
90
+ "num_tokens": 59326.0,
91
+ "step": 9
92
+ },
93
+ {
94
+ "epoch": 0.8,
95
+ "grad_norm": 2.947563409805298,
96
+ "learning_rate": 0.0001582244115481097,
97
+ "loss": 1.7335,
98
+ "mean_token_accuracy": 0.6320608258247375,
99
+ "num_tokens": 64735.0,
100
+ "step": 10
101
+ },
102
+ {
103
+ "epoch": 0.88,
104
+ "grad_norm": 2.4218685626983643,
105
+ "learning_rate": 0.00014832013624085656,
106
+ "loss": 1.6031,
107
+ "mean_token_accuracy": 0.6445008665323257,
108
+ "num_tokens": 70800.0,
109
+ "step": 11
110
+ },
111
+ {
112
+ "epoch": 0.96,
113
+ "grad_norm": 2.101181745529175,
114
+ "learning_rate": 0.00013781152949374526,
115
+ "loss": 1.6201,
116
+ "mean_token_accuracy": 0.6470034718513489,
117
+ "num_tokens": 77464.0,
118
+ "step": 12
119
+ },
120
+ {
121
+ "epoch": 1.0,
122
+ "grad_norm": 1.4571709632873535,
123
+ "learning_rate": 0.00012686431831271524,
124
+ "loss": 1.3342,
125
+ "mean_token_accuracy": 0.7008927464485168,
126
+ "num_tokens": 81683.0,
127
+ "step": 13
128
+ },
129
+ {
130
+ "epoch": 1.08,
131
+ "grad_norm": 1.684011697769165,
132
+ "learning_rate": 0.00011565114675763822,
133
+ "loss": 1.2954,
134
+ "mean_token_accuracy": 0.6952719688415527,
135
+ "num_tokens": 87637.0,
136
+ "step": 14
137
+ },
138
+ {
139
+ "epoch": 1.16,
140
+ "grad_norm": 1.3078672885894775,
141
+ "learning_rate": 0.00010434885324236181,
142
+ "loss": 1.342,
143
+ "mean_token_accuracy": 0.703945592045784,
144
+ "num_tokens": 95359.0,
145
+ "step": 15
146
+ },
147
+ {
148
+ "epoch": 1.24,
149
+ "grad_norm": 1.4715125560760498,
150
+ "learning_rate": 9.313568168728477e-05,
151
+ "loss": 1.2901,
152
+ "mean_token_accuracy": 0.6959670931100845,
153
+ "num_tokens": 101641.0,
154
+ "step": 16
155
+ },
156
+ {
157
+ "epoch": 1.32,
158
+ "grad_norm": 1.3283480405807495,
159
+ "learning_rate": 8.218847050625476e-05,
160
+ "loss": 1.1362,
161
+ "mean_token_accuracy": 0.7178478389978409,
162
+ "num_tokens": 108342.0,
163
+ "step": 17
164
+ },
165
+ {
166
+ "epoch": 1.4,
167
+ "grad_norm": 1.327387809753418,
168
+ "learning_rate": 7.167986375914346e-05,
169
+ "loss": 1.1269,
170
+ "mean_token_accuracy": 0.7322176843881607,
171
+ "num_tokens": 114833.0,
172
+ "step": 18
173
+ },
174
+ {
175
+ "epoch": 1.48,
176
+ "grad_norm": 1.122194528579712,
177
+ "learning_rate": 6.177558845189028e-05,
178
+ "loss": 1.0773,
179
+ "mean_token_accuracy": 0.7569508403539658,
180
+ "num_tokens": 121976.0,
181
+ "step": 19
182
+ },
183
+ {
184
+ "epoch": 1.56,
185
+ "grad_norm": 1.1730917692184448,
186
+ "learning_rate": 5.263184092261793e-05,
187
+ "loss": 1.0109,
188
+ "mean_token_accuracy": 0.754095271229744,
189
+ "num_tokens": 128634.0,
190
+ "step": 20
191
+ },
192
+ {
193
+ "epoch": 1.6400000000000001,
194
+ "grad_norm": 1.4131770133972168,
195
+ "learning_rate": 4.439282353207298e-05,
196
+ "loss": 0.9114,
197
+ "mean_token_accuracy": 0.7913004755973816,
198
+ "num_tokens": 133972.0,
199
+ "step": 21
200
+ },
201
+ {
202
+ "epoch": 1.72,
203
+ "grad_norm": 1.2294565439224243,
204
+ "learning_rate": 3.718847050625475e-05,
205
+ "loss": 1.071,
206
+ "mean_token_accuracy": 0.7639565318822861,
207
+ "num_tokens": 139918.0,
208
+ "step": 22
209
+ },
210
+ {
211
+ "epoch": 1.8,
212
+ "grad_norm": 1.0633904933929443,
213
+ "learning_rate": 3.11323987960523e-05,
214
+ "loss": 0.9636,
215
+ "mean_token_accuracy": 0.7887532860040665,
216
+ "num_tokens": 146644.0,
217
+ "step": 23
218
+ },
219
+ {
220
+ "epoch": 1.88,
221
+ "grad_norm": 0.9813216924667358,
222
+ "learning_rate": 2.6320116270057383e-05,
223
+ "loss": 0.988,
224
+ "mean_token_accuracy": 0.7717449218034744,
225
+ "num_tokens": 153762.0,
226
+ "step": 24
227
+ },
228
+ {
229
+ "epoch": 1.96,
230
+ "grad_norm": 1.2400591373443604,
231
+ "learning_rate": 2.2827515498423204e-05,
232
+ "loss": 0.9038,
233
+ "mean_token_accuracy": 0.7948577702045441,
234
+ "num_tokens": 159877.0,
235
+ "step": 25
236
+ },
237
+ {
238
+ "epoch": 2.0,
239
+ "grad_norm": 1.0573883056640625,
240
+ "learning_rate": 2.0709676881697005e-05,
241
+ "loss": 0.8799,
242
+ "mean_token_accuracy": 0.8007534444332123,
243
+ "num_tokens": 163366.0,
244
+ "step": 26
245
+ }
246
+ ],
247
+ "logging_steps": 1,
248
+ "max_steps": 26,
249
+ "num_input_tokens_seen": 0,
250
+ "num_train_epochs": 2,
251
+ "save_steps": 500,
252
+ "stateful_callbacks": {
253
+ "TrainerControl": {
254
+ "args": {
255
+ "should_epoch_stop": false,
256
+ "should_evaluate": false,
257
+ "should_log": false,
258
+ "should_save": true,
259
+ "should_training_stop": true
260
+ },
261
+ "attributes": {}
262
+ }
263
+ },
264
+ "total_flos": 3.001657855634381e+16,
265
+ "train_batch_size": 4,
266
+ "trial_name": null,
267
+ "trial_params": null
268
+ }
checkpoint-26/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2ac6db8b03fde294248c2bfbe10dc9cd52e6f65644a0c55272d80ae1976eadb
3
+ size 6225
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dabf3bdf0b418b8926069915410099280aed80abb3391c314533e131f642ce9f
3
  size 6225
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2ac6db8b03fde294248c2bfbe10dc9cd52e6f65644a0c55272d80ae1976eadb
3
  size 6225