fdejean commited on
Commit
8375d8e
·
verified ·
1 Parent(s): 2aed37d

math sft model (sft 20260514_093821) as group model

Browse files
chat_template.jinja CHANGED
@@ -1,91 +1,8 @@
1
  {%- set enable_thinking = true %}
2
- {%- set flab_boxed_instruction = "Solve the problem carefully. Think before answering. You must finish every response with exactly one final answer in the form \\boxed{LETTER}. Never omit the final boxed answer." %}
3
- {%- if flab_boxed_instruction %}{{ '<|im_start|>system\n' + flab_boxed_instruction + '<|im_end|>\n' }}{%- endif %}{%- if tools %}
4
- {{- '<|im_start|>system\n' }}
5
- {%- if messages[0].role == 'system' %}
6
- {{- messages[0].content + '\n\n' }}
7
- {%- endif %}
8
- {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
9
- {%- for tool in tools %}
10
- {{- "\n" }}
11
- {{- tool | tojson }}
12
- {%- endfor %}
13
- {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
14
- {%- else %}
15
- {%- if messages[0].role == 'system' %}
16
- {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
17
- {%- endif %}
18
- {%- endif %}
19
- {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
20
- {%- for message in messages[::-1] %}
21
- {%- set index = (messages|length - 1) - loop.index0 %}
22
- {%- 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>')) %}
23
- {%- set ns.multi_step_tool = false %}
24
- {%- set ns.last_query_index = index %}
25
- {%- endif %}
26
- {%- endfor %}
27
  {%- for message in messages %}
28
- {%- if message.content is string %}
29
- {%- set content = message.content %}
30
- {%- else %}
31
- {%- set content = '' %}
32
- {%- endif %}
33
- {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
34
- {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
35
- {%- elif message.role == "assistant" %}
36
- {%- set reasoning_content = '' %}
37
- {%- if message.reasoning_content is string %}
38
- {%- set reasoning_content = message.reasoning_content %}
39
- {%- else %}
40
- {%- if '</think>' in content %}
41
- {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
42
- {%- set content = content.split('</think>')[-1].lstrip('\n') %}
43
- {%- endif %}
44
- {%- endif %}
45
- {%- if loop.index0 > ns.last_query_index %}
46
- {%- if loop.last or (not loop.last and reasoning_content) %}
47
- {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
48
- {%- else %}
49
- {{- '<|im_start|>' + message.role + '\n' + content }}
50
- {%- endif %}
51
- {%- else %}
52
- {{- '<|im_start|>' + message.role + '\n' + content }}
53
- {%- endif %}
54
- {%- if message.tool_calls %}
55
- {%- for tool_call in message.tool_calls %}
56
- {%- if (loop.first and content) or (not loop.first) %}
57
- {{- '\n' }}
58
- {%- endif %}
59
- {%- if tool_call.function %}
60
- {%- set tool_call = tool_call.function %}
61
- {%- endif %}
62
- {{- '<tool_call>\n{"name": "' }}
63
- {{- tool_call.name }}
64
- {{- '", "arguments": ' }}
65
- {%- if tool_call.arguments is string %}
66
- {{- tool_call.arguments }}
67
- {%- else %}
68
- {{- tool_call.arguments | tojson }}
69
- {%- endif %}
70
- {{- '}\n</tool_call>' }}
71
- {%- endfor %}
72
- {%- endif %}
73
- {{- '<|im_end|>\n' }}
74
- {%- elif message.role == "tool" %}
75
- {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
76
- {{- '<|im_start|>user' }}
77
- {%- endif %}
78
- {{- '\n<tool_response>\n' }}
79
- {{- content }}
80
- {{- '\n</tool_response>' }}
81
- {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
82
- {{- '<|im_end|>\n' }}
83
- {%- endif %}
84
- {%- endif %}
85
  {%- endfor %}
86
- {%- if add_generation_prompt %}
87
- {{- '<|im_start|>assistant\n' }}
88
- {%- if enable_thinking is defined and enable_thinking is false %}
89
- {{- '<think>\n\n</think>\n\n' }}
90
- {%- endif %}
91
  {%- endif %}
 
1
  {%- set enable_thinking = true %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {%- for message in messages %}
3
+ <|im_start|>{{ message["role"] }}
4
+ {{ message["content"] }}<|im_end|>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  {%- endfor %}
6
+ {%- if add_generation_prompt %}<|im_start|>assistant
7
+ <think>
 
 
 
8
  {%- endif %}
config.json CHANGED
@@ -4,7 +4,7 @@
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
- "bos_token_id": 151643,
8
  "dtype": "bfloat16",
9
  "eos_token_id": 151645,
10
  "head_dim": 128,
@@ -48,7 +48,7 @@
48
  "num_attention_heads": 16,
49
  "num_hidden_layers": 28,
50
  "num_key_value_heads": 8,
51
- "pad_token_id": null,
52
  "rms_norm_eps": 1e-06,
53
  "rope_parameters": {
54
  "rope_theta": 1000000,
@@ -57,7 +57,7 @@
57
  "sliding_window": null,
58
  "tie_word_embeddings": true,
59
  "transformers_version": "5.7.0",
60
- "use_cache": true,
61
  "use_sliding_window": false,
62
  "vocab_size": 151936
63
  }
 
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
  "dtype": "bfloat16",
9
  "eos_token_id": 151645,
10
  "head_dim": 128,
 
48
  "num_attention_heads": 16,
49
  "num_hidden_layers": 28,
50
  "num_key_value_heads": 8,
51
+ "pad_token_id": 151643,
52
  "rms_norm_eps": 1e-06,
53
  "rope_parameters": {
54
  "rope_theta": 1000000,
 
57
  "sliding_window": null,
58
  "tie_word_embeddings": true,
59
  "transformers_version": "5.7.0",
60
+ "use_cache": false,
61
  "use_sliding_window": false,
62
  "vocab_size": 151936
63
  }
generation_config.json CHANGED
@@ -1,5 +1,4 @@
1
  {
2
- "bos_token_id": 151643,
3
  "do_sample": true,
4
  "eos_token_id": [
5
  151645,
 
1
  {
 
2
  "do_sample": true,
3
  "eos_token_id": [
4
  151645,
hydra/.hydra/config.yaml DELETED
@@ -1,108 +0,0 @@
1
- model:
2
- hf_id: Qwen/Qwen3-1.7B
3
- local_path: /shared-ro/models/Qwen3-1.7B
4
- dtype: bfloat16
5
- attn_impl: flash_attention_2
6
- max_model_len: 4096
7
- data:
8
- name: nemotron_math
9
- loader: load_nemotron_math
10
- kwargs:
11
- limit: 50000
12
- split: train
13
- max_total_tokens: 3800
14
- seed: 0
15
- training:
16
- recipe: sft
17
- epochs: 1
18
- per_device_train_batch_size: 1
19
- gradient_accumulation_steps: 16
20
- learning_rate: 5.0e-06
21
- warmup_ratio: 0.03
22
- lr_scheduler_type: cosine
23
- gradient_checkpointing: true
24
- bf16: true
25
- max_seq_length: 4096
26
- max_steps: -1
27
- max_grad_norm: 1.0
28
- optim: adamw_torch
29
- assistant_only_loss: true
30
- logging_steps: 10
31
- save_steps: 500
32
- save_total_limit: 2
33
- report_to: wandb
34
- qlora: false
35
- lora_r: 16
36
- lora_alpha: 32
37
- lora_dropout: 0.05
38
- lora_target_modules:
39
- - q_proj
40
- - k_proj
41
- - v_proj
42
- - o_proj
43
- - gate_proj
44
- - up_proj
45
- - down_proj
46
- deepspeed: configs/deepspeed_zero2.json
47
- adapter_model_dir: null
48
- domain:
49
- name: multilingual
50
- thinking_mode: true
51
- benchmark: multilingual
52
- languages:
53
- - it
54
- - es
55
- - zh
56
- - ru
57
- - hi
58
- target_format: boxed
59
- max_options: 20
60
- reward_fn: multilingual
61
- system_instruction: Solve the problem carefully. Think before answering. You must
62
- finish every response with exactly one final answer in the form \boxed{LETTER}.
63
- Never omit the final boxed answer.
64
- template_boxed_instruction: Solve the problem carefully. Think before answering.
65
- You must finish every response with exactly one final answer in the form \boxed{LETTER}.
66
- Never omit the final boxed answer.
67
- post_train:
68
- enabled: false
69
- merge_adapter: false
70
- merged_output_dir: null
71
- domain_override: null
72
- evals: []
73
- seed: 42
74
- run_id: ${now:%Y%m%d_%H%M%S}
75
- output_dir: /scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3_merged
76
- wandb:
77
- project: flab-cs552
78
- entity: cs-552-2026-flab
79
- mode: null
80
- tags: []
81
- notes: null
82
- eval:
83
- model_dir: null
84
- rows_source: samples
85
- method: null
86
- system_prompt: null
87
- use_domain_system_prompt: false
88
- force_domain_template: false
89
- 'n': 8
90
- temperature: 0.7
91
- top_p: 0.95
92
- max_model_len: 4096
93
- max_tokens: 4096
94
- samples_dir: null
95
- push:
96
- model_dir: /scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3
97
- es:
98
- base_model_dir: null
99
- data: null
100
- hf_push:
101
- enabled: false
102
- org: cs-552-2026-flab
103
- repo: null
104
- private: false
105
- vllm_validate: true
106
- commit_message: null
107
- validate_after_train: false
108
- vllm_validate: true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
hydra/.hydra/hydra.yaml DELETED
@@ -1,162 +0,0 @@
1
- hydra:
2
- run:
3
- dir: ${output_dir}/hydra
4
- sweep:
5
- dir: ${output_dir}/hydra_sweep
6
- subdir: ${hydra.job.num}
7
- launcher:
8
- _target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
9
- sweeper:
10
- _target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
11
- max_batch_size: null
12
- params: null
13
- help:
14
- app_name: ${hydra.job.name}
15
- header: '${hydra.help.app_name} is powered by Hydra.
16
-
17
- '
18
- footer: 'Powered by Hydra (https://hydra.cc)
19
-
20
- Use --hydra-help to view Hydra specific help
21
-
22
- '
23
- template: '${hydra.help.header}
24
-
25
- == Configuration groups ==
26
-
27
- Compose your configuration from those groups (group=option)
28
-
29
-
30
- $APP_CONFIG_GROUPS
31
-
32
-
33
- == Config ==
34
-
35
- Override anything in the config (foo.bar=value)
36
-
37
-
38
- $CONFIG
39
-
40
-
41
- ${hydra.help.footer}
42
-
43
- '
44
- hydra_help:
45
- template: 'Hydra (${hydra.runtime.version})
46
-
47
- See https://hydra.cc for more info.
48
-
49
-
50
- == Flags ==
51
-
52
- $FLAGS_HELP
53
-
54
-
55
- == Configuration groups ==
56
-
57
- Compose your configuration from those groups (For example, append hydra/job_logging=disabled
58
- to command line)
59
-
60
-
61
- $HYDRA_CONFIG_GROUPS
62
-
63
-
64
- Use ''--cfg hydra'' to Show the Hydra config.
65
-
66
- '
67
- hydra_help: ???
68
- hydra_logging:
69
- version: 1
70
- formatters:
71
- simple:
72
- format: '[%(asctime)s][HYDRA] %(message)s'
73
- handlers:
74
- console:
75
- class: logging.StreamHandler
76
- formatter: simple
77
- stream: ext://sys.stdout
78
- root:
79
- level: INFO
80
- handlers:
81
- - console
82
- loggers:
83
- logging_example:
84
- level: DEBUG
85
- disable_existing_loggers: false
86
- job_logging:
87
- version: 1
88
- formatters:
89
- simple:
90
- format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
91
- handlers:
92
- console:
93
- class: logging.StreamHandler
94
- formatter: simple
95
- stream: ext://sys.stdout
96
- file:
97
- class: logging.FileHandler
98
- formatter: simple
99
- filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
100
- root:
101
- level: INFO
102
- handlers:
103
- - console
104
- - file
105
- disable_existing_loggers: false
106
- env: {}
107
- mode: RUN
108
- searchpath: []
109
- callbacks: {}
110
- output_subdir: .hydra
111
- overrides:
112
- hydra:
113
- - hydra.mode=RUN
114
- task:
115
- - domain=multilingual_reasoning_thinking
116
- - push.model_dir=/scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3
117
- - output_dir=/scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3_merged
118
- job:
119
- name: merge_peft
120
- chdir: false
121
- override_dirname: domain=multilingual_reasoning_thinking,output_dir=/scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3_merged,push.model_dir=/scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3
122
- id: ???
123
- num: ???
124
- config_name: base
125
- env_set: {}
126
- env_copy: []
127
- config:
128
- override_dirname:
129
- kv_sep: '='
130
- item_sep: ','
131
- exclude_keys: []
132
- runtime:
133
- version: 1.3.2
134
- version_base: '1.3'
135
- cwd: /scratch/runs/cs552-mazniche-g07-gcall2e-c3-033328
136
- config_sources:
137
- - path: hydra.conf
138
- schema: pkg
139
- provider: hydra
140
- - path: /scratch/runs/cs552-mazniche-g07-gcall2e-c3-033328/configs
141
- schema: file
142
- provider: main
143
- - path: ''
144
- schema: structured
145
- provider: schema
146
- output_dir: /scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3_merged/hydra
147
- choices:
148
- post_train: disabled
149
- domain: multilingual_reasoning_thinking
150
- training: sft
151
- data: nemotron_math
152
- model: qwen3_17b
153
- hydra/env: default
154
- hydra/callbacks: null
155
- hydra/job_logging: default
156
- hydra/hydra_logging: default
157
- hydra/hydra_help: default
158
- hydra/help: default
159
- hydra/sweeper: basic
160
- hydra/launcher: basic
161
- hydra/output: default
162
- verbose: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
hydra/.hydra/overrides.yaml DELETED
@@ -1,3 +0,0 @@
1
- - domain=multilingual_reasoning_thinking
2
- - push.model_dir=/scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3
3
- - output_dir=/scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3_merged
 
 
 
 
hydra/merge_peft.log DELETED
@@ -1,23 +0,0 @@
1
- [2026-05-18 07:59:21,026][__main__][INFO] - Loading base model for merge ...
2
- [2026-05-18 07:59:21,185][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3-1.7B/resolve/main/config.json "HTTP/1.1 307 Temporary Redirect"
3
- [2026-05-18 07:59:21,194][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3-1.7B/70d244cc86ccca08cf5af4e1e306ecf908b1ad5e/config.json "HTTP/1.1 200 OK"
4
- [2026-05-18 07:59:21,322][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3-1.7B/resolve/main/config.json "HTTP/1.1 307 Temporary Redirect"
5
- [2026-05-18 07:59:21,331][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3-1.7B/70d244cc86ccca08cf5af4e1e306ecf908b1ad5e/config.json "HTTP/1.1 200 OK"
6
- [2026-05-18 07:59:21,740][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3-1.7B/resolve/main/generation_config.json "HTTP/1.1 307 Temporary Redirect"
7
- [2026-05-18 07:59:21,747][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3-1.7B/70d244cc86ccca08cf5af4e1e306ecf908b1ad5e/generation_config.json "HTTP/1.1 200 OK"
8
- [2026-05-18 07:59:21,751][__main__][INFO] - Loading PEFT adapter from /scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3 ...
9
- [2026-05-18 07:59:24,524][__main__][INFO] - Merging adapter into base weights ...
10
- [2026-05-18 07:59:32,756][root][INFO] - x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -c /tmp/tmpe0op8eya/test.c -o /tmp/tmpe0op8eya/test.o
11
- [2026-05-18 07:59:32,776][root][INFO] - x86_64-linux-gnu-gcc /tmp/tmpe0op8eya/test.o -laio -o /tmp/tmpe0op8eya/a.out
12
- [2026-05-18 07:59:32,791][root][INFO] - x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -c /tmp/tmpqaqjo4lx/test.c -o /tmp/tmpqaqjo4lx/test.o
13
- [2026-05-18 07:59:32,810][root][INFO] - x86_64-linux-gnu-gcc /tmp/tmpqaqjo4lx/test.o -L/usr/local/cuda -L/usr/local/cuda/lib64 -lcufile -o /tmp/tmpqaqjo4lx/a.out
14
- [2026-05-18 07:59:32,856][root][INFO] - x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -c /tmp/tmp4ir03sjd/test.c -o /tmp/tmp4ir03sjd/test.o
15
- [2026-05-18 07:59:32,875][root][INFO] - x86_64-linux-gnu-gcc /tmp/tmp4ir03sjd/test.o -laio -o /tmp/tmp4ir03sjd/a.out
16
- [2026-05-18 07:59:40,870][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3-1.7B/resolve/main/config.json "HTTP/1.1 307 Temporary Redirect"
17
- [2026-05-18 07:59:40,878][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3-1.7B/70d244cc86ccca08cf5af4e1e306ecf908b1ad5e/config.json "HTTP/1.1 200 OK"
18
- [2026-05-18 07:59:41,004][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/Qwen/Qwen3-1.7B/resolve/main/tokenizer_config.json "HTTP/1.1 307 Temporary Redirect"
19
- [2026-05-18 07:59:41,013][httpx][INFO] - HTTP Request: HEAD https://huggingface.co/api/resolve-cache/models/Qwen/Qwen3-1.7B/70d244cc86ccca08cf5af4e1e306ecf908b1ad5e/tokenizer_config.json "HTTP/1.1 200 OK"
20
- [2026-05-18 07:59:41,134][httpx][INFO] - HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3-1.7B/tree/main/additional_chat_templates?recursive=false&expand=false "HTTP/1.1 404 Not Found"
21
- [2026-05-18 07:59:41,256][httpx][INFO] - HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3-1.7B/tree/main?recursive=true&expand=false "HTTP/1.1 200 OK"
22
- [2026-05-18 07:59:42,028][httpx][INFO] - HTTP Request: GET https://huggingface.co/api/models/Qwen/Qwen3-1.7B "HTTP/1.1 200 OK"
23
- [2026-05-18 07:59:42,145][__main__][INFO] - Merged checkpoint saved to /scratch/checkpoints/multilingual/overnight-bestshot-20260518/gcall2e-c3_merged
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eb516d8921eba1c1e4fa4b788bcff70e1f3ab2f434b474d23744c23bc940114f
3
- size 3441185608
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af67a286c5b5a6dac80ab6a00cbae5a4c74ccc73502c072ff47836c8d50302b8
3
+ size 4063515640
tokenizer_config.json CHANGED
@@ -20,12 +20,11 @@
20
  "<|image_pad|>",
21
  "<|video_pad|>"
22
  ],
23
- "is_local": false,
24
  "local_files_only": false,
25
  "model_max_length": 131072,
26
  "pad_token": "<|endoftext|>",
27
  "split_special_tokens": false,
28
  "tokenizer_class": "Qwen2Tokenizer",
29
- "unk_token": null,
30
- "chat_template": "{%- set enable_thinking = true %}\n{%- set flab_boxed_instruction = \"Solve the problem carefully. Think before answering. You must finish every response with exactly one final answer in the form \\\\boxed{LETTER}. Never omit the final boxed answer.\" %}\n{%- if flab_boxed_instruction %}{{ '<|im_start|>system\\n' + flab_boxed_instruction + '<|im_end|>\\n' }}{%- endif %}{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- 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>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}"
31
  }
 
20
  "<|image_pad|>",
21
  "<|video_pad|>"
22
  ],
23
+ "is_local": true,
24
  "local_files_only": false,
25
  "model_max_length": 131072,
26
  "pad_token": "<|endoftext|>",
27
  "split_special_tokens": false,
28
  "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null
 
30
  }