Jordansky commited on
Commit
db39cba
·
verified ·
1 Parent(s): 16a162c

Upload task output dbe7f337-31b2-489d-a530-17952d63578b

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{- bos_token }}{%- if tools %}
2
+ {%- set tool_definitions %}
3
+ {{- "# Tools\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
4
+ {%- for tool in tools %}
5
+ {{- "\n" }}
6
+ {{- tool | tojson(ensure_ascii=False) }}
7
+ {%- endfor %}
8
+ {{- '\n</tools>\n\nTool usage guidelines:\n- You may call zero or more functions. If no function calls are needed, just answer normally and do not include any <function ... </function>.\n- When calling a function, return an XML object within <function ... </function> using:\n<function name="function-name"><param name="param-name">param-value</param></function>\n- param-value may be multi-line. If it contains <, & or newline characters, wrap it in a CDATA block: <param name="param-name"><![CDATA[...multi-line value...]]></param>' }}
9
+ {%- endset %}
10
+
11
+ {{- '<|im_start|>system\n' }}
12
+ {%- if messages[0].role == 'system' %}
13
+ {%- if '<tool_def_sep>' in messages[0].content %}
14
+ {{- messages[0].content.replace('<tool_def_sep>', tool_definitions) }}
15
+ {%- else %}
16
+ {{- messages[0].content + '\n\n' + tool_definitions }}
17
+ {%- endif %}
18
+ {%- else %}
19
+ {{- tool_definitions.lstrip() }}
20
+ {%- endif %}
21
+ {{- '<|im_end|>\n' }}
22
+ {%- else %}
23
+ {%- if messages[0].role == 'system' %}
24
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
25
+ {%- endif %}
26
+ {%- endif %}
27
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
28
+ {%- for message in messages[::-1] %}
29
+ {%- set index = (messages|length - 1) - loop.index0 %}
30
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
31
+ {%- set ns.multi_step_tool = false %}
32
+ {%- set ns.last_query_index = index %}
33
+ {%- endif %}
34
+ {%- endfor %}
35
+ {%- for message in messages %}
36
+ {%- if message.content is string %}
37
+ {%- set content = message.content %}
38
+ {%- else %}
39
+ {%- set content = '' %}
40
+ {%- endif %}
41
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
42
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
43
+ {%- elif message.role == "assistant" %}
44
+ {%- set reasoning_content = '' %}
45
+ {%- if message.reasoning_content is string %}
46
+ {%- set reasoning_content = message.reasoning_content %}
47
+ {%- else %}
48
+ {%- if '</think>' in content %}
49
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
50
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
51
+ {%- endif %}
52
+ {%- endif %}
53
+
54
+ {%- if reasoning_content %}
55
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
56
+ {%- elif '<think>' not in content and '</think>' not in content %}
57
+ {{- '<|im_start|>' + message.role + '\n<think>\n\n</think>\n\n' + content.lstrip('\n') }}
58
+ {%- else %}
59
+ {{- '<|im_start|>' + message.role + '\n' + content }}
60
+ {%- endif %}
61
+
62
+ {%- if message.tool_calls %}
63
+ {%- for tool_call in message.tool_calls %}
64
+ {%- if (loop.first and content) or (not loop.first) %}
65
+ {{- '\n' }}
66
+ {%- endif %}
67
+ {%- if tool_call.function %}
68
+ {%- set tool_call = tool_call.function %}
69
+ {%- endif %}
70
+ {{- '<function name="' ~ tool_call.name ~ '">' }}
71
+ {%- if tool_call.arguments %}
72
+ {%- set args_dict = tool_call.arguments %}
73
+ {%- for param_name, param_value in args_dict.items() %}
74
+ {{- '<param name="' ~ param_name ~ '">' }}
75
+ {%- if param_value is string and ('<' in param_value or '&' in param_value or '\n' in param_value) %}
76
+ {{- '<![CDATA[' + param_value + ']]>' }}
77
+ {%- else %}
78
+ {{- param_value }}
79
+ {%- endif %}
80
+ {{- '</param>' }}
81
+ {%- endfor %}
82
+ {%- endif %}
83
+ {{- '</function>' }}
84
+ {%- endfor %}
85
+ {%- endif %}
86
+ {{- '<|im_end|>\n' }}
87
+ {%- elif message.role == "tool" %}
88
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
89
+ {{- '<|im_start|>user' }}
90
+ {%- endif %}
91
+ {{- '\n<tool_response>\n' }}
92
+ {%- if message.content is string %}
93
+ {{- content }}
94
+ {%- else %}
95
+ {{- message.content | tojson(ensure_ascii=False) }}
96
+ {%- endif %}
97
+ {{- '\n</tool_response>' }}
98
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
99
+ {{- '<|im_end|>\n' }}
100
+ {%- endif %}
101
+ {%- endif %}
102
+ {%- endfor %}
103
+ {%- if add_generation_prompt %}
104
+ {{- '<|im_start|>assistant\n' }}
105
+ {%- if enable_thinking is defined %}
106
+ {%- if enable_thinking is false %}
107
+ {{- '<think>\n\n</think>\n\n' }}
108
+ {%- elif enable_thinking is true %}
109
+ {{- '<think>\n' }}
110
+ {%- endif %}
111
+ {%- endif %}
112
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 0,
8
+ "dtype": "bfloat16",
9
+ "eos_token_id": 1,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 2048,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 6144,
15
+ "max_position_embeddings": 131072,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 42,
20
+ "num_key_value_heads": 2,
21
+ "pad_token_id": 1,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "rope_parameters": {
25
+ "rope_theta": 5000000,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": false,
29
+ "transformers_version": "5.12.1",
30
+ "use_cache": false,
31
+ "vocab_size": 130560
32
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "do_sample": true,
5
+ "eos_token_id": [
6
+ 1,
7
+ 1,
8
+ 130073
9
+ ],
10
+ "pad_token_id": 1,
11
+ "temperature": 1.0,
12
+ "top_p": 0.95,
13
+ "transformers_version": "5.12.1"
14
+ }
loss.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 524,0.7183619737625122
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f274b8bc053585e44b852cd1a989063f6eb599924170a1016775c7cec4254410
3
+ size 5033557128
run_meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"global_step": 524, "max_steps": 524, "reached_max_steps": true, "epoch": 2.0, "train_s": 2938.7, "best_step": 524, "best_dev": 0.7163519859313965, "dev_curve": [[224, 0.73056], [256, 0.72731], [261, 0.72756], [288, 0.73088], [320, 0.73078], [352, 0.73097], [384, 0.72852], [416, 0.72513], [448, 0.71996], [480, 0.71891], [500, 0.71863], [512, 0.71856], [522, 0.71843], [524, 0.71836], [524, 0.71836], [524, 0.71846], [524, 0.71856], [524, 0.71854], [524, 0.71878], [524, 0.71878], [524, 0.72028], [524, 0.71734], [524, 0.71871], [524, 0.71762], [524, 0.71805], [524, 0.71811], [524, 0.71635]], "packed": true, "length_grouped": false, "max_length": 2176, "per_device_bs": 41, "grad_accum": 1, "world_size": 1, "train_items": 10727, "devpass": true, "kept_prior": false, "pass_seed": "42", "one_epoch_pass": true, "group": {"arch": "dense", "params_b": 2.517, "length_class": "long", "completion_p50": 354, "seq_p50": 462, "seq_p99": 1935, "num_records": 38882, "total_tokens": 20908270, "hours": 1.25, "epochs_est": 1.49, "epochs_measured": 4.238, "aug_marks": {"matrices": 294, "zero_frac_max": 0.0, "zero_frac_mean": 0.0, "pruned_frac": 0.0, "rms_scaled_frac": 0.011, "rms_log2_dev_max": 0.966, "detector": "neighbour-v2"}, "aug_guess": "none-or-weak"}}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": null,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "</s>",
7
+ "is_local": true,
8
+ "legacy": true,
9
+ "local_files_only": true,
10
+ "model_max_length": 131072,
11
+ "pad_token": "</s>",
12
+ "sp_model_kwargs": {},
13
+ "spaces_between_special_tokens": false,
14
+ "tokenizer_class": "TokenizersBackend",
15
+ "unk_token": "<unk>",
16
+ "use_default_system_prompt": false
17
+ }