Upload folder using huggingface_hub
Browse files- .gitattributes +4 -0
- README.md +59 -3
- adapter_config.json +49 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +397 -0
- checkpoint-63/README.md +208 -0
- checkpoint-63/adapter_config.json +49 -0
- checkpoint-63/adapter_model.safetensors +3 -0
- checkpoint-63/chat_template.jinja +397 -0
- checkpoint-63/optimizer.pt +3 -0
- checkpoint-63/rng_state.pth +3 -0
- checkpoint-63/scheduler.pt +3 -0
- checkpoint-63/special_tokens_map.json +23 -0
- checkpoint-63/tokenizer.json +3 -0
- checkpoint-63/tokenizer_config.json +183 -0
- checkpoint-63/trainer_state.json +142 -0
- checkpoint-63/training_args.bin +3 -0
- gpt-oss-20b-multilingual-reasoner/README.md +59 -0
- gpt-oss-20b-multilingual-reasoner/adapter_config.json +49 -0
- gpt-oss-20b-multilingual-reasoner/adapter_model.safetensors +3 -0
- gpt-oss-20b-multilingual-reasoner/chat_template.jinja +397 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/README.md +208 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/adapter_config.json +49 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/adapter_model.safetensors +3 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/chat_template.jinja +397 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/optimizer.pt +3 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/rng_state.pth +3 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/scheduler.pt +3 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/special_tokens_map.json +23 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/tokenizer.json +3 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/tokenizer_config.json +183 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/trainer_state.json +142 -0
- gpt-oss-20b-multilingual-reasoner/checkpoint-63/training_args.bin +3 -0
- gpt-oss-20b-multilingual-reasoner/special_tokens_map.json +23 -0
- gpt-oss-20b-multilingual-reasoner/tokenizer.json +3 -0
- gpt-oss-20b-multilingual-reasoner/tokenizer_config.json +183 -0
- gpt-oss-20b-multilingual-reasoner/training_args.bin +3 -0
- special_tokens_map.json +23 -0
- tokenizer.json +3 -0
- tokenizer_config.json +183 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,7 @@ 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 |
+
checkpoint-63/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
gpt-oss-20b-multilingual-reasoner/checkpoint-63/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
38 |
+
gpt-oss-20b-multilingual-reasoner/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
39 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,59 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: openai/gpt-oss-20b
|
3 |
+
datasets: HuggingFaceH4/Multilingual-Thinking
|
4 |
+
library_name: transformers
|
5 |
+
model_name: gpt-oss-20b-multilingual-reasoner
|
6 |
+
tags:
|
7 |
+
- generated_from_trainer
|
8 |
+
- trl
|
9 |
+
- sft
|
10 |
+
licence: license
|
11 |
+
---
|
12 |
+
|
13 |
+
# Model Card for gpt-oss-20b-multilingual-reasoner
|
14 |
+
|
15 |
+
This model is a fine-tuned version of [openai/gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b) on the [HuggingFaceH4/Multilingual-Thinking](https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking) dataset.
|
16 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
17 |
+
|
18 |
+
## Quick start
|
19 |
+
|
20 |
+
```python
|
21 |
+
from transformers import pipeline
|
22 |
+
|
23 |
+
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?"
|
24 |
+
generator = pipeline("text-generation", model="Tonic/gpt-oss-20b-multilingual-reasoner", device="cuda")
|
25 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
26 |
+
print(output["generated_text"])
|
27 |
+
```
|
28 |
+
|
29 |
+
## Training procedure
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
This model was trained with SFT.
|
35 |
+
|
36 |
+
### Framework versions
|
37 |
+
|
38 |
+
- TRL: 0.21.0
|
39 |
+
- Transformers: 4.56.0.dev0
|
40 |
+
- Pytorch: 2.7.1+cu118
|
41 |
+
- Datasets: 4.0.0
|
42 |
+
- Tokenizers: 0.21.4
|
43 |
+
|
44 |
+
## Citations
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
Cite TRL as:
|
49 |
+
|
50 |
+
```bibtex
|
51 |
+
@misc{vonwerra2022trl,
|
52 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
53 |
+
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},
|
54 |
+
year = 2020,
|
55 |
+
journal = {GitHub repository},
|
56 |
+
publisher = {GitHub},
|
57 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
58 |
+
}
|
59 |
+
```
|
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 |
+
"o_proj",
|
32 |
+
"v_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 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ef020e65d85ce9bdb0124557260a1a71418ae9c680f7140cc8a95b49da14b39
|
3 |
+
size 60189176
|
chat_template.jinja
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{{- "{
|
88 |
+
" }}
|
89 |
+
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
|
90 |
+
{{- prop_name -}}
|
91 |
+
{%- if prop_name not in (param_spec.required or []) -%}
|
92 |
+
{{- "?" }}
|
93 |
+
{%- endif -%}
|
94 |
+
{{- ": " }}
|
95 |
+
{{ render_typescript_type(prop_spec, param_spec.required or []) }}
|
96 |
+
{%- if not loop.last -%}
|
97 |
+
{{-", " }}
|
98 |
+
{%- endif -%}
|
99 |
+
{%- endfor -%}
|
100 |
+
{{- "}" }}
|
101 |
+
{%- else -%}
|
102 |
+
{{- "object" }}
|
103 |
+
{%- endif -%}
|
104 |
+
{%- else -%}
|
105 |
+
{{- "any" }}
|
106 |
+
{%- endif -%}
|
107 |
+
{%- endmacro -%}
|
108 |
+
|
109 |
+
{%- macro render_tool_namespace(namespace_name, tools) -%}
|
110 |
+
{{- "## " + namespace_name + "
|
111 |
+
|
112 |
+
" }}
|
113 |
+
{{- "namespace " + namespace_name + " {
|
114 |
+
|
115 |
+
" }}
|
116 |
+
{%- for tool in tools %}
|
117 |
+
{%- set tool = tool.function %}
|
118 |
+
{{- "// " + tool.description + "
|
119 |
+
" }}
|
120 |
+
{{- "type "+ tool.name + " = " }}
|
121 |
+
{%- if tool.parameters and tool.parameters.properties %}
|
122 |
+
{{- "(_: {
|
123 |
+
" }}
|
124 |
+
{%- for param_name, param_spec in tool.parameters.properties.items() %}
|
125 |
+
{%- if param_spec.description %}
|
126 |
+
{{- "// " + param_spec.description + "
|
127 |
+
" }}
|
128 |
+
{%- endif %}
|
129 |
+
{{- param_name }}
|
130 |
+
{%- if param_name not in (tool.parameters.required or []) -%}
|
131 |
+
{{- "?" }}
|
132 |
+
{%- endif -%}
|
133 |
+
{{- ": " }}
|
134 |
+
{{- render_typescript_type(param_spec, tool.parameters.required or []) }}
|
135 |
+
{%- if param_spec.default is defined -%}
|
136 |
+
{%- if param_spec.enum %}
|
137 |
+
{{- ", // default: " + param_spec.default }}
|
138 |
+
{%- elif param_spec.oneOf %}
|
139 |
+
{{- "// default: " + param_spec.default }}
|
140 |
+
{%- else %}
|
141 |
+
{{- ", // default: " + param_spec.default|tojson }}
|
142 |
+
{%- endif -%}
|
143 |
+
{%- endif -%}
|
144 |
+
{%- if not loop.last %}
|
145 |
+
{{- ",
|
146 |
+
" }}
|
147 |
+
{%- else %}
|
148 |
+
{{- "
|
149 |
+
" }}
|
150 |
+
{%- endif -%}
|
151 |
+
{%- endfor %}
|
152 |
+
{{- "}) => any;
|
153 |
+
|
154 |
+
" }}
|
155 |
+
{%- else -%}
|
156 |
+
{{- "() => any;
|
157 |
+
|
158 |
+
" }}
|
159 |
+
{%- endif -%}
|
160 |
+
{%- endfor %}
|
161 |
+
{{- "} // namespace " + namespace_name }}
|
162 |
+
{%- endmacro -%}
|
163 |
+
|
164 |
+
{%- macro render_builtin_tools(browser_tool, python_tool) -%}
|
165 |
+
{%- if browser_tool %}
|
166 |
+
{{- "## browser
|
167 |
+
|
168 |
+
" }}
|
169 |
+
{{- "// Tool for browsing.
|
170 |
+
" }}
|
171 |
+
{{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.
|
172 |
+
" }}
|
173 |
+
{{- "// Cite information from the tool using the following format:
|
174 |
+
" }}
|
175 |
+
{{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.
|
176 |
+
" }}
|
177 |
+
{{- "// Do not quote more than 10 words directly from the tool output.
|
178 |
+
" }}
|
179 |
+
{{- "// sources=web (default: web)
|
180 |
+
" }}
|
181 |
+
{{- "namespace browser {
|
182 |
+
|
183 |
+
" }}
|
184 |
+
{{- "// Searches for information related to `query` and displays `topn` results.
|
185 |
+
" }}
|
186 |
+
{{- "type search = (_: {
|
187 |
+
" }}
|
188 |
+
{{- "query: string,
|
189 |
+
" }}
|
190 |
+
{{- "topn?: number, // default: 10
|
191 |
+
" }}
|
192 |
+
{{- "source?: string,
|
193 |
+
" }}
|
194 |
+
{{- "}) => any;
|
195 |
+
|
196 |
+
" }}
|
197 |
+
{{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.
|
198 |
+
" }}
|
199 |
+
{{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.
|
200 |
+
" }}
|
201 |
+
{{- "// If `cursor` is not provided, the most recent page is implied.
|
202 |
+
" }}
|
203 |
+
{{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.
|
204 |
+
" }}
|
205 |
+
{{- "// 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.
|
206 |
+
" }}
|
207 |
+
{{- "// Use this function without `id` to scroll to a new location of an opened page.
|
208 |
+
" }}
|
209 |
+
{{- "type open = (_: {
|
210 |
+
" }}
|
211 |
+
{{- "id?: number | string, // default: -1
|
212 |
+
" }}
|
213 |
+
{{- "cursor?: number, // default: -1
|
214 |
+
" }}
|
215 |
+
{{- "loc?: number, // default: -1
|
216 |
+
" }}
|
217 |
+
{{- "num_lines?: number, // default: -1
|
218 |
+
" }}
|
219 |
+
{{- "view_source?: boolean, // default: false
|
220 |
+
" }}
|
221 |
+
{{- "source?: string,
|
222 |
+
" }}
|
223 |
+
{{- "}) => any;
|
224 |
+
|
225 |
+
" }}
|
226 |
+
{{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.
|
227 |
+
" }}
|
228 |
+
{{- "type find = (_: {
|
229 |
+
" }}
|
230 |
+
{{- "pattern: string,
|
231 |
+
" }}
|
232 |
+
{{- "cursor?: number, // default: -1
|
233 |
+
" }}
|
234 |
+
{{- "}) => any;
|
235 |
+
|
236 |
+
" }}
|
237 |
+
{{- "} // namespace browser
|
238 |
+
|
239 |
+
" }}
|
240 |
+
{%- endif -%}
|
241 |
+
|
242 |
+
{%- if python_tool %}
|
243 |
+
{{- "## python
|
244 |
+
|
245 |
+
" }}
|
246 |
+
{{- "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).
|
247 |
+
|
248 |
+
" }}
|
249 |
+
{{- "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.
|
250 |
+
|
251 |
+
" }}
|
252 |
+
{%- endif -%}
|
253 |
+
{%- endmacro -%}
|
254 |
+
|
255 |
+
{#- System Message Construction ============================================ #}
|
256 |
+
{%- macro build_system_message() -%}
|
257 |
+
{%- if model_identity is not defined %}
|
258 |
+
{%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
|
259 |
+
{%- endif %}
|
260 |
+
{{- model_identity + "
|
261 |
+
" }}
|
262 |
+
{{- "Knowledge cutoff: 2024-06
|
263 |
+
" }}
|
264 |
+
{{- "Current date: " + strftime_now("%Y-%m-%d") + "
|
265 |
+
|
266 |
+
" }}
|
267 |
+
{%- if reasoning_effort is not defined %}
|
268 |
+
{%- set reasoning_effort = "medium" %}
|
269 |
+
{%- endif %}
|
270 |
+
{{- "Reasoning: " + reasoning_effort + "
|
271 |
+
|
272 |
+
" }}
|
273 |
+
{%- if builtin_tools %}
|
274 |
+
{{- "# Tools
|
275 |
+
|
276 |
+
" }}
|
277 |
+
{%- set available_builtin_tools = namespace(browser=false, python=false) %}
|
278 |
+
{%- for tool in builtin_tools %}
|
279 |
+
{%- if tool == "browser" %}
|
280 |
+
{%- set available_builtin_tools.browser = true %}
|
281 |
+
{%- elif tool == "python" %}
|
282 |
+
{%- set available_builtin_tools.python = true %}
|
283 |
+
{%- endif %}
|
284 |
+
{%- endfor %}
|
285 |
+
{{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
|
286 |
+
{%- endif -%}
|
287 |
+
{{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
|
288 |
+
{%- if tools -%}
|
289 |
+
{{- "
|
290 |
+
Calls to these tools must go to the commentary channel: 'functions'." }}
|
291 |
+
{%- endif -%}
|
292 |
+
{%- endmacro -%}
|
293 |
+
|
294 |
+
{#- Main Template Logic ================================================= #}
|
295 |
+
{#- Set defaults #}
|
296 |
+
|
297 |
+
{#- Render system message #}
|
298 |
+
{{- "<|start|>system<|message|>" }}
|
299 |
+
{{- build_system_message() }}
|
300 |
+
{{- "<|end|>" }}
|
301 |
+
|
302 |
+
{#- Extract developer message #}
|
303 |
+
{%- if messages[0].role == "developer" or messages[0].role == "system" %}
|
304 |
+
{%- set developer_message = messages[0].content %}
|
305 |
+
{%- set loop_messages = messages[1:] %}
|
306 |
+
{%- else %}
|
307 |
+
{%- set developer_message = "" %}
|
308 |
+
{%- set loop_messages = messages %}
|
309 |
+
{%- endif %}
|
310 |
+
|
311 |
+
{#- Render developer message #}
|
312 |
+
{%- if developer_message or tools %}
|
313 |
+
{{- "<|start|>developer<|message|>" }}
|
314 |
+
{%- if developer_message %}
|
315 |
+
{{- "# Instructions
|
316 |
+
|
317 |
+
" }}
|
318 |
+
{{- developer_message }}
|
319 |
+
{%- endif %}
|
320 |
+
{%- if tools -%}
|
321 |
+
{{- "
|
322 |
+
|
323 |
+
" }}
|
324 |
+
{{- "# Tools
|
325 |
+
|
326 |
+
" }}
|
327 |
+
{{- render_tool_namespace("functions", tools) }}
|
328 |
+
{%- endif -%}
|
329 |
+
{{- "<|end|>" }}
|
330 |
+
{%- endif %}
|
331 |
+
|
332 |
+
{#- Render messages #}
|
333 |
+
{%- set last_tool_call = namespace(name=none) %}
|
334 |
+
{%- for message in loop_messages -%}
|
335 |
+
{#- At this point only assistant/user/tool messages should remain #}
|
336 |
+
{%- if message.role == 'assistant' -%}
|
337 |
+
{#- Checks to ensure the messages are being passed in the format we expect #}
|
338 |
+
{%- if "content" in message %}
|
339 |
+
{%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
|
340 |
+
{{- 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.") }}
|
341 |
+
{%- endif %}
|
342 |
+
{%- endif %}
|
343 |
+
{%- if "thinking" in message %}
|
344 |
+
{%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
|
345 |
+
{{- 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.") }}
|
346 |
+
{%- endif %}
|
347 |
+
{%- endif %}
|
348 |
+
{%- if "tool_calls" in message %}
|
349 |
+
{#- We assume max 1 tool call per message, and so we infer the tool call name #}
|
350 |
+
{#- in "tool" messages from the most recent assistant tool call name #}
|
351 |
+
{%- set tool_call = message.tool_calls[0] %}
|
352 |
+
{%- if tool_call.function %}
|
353 |
+
{%- set tool_call = tool_call.function %}
|
354 |
+
{%- endif %}
|
355 |
+
{%- if message.content and message.thinking %}
|
356 |
+
{{- 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.") }}
|
357 |
+
{%- elif message.content %}
|
358 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
|
359 |
+
{%- elif message.thinking %}
|
360 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
361 |
+
{%- endif %}
|
362 |
+
{{- "<|start|>assistant to=" }}
|
363 |
+
{{- "functions." + tool_call.name + "<|channel|>commentary " }}
|
364 |
+
{{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
|
365 |
+
{{- tool_call.arguments|tojson }}
|
366 |
+
{{- "<|call|>" }}
|
367 |
+
{%- set last_tool_call.name = tool_call.name %}
|
368 |
+
{%- elif loop.last and not add_generation_prompt %}
|
369 |
+
{#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
|
370 |
+
{#- This is a situation that should only occur in training, never in inference. #}
|
371 |
+
{%- if "thinking" in message %}
|
372 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
373 |
+
{%- endif %}
|
374 |
+
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
375 |
+
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
376 |
+
{#- when training, so the model learns to emit it. #}
|
377 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
|
378 |
+
{%- else %}
|
379 |
+
{#- CoT is dropped during all previous turns, so we never render it for inference #}
|
380 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
|
381 |
+
{%- set last_tool_call.name = none %}
|
382 |
+
{%- endif %}
|
383 |
+
{%- elif message.role == 'tool' -%}
|
384 |
+
{%- if last_tool_call.name is none %}
|
385 |
+
{{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
|
386 |
+
{%- endif %}
|
387 |
+
{{- "<|start|>functions." + last_tool_call.name }}
|
388 |
+
{{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
|
389 |
+
{%- elif message.role == 'user' -%}
|
390 |
+
{{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
|
391 |
+
{%- endif -%}
|
392 |
+
{%- endfor -%}
|
393 |
+
|
394 |
+
{#- Generation prompt #}
|
395 |
+
{%- if add_generation_prompt -%}
|
396 |
+
<|start|>assistant
|
397 |
+
{%- endif -%}
|
checkpoint-63/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-63/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 |
+
"o_proj",
|
32 |
+
"v_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-63/adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ef020e65d85ce9bdb0124557260a1a71418ae9c680f7140cc8a95b49da14b39
|
3 |
+
size 60189176
|
checkpoint-63/chat_template.jinja
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{{- "{
|
88 |
+
" }}
|
89 |
+
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
|
90 |
+
{{- prop_name -}}
|
91 |
+
{%- if prop_name not in (param_spec.required or []) -%}
|
92 |
+
{{- "?" }}
|
93 |
+
{%- endif -%}
|
94 |
+
{{- ": " }}
|
95 |
+
{{ render_typescript_type(prop_spec, param_spec.required or []) }}
|
96 |
+
{%- if not loop.last -%}
|
97 |
+
{{-", " }}
|
98 |
+
{%- endif -%}
|
99 |
+
{%- endfor -%}
|
100 |
+
{{- "}" }}
|
101 |
+
{%- else -%}
|
102 |
+
{{- "object" }}
|
103 |
+
{%- endif -%}
|
104 |
+
{%- else -%}
|
105 |
+
{{- "any" }}
|
106 |
+
{%- endif -%}
|
107 |
+
{%- endmacro -%}
|
108 |
+
|
109 |
+
{%- macro render_tool_namespace(namespace_name, tools) -%}
|
110 |
+
{{- "## " + namespace_name + "
|
111 |
+
|
112 |
+
" }}
|
113 |
+
{{- "namespace " + namespace_name + " {
|
114 |
+
|
115 |
+
" }}
|
116 |
+
{%- for tool in tools %}
|
117 |
+
{%- set tool = tool.function %}
|
118 |
+
{{- "// " + tool.description + "
|
119 |
+
" }}
|
120 |
+
{{- "type "+ tool.name + " = " }}
|
121 |
+
{%- if tool.parameters and tool.parameters.properties %}
|
122 |
+
{{- "(_: {
|
123 |
+
" }}
|
124 |
+
{%- for param_name, param_spec in tool.parameters.properties.items() %}
|
125 |
+
{%- if param_spec.description %}
|
126 |
+
{{- "// " + param_spec.description + "
|
127 |
+
" }}
|
128 |
+
{%- endif %}
|
129 |
+
{{- param_name }}
|
130 |
+
{%- if param_name not in (tool.parameters.required or []) -%}
|
131 |
+
{{- "?" }}
|
132 |
+
{%- endif -%}
|
133 |
+
{{- ": " }}
|
134 |
+
{{- render_typescript_type(param_spec, tool.parameters.required or []) }}
|
135 |
+
{%- if param_spec.default is defined -%}
|
136 |
+
{%- if param_spec.enum %}
|
137 |
+
{{- ", // default: " + param_spec.default }}
|
138 |
+
{%- elif param_spec.oneOf %}
|
139 |
+
{{- "// default: " + param_spec.default }}
|
140 |
+
{%- else %}
|
141 |
+
{{- ", // default: " + param_spec.default|tojson }}
|
142 |
+
{%- endif -%}
|
143 |
+
{%- endif -%}
|
144 |
+
{%- if not loop.last %}
|
145 |
+
{{- ",
|
146 |
+
" }}
|
147 |
+
{%- else %}
|
148 |
+
{{- "
|
149 |
+
" }}
|
150 |
+
{%- endif -%}
|
151 |
+
{%- endfor %}
|
152 |
+
{{- "}) => any;
|
153 |
+
|
154 |
+
" }}
|
155 |
+
{%- else -%}
|
156 |
+
{{- "() => any;
|
157 |
+
|
158 |
+
" }}
|
159 |
+
{%- endif -%}
|
160 |
+
{%- endfor %}
|
161 |
+
{{- "} // namespace " + namespace_name }}
|
162 |
+
{%- endmacro -%}
|
163 |
+
|
164 |
+
{%- macro render_builtin_tools(browser_tool, python_tool) -%}
|
165 |
+
{%- if browser_tool %}
|
166 |
+
{{- "## browser
|
167 |
+
|
168 |
+
" }}
|
169 |
+
{{- "// Tool for browsing.
|
170 |
+
" }}
|
171 |
+
{{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.
|
172 |
+
" }}
|
173 |
+
{{- "// Cite information from the tool using the following format:
|
174 |
+
" }}
|
175 |
+
{{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.
|
176 |
+
" }}
|
177 |
+
{{- "// Do not quote more than 10 words directly from the tool output.
|
178 |
+
" }}
|
179 |
+
{{- "// sources=web (default: web)
|
180 |
+
" }}
|
181 |
+
{{- "namespace browser {
|
182 |
+
|
183 |
+
" }}
|
184 |
+
{{- "// Searches for information related to `query` and displays `topn` results.
|
185 |
+
" }}
|
186 |
+
{{- "type search = (_: {
|
187 |
+
" }}
|
188 |
+
{{- "query: string,
|
189 |
+
" }}
|
190 |
+
{{- "topn?: number, // default: 10
|
191 |
+
" }}
|
192 |
+
{{- "source?: string,
|
193 |
+
" }}
|
194 |
+
{{- "}) => any;
|
195 |
+
|
196 |
+
" }}
|
197 |
+
{{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.
|
198 |
+
" }}
|
199 |
+
{{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.
|
200 |
+
" }}
|
201 |
+
{{- "// If `cursor` is not provided, the most recent page is implied.
|
202 |
+
" }}
|
203 |
+
{{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.
|
204 |
+
" }}
|
205 |
+
{{- "// 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.
|
206 |
+
" }}
|
207 |
+
{{- "// Use this function without `id` to scroll to a new location of an opened page.
|
208 |
+
" }}
|
209 |
+
{{- "type open = (_: {
|
210 |
+
" }}
|
211 |
+
{{- "id?: number | string, // default: -1
|
212 |
+
" }}
|
213 |
+
{{- "cursor?: number, // default: -1
|
214 |
+
" }}
|
215 |
+
{{- "loc?: number, // default: -1
|
216 |
+
" }}
|
217 |
+
{{- "num_lines?: number, // default: -1
|
218 |
+
" }}
|
219 |
+
{{- "view_source?: boolean, // default: false
|
220 |
+
" }}
|
221 |
+
{{- "source?: string,
|
222 |
+
" }}
|
223 |
+
{{- "}) => any;
|
224 |
+
|
225 |
+
" }}
|
226 |
+
{{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.
|
227 |
+
" }}
|
228 |
+
{{- "type find = (_: {
|
229 |
+
" }}
|
230 |
+
{{- "pattern: string,
|
231 |
+
" }}
|
232 |
+
{{- "cursor?: number, // default: -1
|
233 |
+
" }}
|
234 |
+
{{- "}) => any;
|
235 |
+
|
236 |
+
" }}
|
237 |
+
{{- "} // namespace browser
|
238 |
+
|
239 |
+
" }}
|
240 |
+
{%- endif -%}
|
241 |
+
|
242 |
+
{%- if python_tool %}
|
243 |
+
{{- "## python
|
244 |
+
|
245 |
+
" }}
|
246 |
+
{{- "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).
|
247 |
+
|
248 |
+
" }}
|
249 |
+
{{- "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.
|
250 |
+
|
251 |
+
" }}
|
252 |
+
{%- endif -%}
|
253 |
+
{%- endmacro -%}
|
254 |
+
|
255 |
+
{#- System Message Construction ============================================ #}
|
256 |
+
{%- macro build_system_message() -%}
|
257 |
+
{%- if model_identity is not defined %}
|
258 |
+
{%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
|
259 |
+
{%- endif %}
|
260 |
+
{{- model_identity + "
|
261 |
+
" }}
|
262 |
+
{{- "Knowledge cutoff: 2024-06
|
263 |
+
" }}
|
264 |
+
{{- "Current date: " + strftime_now("%Y-%m-%d") + "
|
265 |
+
|
266 |
+
" }}
|
267 |
+
{%- if reasoning_effort is not defined %}
|
268 |
+
{%- set reasoning_effort = "medium" %}
|
269 |
+
{%- endif %}
|
270 |
+
{{- "Reasoning: " + reasoning_effort + "
|
271 |
+
|
272 |
+
" }}
|
273 |
+
{%- if builtin_tools %}
|
274 |
+
{{- "# Tools
|
275 |
+
|
276 |
+
" }}
|
277 |
+
{%- set available_builtin_tools = namespace(browser=false, python=false) %}
|
278 |
+
{%- for tool in builtin_tools %}
|
279 |
+
{%- if tool == "browser" %}
|
280 |
+
{%- set available_builtin_tools.browser = true %}
|
281 |
+
{%- elif tool == "python" %}
|
282 |
+
{%- set available_builtin_tools.python = true %}
|
283 |
+
{%- endif %}
|
284 |
+
{%- endfor %}
|
285 |
+
{{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
|
286 |
+
{%- endif -%}
|
287 |
+
{{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
|
288 |
+
{%- if tools -%}
|
289 |
+
{{- "
|
290 |
+
Calls to these tools must go to the commentary channel: 'functions'." }}
|
291 |
+
{%- endif -%}
|
292 |
+
{%- endmacro -%}
|
293 |
+
|
294 |
+
{#- Main Template Logic ================================================= #}
|
295 |
+
{#- Set defaults #}
|
296 |
+
|
297 |
+
{#- Render system message #}
|
298 |
+
{{- "<|start|>system<|message|>" }}
|
299 |
+
{{- build_system_message() }}
|
300 |
+
{{- "<|end|>" }}
|
301 |
+
|
302 |
+
{#- Extract developer message #}
|
303 |
+
{%- if messages[0].role == "developer" or messages[0].role == "system" %}
|
304 |
+
{%- set developer_message = messages[0].content %}
|
305 |
+
{%- set loop_messages = messages[1:] %}
|
306 |
+
{%- else %}
|
307 |
+
{%- set developer_message = "" %}
|
308 |
+
{%- set loop_messages = messages %}
|
309 |
+
{%- endif %}
|
310 |
+
|
311 |
+
{#- Render developer message #}
|
312 |
+
{%- if developer_message or tools %}
|
313 |
+
{{- "<|start|>developer<|message|>" }}
|
314 |
+
{%- if developer_message %}
|
315 |
+
{{- "# Instructions
|
316 |
+
|
317 |
+
" }}
|
318 |
+
{{- developer_message }}
|
319 |
+
{%- endif %}
|
320 |
+
{%- if tools -%}
|
321 |
+
{{- "
|
322 |
+
|
323 |
+
" }}
|
324 |
+
{{- "# Tools
|
325 |
+
|
326 |
+
" }}
|
327 |
+
{{- render_tool_namespace("functions", tools) }}
|
328 |
+
{%- endif -%}
|
329 |
+
{{- "<|end|>" }}
|
330 |
+
{%- endif %}
|
331 |
+
|
332 |
+
{#- Render messages #}
|
333 |
+
{%- set last_tool_call = namespace(name=none) %}
|
334 |
+
{%- for message in loop_messages -%}
|
335 |
+
{#- At this point only assistant/user/tool messages should remain #}
|
336 |
+
{%- if message.role == 'assistant' -%}
|
337 |
+
{#- Checks to ensure the messages are being passed in the format we expect #}
|
338 |
+
{%- if "content" in message %}
|
339 |
+
{%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
|
340 |
+
{{- 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.") }}
|
341 |
+
{%- endif %}
|
342 |
+
{%- endif %}
|
343 |
+
{%- if "thinking" in message %}
|
344 |
+
{%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
|
345 |
+
{{- 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.") }}
|
346 |
+
{%- endif %}
|
347 |
+
{%- endif %}
|
348 |
+
{%- if "tool_calls" in message %}
|
349 |
+
{#- We assume max 1 tool call per message, and so we infer the tool call name #}
|
350 |
+
{#- in "tool" messages from the most recent assistant tool call name #}
|
351 |
+
{%- set tool_call = message.tool_calls[0] %}
|
352 |
+
{%- if tool_call.function %}
|
353 |
+
{%- set tool_call = tool_call.function %}
|
354 |
+
{%- endif %}
|
355 |
+
{%- if message.content and message.thinking %}
|
356 |
+
{{- 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.") }}
|
357 |
+
{%- elif message.content %}
|
358 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
|
359 |
+
{%- elif message.thinking %}
|
360 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
361 |
+
{%- endif %}
|
362 |
+
{{- "<|start|>assistant to=" }}
|
363 |
+
{{- "functions." + tool_call.name + "<|channel|>commentary " }}
|
364 |
+
{{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
|
365 |
+
{{- tool_call.arguments|tojson }}
|
366 |
+
{{- "<|call|>" }}
|
367 |
+
{%- set last_tool_call.name = tool_call.name %}
|
368 |
+
{%- elif loop.last and not add_generation_prompt %}
|
369 |
+
{#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
|
370 |
+
{#- This is a situation that should only occur in training, never in inference. #}
|
371 |
+
{%- if "thinking" in message %}
|
372 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
373 |
+
{%- endif %}
|
374 |
+
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
375 |
+
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
376 |
+
{#- when training, so the model learns to emit it. #}
|
377 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
|
378 |
+
{%- else %}
|
379 |
+
{#- CoT is dropped during all previous turns, so we never render it for inference #}
|
380 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
|
381 |
+
{%- set last_tool_call.name = none %}
|
382 |
+
{%- endif %}
|
383 |
+
{%- elif message.role == 'tool' -%}
|
384 |
+
{%- if last_tool_call.name is none %}
|
385 |
+
{{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
|
386 |
+
{%- endif %}
|
387 |
+
{{- "<|start|>functions." + last_tool_call.name }}
|
388 |
+
{{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
|
389 |
+
{%- elif message.role == 'user' -%}
|
390 |
+
{{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
|
391 |
+
{%- endif -%}
|
392 |
+
{%- endfor -%}
|
393 |
+
|
394 |
+
{#- Generation prompt #}
|
395 |
+
{%- if add_generation_prompt -%}
|
396 |
+
<|start|>assistant
|
397 |
+
{%- endif -%}
|
checkpoint-63/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d459e76c7818ef07c6088f1aa627c180c8cc43017883e88a5694c61199aa8ece
|
3 |
+
size 120495883
|
checkpoint-63/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c15d10da233568de54180256b227cfe26dea6eaac6df08048357111de9ef60d
|
3 |
+
size 14645
|
checkpoint-63/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7e02836da3486a06ad65f49e2017068b9573f7ba2b36b519859138059435242f
|
3 |
+
size 1465
|
checkpoint-63/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-63/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
|
3 |
+
size 27868174
|
checkpoint-63/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-63/trainer_state.json
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_global_step": null,
|
3 |
+
"best_metric": null,
|
4 |
+
"best_model_checkpoint": null,
|
5 |
+
"epoch": 1.0,
|
6 |
+
"eval_steps": 500,
|
7 |
+
"global_step": 63,
|
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": 1.6024624109268188,
|
15 |
+
"learning_rate": 0.000199522988805313,
|
16 |
+
"loss": 2.0529,
|
17 |
+
"mean_token_accuracy": 0.559639161452651,
|
18 |
+
"num_tokens": 64985.0,
|
19 |
+
"step": 5
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"epoch": 0.16,
|
23 |
+
"grad_norm": 1.0667455196380615,
|
24 |
+
"learning_rate": 0.00019421451371364444,
|
25 |
+
"loss": 1.5192,
|
26 |
+
"mean_token_accuracy": 0.6313199333846569,
|
27 |
+
"num_tokens": 132654.0,
|
28 |
+
"step": 10
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"epoch": 0.24,
|
32 |
+
"grad_norm": 0.6989722847938538,
|
33 |
+
"learning_rate": 0.00018335255037651302,
|
34 |
+
"loss": 1.2651,
|
35 |
+
"mean_token_accuracy": 0.66771609634161,
|
36 |
+
"num_tokens": 200863.0,
|
37 |
+
"step": 15
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 0.32,
|
41 |
+
"grad_norm": 0.49305838346481323,
|
42 |
+
"learning_rate": 0.0001676533860828358,
|
43 |
+
"loss": 1.1965,
|
44 |
+
"mean_token_accuracy": 0.6907071858644486,
|
45 |
+
"num_tokens": 265471.0,
|
46 |
+
"step": 20
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"epoch": 0.4,
|
50 |
+
"grad_norm": 0.3976356089115143,
|
51 |
+
"learning_rate": 0.0001481522951638875,
|
52 |
+
"loss": 1.1184,
|
53 |
+
"mean_token_accuracy": 0.7011254012584687,
|
54 |
+
"num_tokens": 335362.0,
|
55 |
+
"step": 25
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"epoch": 0.48,
|
59 |
+
"grad_norm": 0.32982659339904785,
|
60 |
+
"learning_rate": 0.00012613526829296622,
|
61 |
+
"loss": 1.0825,
|
62 |
+
"mean_token_accuracy": 0.7074193194508552,
|
63 |
+
"num_tokens": 403159.0,
|
64 |
+
"step": 30
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"epoch": 0.56,
|
68 |
+
"grad_norm": 0.3139457404613495,
|
69 |
+
"learning_rate": 0.00010305420840860182,
|
70 |
+
"loss": 1.1136,
|
71 |
+
"mean_token_accuracy": 0.7029193982481956,
|
72 |
+
"num_tokens": 465862.0,
|
73 |
+
"step": 35
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"epoch": 0.64,
|
77 |
+
"grad_norm": 0.3034254312515259,
|
78 |
+
"learning_rate": 8.043118562802488e-05,
|
79 |
+
"loss": 1.0445,
|
80 |
+
"mean_token_accuracy": 0.7117198631167412,
|
81 |
+
"num_tokens": 535415.0,
|
82 |
+
"step": 40
|
83 |
+
},
|
84 |
+
{
|
85 |
+
"epoch": 0.72,
|
86 |
+
"grad_norm": 0.3687556982040405,
|
87 |
+
"learning_rate": 5.9758065017582185e-05,
|
88 |
+
"loss": 1.0445,
|
89 |
+
"mean_token_accuracy": 0.7163990259170532,
|
90 |
+
"num_tokens": 600630.0,
|
91 |
+
"step": 45
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"epoch": 0.8,
|
95 |
+
"grad_norm": 0.2981916069984436,
|
96 |
+
"learning_rate": 4.2398126221653236e-05,
|
97 |
+
"loss": 1.0519,
|
98 |
+
"mean_token_accuracy": 0.7169259950518608,
|
99 |
+
"num_tokens": 669353.0,
|
100 |
+
"step": 50
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"epoch": 0.88,
|
104 |
+
"grad_norm": 0.324988454580307,
|
105 |
+
"learning_rate": 2.949616259940842e-05,
|
106 |
+
"loss": 1.0491,
|
107 |
+
"mean_token_accuracy": 0.7140479609370232,
|
108 |
+
"num_tokens": 735759.0,
|
109 |
+
"step": 55
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"epoch": 0.96,
|
113 |
+
"grad_norm": 0.31940364837646484,
|
114 |
+
"learning_rate": 2.19029883414178e-05,
|
115 |
+
"loss": 1.0886,
|
116 |
+
"mean_token_accuracy": 0.7087796837091446,
|
117 |
+
"num_tokens": 799409.0,
|
118 |
+
"step": 60
|
119 |
+
}
|
120 |
+
],
|
121 |
+
"logging_steps": 5,
|
122 |
+
"max_steps": 63,
|
123 |
+
"num_input_tokens_seen": 0,
|
124 |
+
"num_train_epochs": 1,
|
125 |
+
"save_steps": 500,
|
126 |
+
"stateful_callbacks": {
|
127 |
+
"TrainerControl": {
|
128 |
+
"args": {
|
129 |
+
"should_epoch_stop": false,
|
130 |
+
"should_evaluate": false,
|
131 |
+
"should_log": false,
|
132 |
+
"should_save": true,
|
133 |
+
"should_training_stop": true
|
134 |
+
},
|
135 |
+
"attributes": {}
|
136 |
+
}
|
137 |
+
},
|
138 |
+
"total_flos": 1.0164973639893696e+17,
|
139 |
+
"train_batch_size": 1,
|
140 |
+
"trial_name": null,
|
141 |
+
"trial_params": null
|
142 |
+
}
|
checkpoint-63/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68168b965f8c6329d7b5c66cdfc35d4160e10d303db6bbdf73915d53e803d99a
|
3 |
+
size 6161
|
gpt-oss-20b-multilingual-reasoner/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: openai/gpt-oss-20b
|
3 |
+
datasets: HuggingFaceH4/Multilingual-Thinking
|
4 |
+
library_name: transformers
|
5 |
+
model_name: gpt-oss-20b-multilingual-reasoner
|
6 |
+
tags:
|
7 |
+
- generated_from_trainer
|
8 |
+
- trl
|
9 |
+
- sft
|
10 |
+
licence: license
|
11 |
+
---
|
12 |
+
|
13 |
+
# Model Card for gpt-oss-20b-multilingual-reasoner
|
14 |
+
|
15 |
+
This model is a fine-tuned version of [openai/gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b) on the [HuggingFaceH4/Multilingual-Thinking](https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking) dataset.
|
16 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
17 |
+
|
18 |
+
## Quick start
|
19 |
+
|
20 |
+
```python
|
21 |
+
from transformers import pipeline
|
22 |
+
|
23 |
+
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?"
|
24 |
+
generator = pipeline("text-generation", model="Tonic/gpt-oss-20b-multilingual-reasoner", device="cuda")
|
25 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
26 |
+
print(output["generated_text"])
|
27 |
+
```
|
28 |
+
|
29 |
+
## Training procedure
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
This model was trained with SFT.
|
35 |
+
|
36 |
+
### Framework versions
|
37 |
+
|
38 |
+
- TRL: 0.21.0
|
39 |
+
- Transformers: 4.56.0.dev0
|
40 |
+
- Pytorch: 2.7.1+cu118
|
41 |
+
- Datasets: 4.0.0
|
42 |
+
- Tokenizers: 0.21.4
|
43 |
+
|
44 |
+
## Citations
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
Cite TRL as:
|
49 |
+
|
50 |
+
```bibtex
|
51 |
+
@misc{vonwerra2022trl,
|
52 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
53 |
+
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},
|
54 |
+
year = 2020,
|
55 |
+
journal = {GitHub repository},
|
56 |
+
publisher = {GitHub},
|
57 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
58 |
+
}
|
59 |
+
```
|
gpt-oss-20b-multilingual-reasoner/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 |
+
"o_proj",
|
32 |
+
"v_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 |
+
}
|
gpt-oss-20b-multilingual-reasoner/adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ef020e65d85ce9bdb0124557260a1a71418ae9c680f7140cc8a95b49da14b39
|
3 |
+
size 60189176
|
gpt-oss-20b-multilingual-reasoner/chat_template.jinja
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{{- "{
|
88 |
+
" }}
|
89 |
+
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
|
90 |
+
{{- prop_name -}}
|
91 |
+
{%- if prop_name not in (param_spec.required or []) -%}
|
92 |
+
{{- "?" }}
|
93 |
+
{%- endif -%}
|
94 |
+
{{- ": " }}
|
95 |
+
{{ render_typescript_type(prop_spec, param_spec.required or []) }}
|
96 |
+
{%- if not loop.last -%}
|
97 |
+
{{-", " }}
|
98 |
+
{%- endif -%}
|
99 |
+
{%- endfor -%}
|
100 |
+
{{- "}" }}
|
101 |
+
{%- else -%}
|
102 |
+
{{- "object" }}
|
103 |
+
{%- endif -%}
|
104 |
+
{%- else -%}
|
105 |
+
{{- "any" }}
|
106 |
+
{%- endif -%}
|
107 |
+
{%- endmacro -%}
|
108 |
+
|
109 |
+
{%- macro render_tool_namespace(namespace_name, tools) -%}
|
110 |
+
{{- "## " + namespace_name + "
|
111 |
+
|
112 |
+
" }}
|
113 |
+
{{- "namespace " + namespace_name + " {
|
114 |
+
|
115 |
+
" }}
|
116 |
+
{%- for tool in tools %}
|
117 |
+
{%- set tool = tool.function %}
|
118 |
+
{{- "// " + tool.description + "
|
119 |
+
" }}
|
120 |
+
{{- "type "+ tool.name + " = " }}
|
121 |
+
{%- if tool.parameters and tool.parameters.properties %}
|
122 |
+
{{- "(_: {
|
123 |
+
" }}
|
124 |
+
{%- for param_name, param_spec in tool.parameters.properties.items() %}
|
125 |
+
{%- if param_spec.description %}
|
126 |
+
{{- "// " + param_spec.description + "
|
127 |
+
" }}
|
128 |
+
{%- endif %}
|
129 |
+
{{- param_name }}
|
130 |
+
{%- if param_name not in (tool.parameters.required or []) -%}
|
131 |
+
{{- "?" }}
|
132 |
+
{%- endif -%}
|
133 |
+
{{- ": " }}
|
134 |
+
{{- render_typescript_type(param_spec, tool.parameters.required or []) }}
|
135 |
+
{%- if param_spec.default is defined -%}
|
136 |
+
{%- if param_spec.enum %}
|
137 |
+
{{- ", // default: " + param_spec.default }}
|
138 |
+
{%- elif param_spec.oneOf %}
|
139 |
+
{{- "// default: " + param_spec.default }}
|
140 |
+
{%- else %}
|
141 |
+
{{- ", // default: " + param_spec.default|tojson }}
|
142 |
+
{%- endif -%}
|
143 |
+
{%- endif -%}
|
144 |
+
{%- if not loop.last %}
|
145 |
+
{{- ",
|
146 |
+
" }}
|
147 |
+
{%- else %}
|
148 |
+
{{- "
|
149 |
+
" }}
|
150 |
+
{%- endif -%}
|
151 |
+
{%- endfor %}
|
152 |
+
{{- "}) => any;
|
153 |
+
|
154 |
+
" }}
|
155 |
+
{%- else -%}
|
156 |
+
{{- "() => any;
|
157 |
+
|
158 |
+
" }}
|
159 |
+
{%- endif -%}
|
160 |
+
{%- endfor %}
|
161 |
+
{{- "} // namespace " + namespace_name }}
|
162 |
+
{%- endmacro -%}
|
163 |
+
|
164 |
+
{%- macro render_builtin_tools(browser_tool, python_tool) -%}
|
165 |
+
{%- if browser_tool %}
|
166 |
+
{{- "## browser
|
167 |
+
|
168 |
+
" }}
|
169 |
+
{{- "// Tool for browsing.
|
170 |
+
" }}
|
171 |
+
{{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.
|
172 |
+
" }}
|
173 |
+
{{- "// Cite information from the tool using the following format:
|
174 |
+
" }}
|
175 |
+
{{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.
|
176 |
+
" }}
|
177 |
+
{{- "// Do not quote more than 10 words directly from the tool output.
|
178 |
+
" }}
|
179 |
+
{{- "// sources=web (default: web)
|
180 |
+
" }}
|
181 |
+
{{- "namespace browser {
|
182 |
+
|
183 |
+
" }}
|
184 |
+
{{- "// Searches for information related to `query` and displays `topn` results.
|
185 |
+
" }}
|
186 |
+
{{- "type search = (_: {
|
187 |
+
" }}
|
188 |
+
{{- "query: string,
|
189 |
+
" }}
|
190 |
+
{{- "topn?: number, // default: 10
|
191 |
+
" }}
|
192 |
+
{{- "source?: string,
|
193 |
+
" }}
|
194 |
+
{{- "}) => any;
|
195 |
+
|
196 |
+
" }}
|
197 |
+
{{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.
|
198 |
+
" }}
|
199 |
+
{{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.
|
200 |
+
" }}
|
201 |
+
{{- "// If `cursor` is not provided, the most recent page is implied.
|
202 |
+
" }}
|
203 |
+
{{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.
|
204 |
+
" }}
|
205 |
+
{{- "// 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.
|
206 |
+
" }}
|
207 |
+
{{- "// Use this function without `id` to scroll to a new location of an opened page.
|
208 |
+
" }}
|
209 |
+
{{- "type open = (_: {
|
210 |
+
" }}
|
211 |
+
{{- "id?: number | string, // default: -1
|
212 |
+
" }}
|
213 |
+
{{- "cursor?: number, // default: -1
|
214 |
+
" }}
|
215 |
+
{{- "loc?: number, // default: -1
|
216 |
+
" }}
|
217 |
+
{{- "num_lines?: number, // default: -1
|
218 |
+
" }}
|
219 |
+
{{- "view_source?: boolean, // default: false
|
220 |
+
" }}
|
221 |
+
{{- "source?: string,
|
222 |
+
" }}
|
223 |
+
{{- "}) => any;
|
224 |
+
|
225 |
+
" }}
|
226 |
+
{{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.
|
227 |
+
" }}
|
228 |
+
{{- "type find = (_: {
|
229 |
+
" }}
|
230 |
+
{{- "pattern: string,
|
231 |
+
" }}
|
232 |
+
{{- "cursor?: number, // default: -1
|
233 |
+
" }}
|
234 |
+
{{- "}) => any;
|
235 |
+
|
236 |
+
" }}
|
237 |
+
{{- "} // namespace browser
|
238 |
+
|
239 |
+
" }}
|
240 |
+
{%- endif -%}
|
241 |
+
|
242 |
+
{%- if python_tool %}
|
243 |
+
{{- "## python
|
244 |
+
|
245 |
+
" }}
|
246 |
+
{{- "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).
|
247 |
+
|
248 |
+
" }}
|
249 |
+
{{- "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.
|
250 |
+
|
251 |
+
" }}
|
252 |
+
{%- endif -%}
|
253 |
+
{%- endmacro -%}
|
254 |
+
|
255 |
+
{#- System Message Construction ============================================ #}
|
256 |
+
{%- macro build_system_message() -%}
|
257 |
+
{%- if model_identity is not defined %}
|
258 |
+
{%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
|
259 |
+
{%- endif %}
|
260 |
+
{{- model_identity + "
|
261 |
+
" }}
|
262 |
+
{{- "Knowledge cutoff: 2024-06
|
263 |
+
" }}
|
264 |
+
{{- "Current date: " + strftime_now("%Y-%m-%d") + "
|
265 |
+
|
266 |
+
" }}
|
267 |
+
{%- if reasoning_effort is not defined %}
|
268 |
+
{%- set reasoning_effort = "medium" %}
|
269 |
+
{%- endif %}
|
270 |
+
{{- "Reasoning: " + reasoning_effort + "
|
271 |
+
|
272 |
+
" }}
|
273 |
+
{%- if builtin_tools %}
|
274 |
+
{{- "# Tools
|
275 |
+
|
276 |
+
" }}
|
277 |
+
{%- set available_builtin_tools = namespace(browser=false, python=false) %}
|
278 |
+
{%- for tool in builtin_tools %}
|
279 |
+
{%- if tool == "browser" %}
|
280 |
+
{%- set available_builtin_tools.browser = true %}
|
281 |
+
{%- elif tool == "python" %}
|
282 |
+
{%- set available_builtin_tools.python = true %}
|
283 |
+
{%- endif %}
|
284 |
+
{%- endfor %}
|
285 |
+
{{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
|
286 |
+
{%- endif -%}
|
287 |
+
{{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
|
288 |
+
{%- if tools -%}
|
289 |
+
{{- "
|
290 |
+
Calls to these tools must go to the commentary channel: 'functions'." }}
|
291 |
+
{%- endif -%}
|
292 |
+
{%- endmacro -%}
|
293 |
+
|
294 |
+
{#- Main Template Logic ================================================= #}
|
295 |
+
{#- Set defaults #}
|
296 |
+
|
297 |
+
{#- Render system message #}
|
298 |
+
{{- "<|start|>system<|message|>" }}
|
299 |
+
{{- build_system_message() }}
|
300 |
+
{{- "<|end|>" }}
|
301 |
+
|
302 |
+
{#- Extract developer message #}
|
303 |
+
{%- if messages[0].role == "developer" or messages[0].role == "system" %}
|
304 |
+
{%- set developer_message = messages[0].content %}
|
305 |
+
{%- set loop_messages = messages[1:] %}
|
306 |
+
{%- else %}
|
307 |
+
{%- set developer_message = "" %}
|
308 |
+
{%- set loop_messages = messages %}
|
309 |
+
{%- endif %}
|
310 |
+
|
311 |
+
{#- Render developer message #}
|
312 |
+
{%- if developer_message or tools %}
|
313 |
+
{{- "<|start|>developer<|message|>" }}
|
314 |
+
{%- if developer_message %}
|
315 |
+
{{- "# Instructions
|
316 |
+
|
317 |
+
" }}
|
318 |
+
{{- developer_message }}
|
319 |
+
{%- endif %}
|
320 |
+
{%- if tools -%}
|
321 |
+
{{- "
|
322 |
+
|
323 |
+
" }}
|
324 |
+
{{- "# Tools
|
325 |
+
|
326 |
+
" }}
|
327 |
+
{{- render_tool_namespace("functions", tools) }}
|
328 |
+
{%- endif -%}
|
329 |
+
{{- "<|end|>" }}
|
330 |
+
{%- endif %}
|
331 |
+
|
332 |
+
{#- Render messages #}
|
333 |
+
{%- set last_tool_call = namespace(name=none) %}
|
334 |
+
{%- for message in loop_messages -%}
|
335 |
+
{#- At this point only assistant/user/tool messages should remain #}
|
336 |
+
{%- if message.role == 'assistant' -%}
|
337 |
+
{#- Checks to ensure the messages are being passed in the format we expect #}
|
338 |
+
{%- if "content" in message %}
|
339 |
+
{%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
|
340 |
+
{{- 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.") }}
|
341 |
+
{%- endif %}
|
342 |
+
{%- endif %}
|
343 |
+
{%- if "thinking" in message %}
|
344 |
+
{%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
|
345 |
+
{{- 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.") }}
|
346 |
+
{%- endif %}
|
347 |
+
{%- endif %}
|
348 |
+
{%- if "tool_calls" in message %}
|
349 |
+
{#- We assume max 1 tool call per message, and so we infer the tool call name #}
|
350 |
+
{#- in "tool" messages from the most recent assistant tool call name #}
|
351 |
+
{%- set tool_call = message.tool_calls[0] %}
|
352 |
+
{%- if tool_call.function %}
|
353 |
+
{%- set tool_call = tool_call.function %}
|
354 |
+
{%- endif %}
|
355 |
+
{%- if message.content and message.thinking %}
|
356 |
+
{{- 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.") }}
|
357 |
+
{%- elif message.content %}
|
358 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
|
359 |
+
{%- elif message.thinking %}
|
360 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
361 |
+
{%- endif %}
|
362 |
+
{{- "<|start|>assistant to=" }}
|
363 |
+
{{- "functions." + tool_call.name + "<|channel|>commentary " }}
|
364 |
+
{{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
|
365 |
+
{{- tool_call.arguments|tojson }}
|
366 |
+
{{- "<|call|>" }}
|
367 |
+
{%- set last_tool_call.name = tool_call.name %}
|
368 |
+
{%- elif loop.last and not add_generation_prompt %}
|
369 |
+
{#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
|
370 |
+
{#- This is a situation that should only occur in training, never in inference. #}
|
371 |
+
{%- if "thinking" in message %}
|
372 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
373 |
+
{%- endif %}
|
374 |
+
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
375 |
+
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
376 |
+
{#- when training, so the model learns to emit it. #}
|
377 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
|
378 |
+
{%- else %}
|
379 |
+
{#- CoT is dropped during all previous turns, so we never render it for inference #}
|
380 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
|
381 |
+
{%- set last_tool_call.name = none %}
|
382 |
+
{%- endif %}
|
383 |
+
{%- elif message.role == 'tool' -%}
|
384 |
+
{%- if last_tool_call.name is none %}
|
385 |
+
{{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
|
386 |
+
{%- endif %}
|
387 |
+
{{- "<|start|>functions." + last_tool_call.name }}
|
388 |
+
{{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
|
389 |
+
{%- elif message.role == 'user' -%}
|
390 |
+
{{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
|
391 |
+
{%- endif -%}
|
392 |
+
{%- endfor -%}
|
393 |
+
|
394 |
+
{#- Generation prompt #}
|
395 |
+
{%- if add_generation_prompt -%}
|
396 |
+
<|start|>assistant
|
397 |
+
{%- endif -%}
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/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
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/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 |
+
"o_proj",
|
32 |
+
"v_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 |
+
}
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ef020e65d85ce9bdb0124557260a1a71418ae9c680f7140cc8a95b49da14b39
|
3 |
+
size 60189176
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/chat_template.jinja
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{{- "{
|
88 |
+
" }}
|
89 |
+
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
|
90 |
+
{{- prop_name -}}
|
91 |
+
{%- if prop_name not in (param_spec.required or []) -%}
|
92 |
+
{{- "?" }}
|
93 |
+
{%- endif -%}
|
94 |
+
{{- ": " }}
|
95 |
+
{{ render_typescript_type(prop_spec, param_spec.required or []) }}
|
96 |
+
{%- if not loop.last -%}
|
97 |
+
{{-", " }}
|
98 |
+
{%- endif -%}
|
99 |
+
{%- endfor -%}
|
100 |
+
{{- "}" }}
|
101 |
+
{%- else -%}
|
102 |
+
{{- "object" }}
|
103 |
+
{%- endif -%}
|
104 |
+
{%- else -%}
|
105 |
+
{{- "any" }}
|
106 |
+
{%- endif -%}
|
107 |
+
{%- endmacro -%}
|
108 |
+
|
109 |
+
{%- macro render_tool_namespace(namespace_name, tools) -%}
|
110 |
+
{{- "## " + namespace_name + "
|
111 |
+
|
112 |
+
" }}
|
113 |
+
{{- "namespace " + namespace_name + " {
|
114 |
+
|
115 |
+
" }}
|
116 |
+
{%- for tool in tools %}
|
117 |
+
{%- set tool = tool.function %}
|
118 |
+
{{- "// " + tool.description + "
|
119 |
+
" }}
|
120 |
+
{{- "type "+ tool.name + " = " }}
|
121 |
+
{%- if tool.parameters and tool.parameters.properties %}
|
122 |
+
{{- "(_: {
|
123 |
+
" }}
|
124 |
+
{%- for param_name, param_spec in tool.parameters.properties.items() %}
|
125 |
+
{%- if param_spec.description %}
|
126 |
+
{{- "// " + param_spec.description + "
|
127 |
+
" }}
|
128 |
+
{%- endif %}
|
129 |
+
{{- param_name }}
|
130 |
+
{%- if param_name not in (tool.parameters.required or []) -%}
|
131 |
+
{{- "?" }}
|
132 |
+
{%- endif -%}
|
133 |
+
{{- ": " }}
|
134 |
+
{{- render_typescript_type(param_spec, tool.parameters.required or []) }}
|
135 |
+
{%- if param_spec.default is defined -%}
|
136 |
+
{%- if param_spec.enum %}
|
137 |
+
{{- ", // default: " + param_spec.default }}
|
138 |
+
{%- elif param_spec.oneOf %}
|
139 |
+
{{- "// default: " + param_spec.default }}
|
140 |
+
{%- else %}
|
141 |
+
{{- ", // default: " + param_spec.default|tojson }}
|
142 |
+
{%- endif -%}
|
143 |
+
{%- endif -%}
|
144 |
+
{%- if not loop.last %}
|
145 |
+
{{- ",
|
146 |
+
" }}
|
147 |
+
{%- else %}
|
148 |
+
{{- "
|
149 |
+
" }}
|
150 |
+
{%- endif -%}
|
151 |
+
{%- endfor %}
|
152 |
+
{{- "}) => any;
|
153 |
+
|
154 |
+
" }}
|
155 |
+
{%- else -%}
|
156 |
+
{{- "() => any;
|
157 |
+
|
158 |
+
" }}
|
159 |
+
{%- endif -%}
|
160 |
+
{%- endfor %}
|
161 |
+
{{- "} // namespace " + namespace_name }}
|
162 |
+
{%- endmacro -%}
|
163 |
+
|
164 |
+
{%- macro render_builtin_tools(browser_tool, python_tool) -%}
|
165 |
+
{%- if browser_tool %}
|
166 |
+
{{- "## browser
|
167 |
+
|
168 |
+
" }}
|
169 |
+
{{- "// Tool for browsing.
|
170 |
+
" }}
|
171 |
+
{{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.
|
172 |
+
" }}
|
173 |
+
{{- "// Cite information from the tool using the following format:
|
174 |
+
" }}
|
175 |
+
{{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.
|
176 |
+
" }}
|
177 |
+
{{- "// Do not quote more than 10 words directly from the tool output.
|
178 |
+
" }}
|
179 |
+
{{- "// sources=web (default: web)
|
180 |
+
" }}
|
181 |
+
{{- "namespace browser {
|
182 |
+
|
183 |
+
" }}
|
184 |
+
{{- "// Searches for information related to `query` and displays `topn` results.
|
185 |
+
" }}
|
186 |
+
{{- "type search = (_: {
|
187 |
+
" }}
|
188 |
+
{{- "query: string,
|
189 |
+
" }}
|
190 |
+
{{- "topn?: number, // default: 10
|
191 |
+
" }}
|
192 |
+
{{- "source?: string,
|
193 |
+
" }}
|
194 |
+
{{- "}) => any;
|
195 |
+
|
196 |
+
" }}
|
197 |
+
{{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.
|
198 |
+
" }}
|
199 |
+
{{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.
|
200 |
+
" }}
|
201 |
+
{{- "// If `cursor` is not provided, the most recent page is implied.
|
202 |
+
" }}
|
203 |
+
{{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.
|
204 |
+
" }}
|
205 |
+
{{- "// 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.
|
206 |
+
" }}
|
207 |
+
{{- "// Use this function without `id` to scroll to a new location of an opened page.
|
208 |
+
" }}
|
209 |
+
{{- "type open = (_: {
|
210 |
+
" }}
|
211 |
+
{{- "id?: number | string, // default: -1
|
212 |
+
" }}
|
213 |
+
{{- "cursor?: number, // default: -1
|
214 |
+
" }}
|
215 |
+
{{- "loc?: number, // default: -1
|
216 |
+
" }}
|
217 |
+
{{- "num_lines?: number, // default: -1
|
218 |
+
" }}
|
219 |
+
{{- "view_source?: boolean, // default: false
|
220 |
+
" }}
|
221 |
+
{{- "source?: string,
|
222 |
+
" }}
|
223 |
+
{{- "}) => any;
|
224 |
+
|
225 |
+
" }}
|
226 |
+
{{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.
|
227 |
+
" }}
|
228 |
+
{{- "type find = (_: {
|
229 |
+
" }}
|
230 |
+
{{- "pattern: string,
|
231 |
+
" }}
|
232 |
+
{{- "cursor?: number, // default: -1
|
233 |
+
" }}
|
234 |
+
{{- "}) => any;
|
235 |
+
|
236 |
+
" }}
|
237 |
+
{{- "} // namespace browser
|
238 |
+
|
239 |
+
" }}
|
240 |
+
{%- endif -%}
|
241 |
+
|
242 |
+
{%- if python_tool %}
|
243 |
+
{{- "## python
|
244 |
+
|
245 |
+
" }}
|
246 |
+
{{- "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).
|
247 |
+
|
248 |
+
" }}
|
249 |
+
{{- "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.
|
250 |
+
|
251 |
+
" }}
|
252 |
+
{%- endif -%}
|
253 |
+
{%- endmacro -%}
|
254 |
+
|
255 |
+
{#- System Message Construction ============================================ #}
|
256 |
+
{%- macro build_system_message() -%}
|
257 |
+
{%- if model_identity is not defined %}
|
258 |
+
{%- set model_identity = "You are ChatGPT, a large language model trained by OpenAI." %}
|
259 |
+
{%- endif %}
|
260 |
+
{{- model_identity + "
|
261 |
+
" }}
|
262 |
+
{{- "Knowledge cutoff: 2024-06
|
263 |
+
" }}
|
264 |
+
{{- "Current date: " + strftime_now("%Y-%m-%d") + "
|
265 |
+
|
266 |
+
" }}
|
267 |
+
{%- if reasoning_effort is not defined %}
|
268 |
+
{%- set reasoning_effort = "medium" %}
|
269 |
+
{%- endif %}
|
270 |
+
{{- "Reasoning: " + reasoning_effort + "
|
271 |
+
|
272 |
+
" }}
|
273 |
+
{%- if builtin_tools %}
|
274 |
+
{{- "# Tools
|
275 |
+
|
276 |
+
" }}
|
277 |
+
{%- set available_builtin_tools = namespace(browser=false, python=false) %}
|
278 |
+
{%- for tool in builtin_tools %}
|
279 |
+
{%- if tool == "browser" %}
|
280 |
+
{%- set available_builtin_tools.browser = true %}
|
281 |
+
{%- elif tool == "python" %}
|
282 |
+
{%- set available_builtin_tools.python = true %}
|
283 |
+
{%- endif %}
|
284 |
+
{%- endfor %}
|
285 |
+
{{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
|
286 |
+
{%- endif -%}
|
287 |
+
{{- "# Valid channels: analysis, commentary, final. Channel must be included for every message." }}
|
288 |
+
{%- if tools -%}
|
289 |
+
{{- "
|
290 |
+
Calls to these tools must go to the commentary channel: 'functions'." }}
|
291 |
+
{%- endif -%}
|
292 |
+
{%- endmacro -%}
|
293 |
+
|
294 |
+
{#- Main Template Logic ================================================= #}
|
295 |
+
{#- Set defaults #}
|
296 |
+
|
297 |
+
{#- Render system message #}
|
298 |
+
{{- "<|start|>system<|message|>" }}
|
299 |
+
{{- build_system_message() }}
|
300 |
+
{{- "<|end|>" }}
|
301 |
+
|
302 |
+
{#- Extract developer message #}
|
303 |
+
{%- if messages[0].role == "developer" or messages[0].role == "system" %}
|
304 |
+
{%- set developer_message = messages[0].content %}
|
305 |
+
{%- set loop_messages = messages[1:] %}
|
306 |
+
{%- else %}
|
307 |
+
{%- set developer_message = "" %}
|
308 |
+
{%- set loop_messages = messages %}
|
309 |
+
{%- endif %}
|
310 |
+
|
311 |
+
{#- Render developer message #}
|
312 |
+
{%- if developer_message or tools %}
|
313 |
+
{{- "<|start|>developer<|message|>" }}
|
314 |
+
{%- if developer_message %}
|
315 |
+
{{- "# Instructions
|
316 |
+
|
317 |
+
" }}
|
318 |
+
{{- developer_message }}
|
319 |
+
{%- endif %}
|
320 |
+
{%- if tools -%}
|
321 |
+
{{- "
|
322 |
+
|
323 |
+
" }}
|
324 |
+
{{- "# Tools
|
325 |
+
|
326 |
+
" }}
|
327 |
+
{{- render_tool_namespace("functions", tools) }}
|
328 |
+
{%- endif -%}
|
329 |
+
{{- "<|end|>" }}
|
330 |
+
{%- endif %}
|
331 |
+
|
332 |
+
{#- Render messages #}
|
333 |
+
{%- set last_tool_call = namespace(name=none) %}
|
334 |
+
{%- for message in loop_messages -%}
|
335 |
+
{#- At this point only assistant/user/tool messages should remain #}
|
336 |
+
{%- if message.role == 'assistant' -%}
|
337 |
+
{#- Checks to ensure the messages are being passed in the format we expect #}
|
338 |
+
{%- if "content" in message %}
|
339 |
+
{%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
|
340 |
+
{{- 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.") }}
|
341 |
+
{%- endif %}
|
342 |
+
{%- endif %}
|
343 |
+
{%- if "thinking" in message %}
|
344 |
+
{%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
|
345 |
+
{{- 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.") }}
|
346 |
+
{%- endif %}
|
347 |
+
{%- endif %}
|
348 |
+
{%- if "tool_calls" in message %}
|
349 |
+
{#- We assume max 1 tool call per message, and so we infer the tool call name #}
|
350 |
+
{#- in "tool" messages from the most recent assistant tool call name #}
|
351 |
+
{%- set tool_call = message.tool_calls[0] %}
|
352 |
+
{%- if tool_call.function %}
|
353 |
+
{%- set tool_call = tool_call.function %}
|
354 |
+
{%- endif %}
|
355 |
+
{%- if message.content and message.thinking %}
|
356 |
+
{{- 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.") }}
|
357 |
+
{%- elif message.content %}
|
358 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
|
359 |
+
{%- elif message.thinking %}
|
360 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
361 |
+
{%- endif %}
|
362 |
+
{{- "<|start|>assistant to=" }}
|
363 |
+
{{- "functions." + tool_call.name + "<|channel|>commentary " }}
|
364 |
+
{{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
|
365 |
+
{{- tool_call.arguments|tojson }}
|
366 |
+
{{- "<|call|>" }}
|
367 |
+
{%- set last_tool_call.name = tool_call.name %}
|
368 |
+
{%- elif loop.last and not add_generation_prompt %}
|
369 |
+
{#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
|
370 |
+
{#- This is a situation that should only occur in training, never in inference. #}
|
371 |
+
{%- if "thinking" in message %}
|
372 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
373 |
+
{%- endif %}
|
374 |
+
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
375 |
+
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
376 |
+
{#- when training, so the model learns to emit it. #}
|
377 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
|
378 |
+
{%- else %}
|
379 |
+
{#- CoT is dropped during all previous turns, so we never render it for inference #}
|
380 |
+
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
|
381 |
+
{%- set last_tool_call.name = none %}
|
382 |
+
{%- endif %}
|
383 |
+
{%- elif message.role == 'tool' -%}
|
384 |
+
{%- if last_tool_call.name is none %}
|
385 |
+
{{- raise_exception("Message has tool role, but there was no previous assistant message with a tool call!") }}
|
386 |
+
{%- endif %}
|
387 |
+
{{- "<|start|>functions." + last_tool_call.name }}
|
388 |
+
{{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
|
389 |
+
{%- elif message.role == 'user' -%}
|
390 |
+
{{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
|
391 |
+
{%- endif -%}
|
392 |
+
{%- endfor -%}
|
393 |
+
|
394 |
+
{#- Generation prompt #}
|
395 |
+
{%- if add_generation_prompt -%}
|
396 |
+
<|start|>assistant
|
397 |
+
{%- endif -%}
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d459e76c7818ef07c6088f1aa627c180c8cc43017883e88a5694c61199aa8ece
|
3 |
+
size 120495883
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c15d10da233568de54180256b227cfe26dea6eaac6df08048357111de9ef60d
|
3 |
+
size 14645
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7e02836da3486a06ad65f49e2017068b9573f7ba2b36b519859138059435242f
|
3 |
+
size 1465
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/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 |
+
}
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
|
3 |
+
size 27868174
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/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 |
+
}
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/trainer_state.json
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_global_step": null,
|
3 |
+
"best_metric": null,
|
4 |
+
"best_model_checkpoint": null,
|
5 |
+
"epoch": 1.0,
|
6 |
+
"eval_steps": 500,
|
7 |
+
"global_step": 63,
|
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": 1.6024624109268188,
|
15 |
+
"learning_rate": 0.000199522988805313,
|
16 |
+
"loss": 2.0529,
|
17 |
+
"mean_token_accuracy": 0.559639161452651,
|
18 |
+
"num_tokens": 64985.0,
|
19 |
+
"step": 5
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"epoch": 0.16,
|
23 |
+
"grad_norm": 1.0667455196380615,
|
24 |
+
"learning_rate": 0.00019421451371364444,
|
25 |
+
"loss": 1.5192,
|
26 |
+
"mean_token_accuracy": 0.6313199333846569,
|
27 |
+
"num_tokens": 132654.0,
|
28 |
+
"step": 10
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"epoch": 0.24,
|
32 |
+
"grad_norm": 0.6989722847938538,
|
33 |
+
"learning_rate": 0.00018335255037651302,
|
34 |
+
"loss": 1.2651,
|
35 |
+
"mean_token_accuracy": 0.66771609634161,
|
36 |
+
"num_tokens": 200863.0,
|
37 |
+
"step": 15
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 0.32,
|
41 |
+
"grad_norm": 0.49305838346481323,
|
42 |
+
"learning_rate": 0.0001676533860828358,
|
43 |
+
"loss": 1.1965,
|
44 |
+
"mean_token_accuracy": 0.6907071858644486,
|
45 |
+
"num_tokens": 265471.0,
|
46 |
+
"step": 20
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"epoch": 0.4,
|
50 |
+
"grad_norm": 0.3976356089115143,
|
51 |
+
"learning_rate": 0.0001481522951638875,
|
52 |
+
"loss": 1.1184,
|
53 |
+
"mean_token_accuracy": 0.7011254012584687,
|
54 |
+
"num_tokens": 335362.0,
|
55 |
+
"step": 25
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"epoch": 0.48,
|
59 |
+
"grad_norm": 0.32982659339904785,
|
60 |
+
"learning_rate": 0.00012613526829296622,
|
61 |
+
"loss": 1.0825,
|
62 |
+
"mean_token_accuracy": 0.7074193194508552,
|
63 |
+
"num_tokens": 403159.0,
|
64 |
+
"step": 30
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"epoch": 0.56,
|
68 |
+
"grad_norm": 0.3139457404613495,
|
69 |
+
"learning_rate": 0.00010305420840860182,
|
70 |
+
"loss": 1.1136,
|
71 |
+
"mean_token_accuracy": 0.7029193982481956,
|
72 |
+
"num_tokens": 465862.0,
|
73 |
+
"step": 35
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"epoch": 0.64,
|
77 |
+
"grad_norm": 0.3034254312515259,
|
78 |
+
"learning_rate": 8.043118562802488e-05,
|
79 |
+
"loss": 1.0445,
|
80 |
+
"mean_token_accuracy": 0.7117198631167412,
|
81 |
+
"num_tokens": 535415.0,
|
82 |
+
"step": 40
|
83 |
+
},
|
84 |
+
{
|
85 |
+
"epoch": 0.72,
|
86 |
+
"grad_norm": 0.3687556982040405,
|
87 |
+
"learning_rate": 5.9758065017582185e-05,
|
88 |
+
"loss": 1.0445,
|
89 |
+
"mean_token_accuracy": 0.7163990259170532,
|
90 |
+
"num_tokens": 600630.0,
|
91 |
+
"step": 45
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"epoch": 0.8,
|
95 |
+
"grad_norm": 0.2981916069984436,
|
96 |
+
"learning_rate": 4.2398126221653236e-05,
|
97 |
+
"loss": 1.0519,
|
98 |
+
"mean_token_accuracy": 0.7169259950518608,
|
99 |
+
"num_tokens": 669353.0,
|
100 |
+
"step": 50
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"epoch": 0.88,
|
104 |
+
"grad_norm": 0.324988454580307,
|
105 |
+
"learning_rate": 2.949616259940842e-05,
|
106 |
+
"loss": 1.0491,
|
107 |
+
"mean_token_accuracy": 0.7140479609370232,
|
108 |
+
"num_tokens": 735759.0,
|
109 |
+
"step": 55
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"epoch": 0.96,
|
113 |
+
"grad_norm": 0.31940364837646484,
|
114 |
+
"learning_rate": 2.19029883414178e-05,
|
115 |
+
"loss": 1.0886,
|
116 |
+
"mean_token_accuracy": 0.7087796837091446,
|
117 |
+
"num_tokens": 799409.0,
|
118 |
+
"step": 60
|
119 |
+
}
|
120 |
+
],
|
121 |
+
"logging_steps": 5,
|
122 |
+
"max_steps": 63,
|
123 |
+
"num_input_tokens_seen": 0,
|
124 |
+
"num_train_epochs": 1,
|
125 |
+
"save_steps": 500,
|
126 |
+
"stateful_callbacks": {
|
127 |
+
"TrainerControl": {
|
128 |
+
"args": {
|
129 |
+
"should_epoch_stop": false,
|
130 |
+
"should_evaluate": false,
|
131 |
+
"should_log": false,
|
132 |
+
"should_save": true,
|
133 |
+
"should_training_stop": true
|
134 |
+
},
|
135 |
+
"attributes": {}
|
136 |
+
}
|
137 |
+
},
|
138 |
+
"total_flos": 1.0164973639893696e+17,
|
139 |
+
"train_batch_size": 1,
|
140 |
+
"trial_name": null,
|
141 |
+
"trial_params": null
|
142 |
+
}
|
gpt-oss-20b-multilingual-reasoner/checkpoint-63/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68168b965f8c6329d7b5c66cdfc35d4160e10d303db6bbdf73915d53e803d99a
|
3 |
+
size 6161
|
gpt-oss-20b-multilingual-reasoner/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 |
+
}
|
gpt-oss-20b-multilingual-reasoner/tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
|
3 |
+
size 27868174
|
gpt-oss-20b-multilingual-reasoner/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 |
+
}
|
gpt-oss-20b-multilingual-reasoner/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68168b965f8c6329d7b5c66cdfc35d4160e10d303db6bbdf73915d53e803d99a
|
3 |
+
size 6161
|
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 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
|
3 |
+
size 27868174
|
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 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:68168b965f8c6329d7b5c66cdfc35d4160e10d303db6bbdf73915d53e803d99a
|
3 |
+
size 6161
|