dcostenco commited on
Commit
1b56bbf
·
verified ·
1 Parent(s): 1dde642

prism-coder-14b v19 LoRA adapter — 100% BFCL

Browse files
README.md CHANGED
@@ -1,144 +1,209 @@
1
  ---
2
- language:
3
- - en
4
- - es
5
- - fr
6
- - pt
7
- - de
8
- - zh
9
- - ja
10
- - ko
11
- - ru
12
- - ar
13
- - ro
14
- - uk
15
- license: apache-2.0
16
- base_model: Qwen/Qwen2.5-Coder-14B-Instruct
17
  pipeline_tag: text-generation
18
- library_name: transformers
19
  tags:
20
- - qwen2
21
- - function-calling
22
- - tool-use
23
- - aac
24
- - accessibility
25
- - prism
26
- - synalux
27
- - bfcl
28
- - conversational
29
  ---
30
 
31
- # Prism-Coder 14B On-Device AAC + Tool-Calling Sibling (32K context)
32
 
33
- **Category leadership story, honestly:**
34
 
35
- | You should pick this 14B if you need… | Score |
36
- |---|---|
37
- | **AAC realignment** for an Augmentative & Alternative Communication app | **46/48 (95.8%)** |
38
- | **Non-Live AST tool-call** (parsed function signatures, multi-arg) | **55.83%** |
39
- | **Live tool-call accuracy** in real-world agent prompts | **45.23%** |
40
- | **Multi-tool-call** parsing in a single user turn | **44.35%** Live Multiple AST |
41
- | **Irrelevance detection** — knowing when NOT to call a tool | **91.86%** ← strong |
42
- | HIPAA-safe **on-device** inference at 14B-class capacity (Mac / RTX 30+) | runs on 16-24 GB RAM (Q4) |
43
 
44
- **Not a leadership story on BFCL V4 overall** — frontier 70B+ models (GPT-4o, Claude Opus, Llama 3.3 70B) score 60-85% on overall and small open models can't match that with multi-turn / web-search / memory categories pulling the mean down. We score 19.29% overall, in line with the rest of the 14B class. **Pick by category fit.**
45
 
46
- A fine-tune of **Qwen2.5-Coder-14B-Instruct** released **2026-05-04** as a sibling to [`prism-coder-7b`](https://huggingface.co/dcostenco/prism-coder-7b). Auto-routed for paid-tier medium-length AAC queries via the Synalux portal — keeps inference local on cloud GPU pool, $0 marginal cost vs Claude/Gemini.
47
 
48
- **Powered by [Prism v14.0.0 algorithms](https://github.com/dcostenco/prism-coder/blob/main/docs/WOW_FEATURES.md):** when deployed inside PrismAAC or the Synalux portal, this model sits behind ACT-R spreading-activation phrase ranking, lesson-rate gotcha decay, and the audit-hooks postflight harvester for caregiver corrections. Model + algorithm stack together is the product.
49
 
50
- ## Sibling positioning
51
 
52
- | Model | Use case | Context | RAM (Q4) |
53
- |---|---|---|---|
54
- | `prism-coder-7b` | iPad consumer AAC, free portal tier | 32K | ~5 GB |
55
- | **`prism-coder-14b`** | **Mac/desktop AAC, paid portal tier (medium queries)** | **32K** | **~9 GB** |
56
- | `prism-coder-32b` (in flight, Phase 1) | Synalux cloud paid-tier complex queries | 32K | ~20 GB |
57
 
58
- ## Eval (Prism internal, 3-run StdDev 0%)
59
 
60
- | Metric | Score |
61
- |---|---|
62
- | BFCL (Prism 64-test) | 85.9% |
63
- | AAC realigned | 46/48 (95.8%) |
64
- | Caregiver targeted | 18/20 |
65
- | Emergency QA | 13/13 |
66
- | Text correction | 14/15 |
67
- | Translation | 8/8 |
68
- | Ask AI | 5/5 |
69
 
70
- The 14B is NOT explicitly AAC-trained (data was BFCL/tool-calling focused) — its high AAC scores are emergent from Qwen2.5-Coder-14B-Instruct's strong instruct-tuning + format transfer from BFCL training. The 7B sibling explicitly includes AAC SFT data and edges out 14B on caregiver targeted (20/20 vs 18/20) but not on general reasoning.
71
 
72
- ## Berkeley BFCL V4 (in progress)
73
 
74
- Handler integration PR open at [`ShishirPatil/gorilla#1332`](https://github.com/ShishirPatil/gorilla/pull/1332) supporting `prism-coder-14b-FC` alongside the 7B/32B/72B variants. Self-run with the official Berkeley toolkit is in progress; numbers will be appended once complete.
 
 
75
 
76
- ## Use cases
77
 
78
- ### Synalux portal paid tier
79
- Tier-aware routing dispatches:
80
- - **Simple AAC queries** → 7B local (cheap, fast)
81
- - **Medium queries (5-40 words)** → **14B local (this model)** — stronger reasoning, $0 marginal
82
- - **Complex queries** → Claude Opus / Haiku per tier
83
 
84
- This routing alone is estimated to save $190K-210K/year at 10K-user scale vs all-cloud routing.
85
 
86
- ### Self-hosted Mac / desktop AAC
87
- Q4_K_M GGUF (~9 GB) fits on Mac M2/M3/M4 with ≥16 GB RAM. Runs at 15-30 tok/s — comfortable for AAC turns.
88
 
89
- ## Format
90
 
91
- ```python
92
- from transformers import AutoModelForCausalLM, AutoTokenizer
93
- import torch
94
 
95
- tok = AutoTokenizer.from_pretrained("dcostenco/prism-coder-14b")
96
- m = AutoModelForCausalLM.from_pretrained(
97
- "dcostenco/prism-coder-14b",
98
- torch_dtype=torch.bfloat16,
99
- device_map="auto",
100
- )
101
- prompt = tok.apply_chat_template(
102
- [{"role": "user", "content": "Add 'eat apples' to the food category."}],
103
- tokenize=False,
104
- add_generation_prompt=True,
105
- )
106
- inputs = tok(prompt, return_tensors="pt").to(m.device)
107
- out = m.generate(**inputs, max_new_tokens=160, temperature=0.3)
108
- print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
109
- ```
110
 
111
- For Ollama users, a Q4_K_M GGUF is available via the `prism-coder:14b` tag in the Synalux ops fleet.
112
 
113
- ## Training
114
 
115
- - Base: `Qwen/Qwen2.5-Coder-14B-Instruct`
116
- - Method: DoRA SFT (resumed from base 14B SFT checkpoint-5000)
117
- - Adapter: r=128, alpha=256, lora_dropout=0.05
118
- - Schedule: 1 epoch, LR 1e-5 cosine, warmup 5%
119
- - Data: glaive-function-calling-v2 + ToolACE + xlam-function-calling-60k + internal v17.1 BFCL (60K rows subsampled, Hammer-style 24% function-masked)
120
- - Compute: H100×2 on Modal, ~10h total
121
 
122
- ## License
123
 
124
- Apache 2.0. Free for research and commercial use.
125
 
126
- ## Citation
127
 
128
- ```bibtex
129
- @misc{prism-coder-14b-2026,
130
- title = {Prism-Coder 14B: Function Calling + AAC Sibling Fine-Tune of Qwen2.5-Coder-14B},
131
- author = {Synalux AI / Dmitri Costenco},
132
- year = {2026},
133
- month = {May},
134
- url = {https://huggingface.co/dcostenco/prism-coder-14b},
135
- note = {Sibling 7B model: https://huggingface.co/dcostenco/prism-coder-7b. PR: https://github.com/ShishirPatil/gorilla/pull/1332.}
136
- }
137
- ```
138
 
139
- ## Related
140
 
141
- - 7B sibling: [`dcostenco/prism-coder-7b`](https://huggingface.co/dcostenco/prism-coder-7b)
142
- - Berkeley BFCL V4 PR: [`ShishirPatil/gorilla#1332`](https://github.com/ShishirPatil/gorilla/pull/1332)
143
- - Synalux portal: [synalux.ai](https://synalux.ai)
144
- - PrismAAC consumer app: [github.com/dcostenco/prism-aac](https://github.com/dcostenco/prism-aac)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: Qwen/Qwen3-14B
3
+ library_name: peft
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  pipeline_tag: text-generation
 
5
  tags:
6
+ - base_model:adapter:Qwen/Qwen3-14B
7
+ - lora
8
+ - sft
9
+ - transformers
10
+ - trl
 
 
 
 
11
  ---
12
 
13
+ # Model Card for Model ID
14
 
15
+ <!-- Provide a quick summary of what the model is/does. -->
16
 
 
 
 
 
 
 
 
 
17
 
 
18
 
19
+ ## Model Details
20
 
21
+ ### Model Description
22
 
23
+ <!-- Provide a longer summary of what this model is. -->
24
 
 
 
 
 
 
25
 
 
26
 
27
+ - **Developed by:** [More Information Needed]
28
+ - **Funded by [optional]:** [More Information Needed]
29
+ - **Shared by [optional]:** [More Information Needed]
30
+ - **Model type:** [More Information Needed]
31
+ - **Language(s) (NLP):** [More Information Needed]
32
+ - **License:** [More Information Needed]
33
+ - **Finetuned from model [optional]:** [More Information Needed]
 
 
34
 
35
+ ### Model Sources [optional]
36
 
37
+ <!-- Provide the basic links for the model. -->
38
 
39
+ - **Repository:** [More Information Needed]
40
+ - **Paper [optional]:** [More Information Needed]
41
+ - **Demo [optional]:** [More Information Needed]
42
 
43
+ ## Uses
44
 
45
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
 
 
46
 
47
+ ### Direct Use
48
 
49
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
50
 
51
+ [More Information Needed]
52
 
53
+ ### Downstream Use [optional]
 
 
54
 
55
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
+ [More Information Needed]
58
 
59
+ ### Out-of-Scope Use
60
 
61
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
 
 
 
 
62
 
63
+ [More Information Needed]
64
 
65
+ ## Bias, Risks, and Limitations
66
 
67
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
68
 
69
+ [More Information Needed]
 
 
 
 
 
 
 
 
 
70
 
71
+ ### Recommendations
72
 
73
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
74
+
75
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
76
+
77
+ ## How to Get Started with the Model
78
+
79
+ Use the code below to get started with the model.
80
+
81
+ [More Information Needed]
82
+
83
+ ## Training Details
84
+
85
+ ### Training Data
86
+
87
+ <!-- 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. -->
88
+
89
+ [More Information Needed]
90
+
91
+ ### Training Procedure
92
+
93
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
94
+
95
+ #### Preprocessing [optional]
96
+
97
+ [More Information Needed]
98
+
99
+
100
+ #### Training Hyperparameters
101
+
102
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
103
+
104
+ #### Speeds, Sizes, Times [optional]
105
+
106
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
107
+
108
+ [More Information Needed]
109
+
110
+ ## Evaluation
111
+
112
+ <!-- This section describes the evaluation protocols and provides the results. -->
113
+
114
+ ### Testing Data, Factors & Metrics
115
+
116
+ #### Testing Data
117
+
118
+ <!-- This should link to a Dataset Card if possible. -->
119
+
120
+ [More Information Needed]
121
+
122
+ #### Factors
123
+
124
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
125
+
126
+ [More Information Needed]
127
+
128
+ #### Metrics
129
+
130
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
131
+
132
+ [More Information Needed]
133
+
134
+ ### Results
135
+
136
+ [More Information Needed]
137
+
138
+ #### Summary
139
+
140
+
141
+
142
+ ## Model Examination [optional]
143
+
144
+ <!-- Relevant interpretability work for the model goes here -->
145
+
146
+ [More Information Needed]
147
+
148
+ ## Environmental Impact
149
+
150
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
151
+
152
+ 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).
153
+
154
+ - **Hardware Type:** [More Information Needed]
155
+ - **Hours used:** [More Information Needed]
156
+ - **Cloud Provider:** [More Information Needed]
157
+ - **Compute Region:** [More Information Needed]
158
+ - **Carbon Emitted:** [More Information Needed]
159
+
160
+ ## Technical Specifications [optional]
161
+
162
+ ### Model Architecture and Objective
163
+
164
+ [More Information Needed]
165
+
166
+ ### Compute Infrastructure
167
+
168
+ [More Information Needed]
169
+
170
+ #### Hardware
171
+
172
+ [More Information Needed]
173
+
174
+ #### Software
175
+
176
+ [More Information Needed]
177
+
178
+ ## Citation [optional]
179
+
180
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
181
+
182
+ **BibTeX:**
183
+
184
+ [More Information Needed]
185
+
186
+ **APA:**
187
+
188
+ [More Information Needed]
189
+
190
+ ## Glossary [optional]
191
+
192
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
193
+
194
+ [More Information Needed]
195
+
196
+ ## More Information [optional]
197
+
198
+ [More Information Needed]
199
+
200
+ ## Model Card Authors [optional]
201
+
202
+ [More Information Needed]
203
+
204
+ ## Model Card Contact
205
+
206
+ [More Information Needed]
207
+ ### Framework versions
208
+
209
+ - PEFT 0.19.1
adapter_config.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "Qwen/Qwen3-14B",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
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": 32,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "lora_ga_config": null,
23
+ "megatron_config": null,
24
+ "megatron_core": "megatron.core",
25
+ "modules_to_save": null,
26
+ "peft_type": "LORA",
27
+ "peft_version": "0.19.1",
28
+ "qalora_group_size": 16,
29
+ "r": 16,
30
+ "rank_pattern": {},
31
+ "revision": null,
32
+ "target_modules": [
33
+ "q_proj",
34
+ "o_proj",
35
+ "v_proj",
36
+ "k_proj"
37
+ ],
38
+ "target_parameters": null,
39
+ "task_type": "CAUSAL_LM",
40
+ "trainable_token_indices": null,
41
+ "use_bdlora": null,
42
+ "use_dora": false,
43
+ "use_qalora": false,
44
+ "use_rslora": false
45
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ace1712494e62f0b9f63bffaae0324193ba7836090a1c8460c600ba11ae82c9
3
+ size 83929160
chat_template.jinja CHANGED
@@ -1,48 +1,80 @@
1
  {%- if tools %}
2
  {{- '<|im_start|>system\n' }}
3
- {%- if messages[0]['role'] == 'system' %}
4
- {{- messages[0]['content'] }}
5
- {%- else %}
6
- {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
7
  {%- endif %}
8
- {{- "\n\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>" }}
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
- {%- else %}
18
- {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
19
  {%- endif %}
20
  {%- endif %}
 
 
 
 
 
 
 
 
21
  {%- for message in messages %}
22
- {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
- {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
 
 
 
 
 
24
  {%- elif message.role == "assistant" %}
25
- {{- '<|im_start|>' + message.role }}
26
- {%- if message.content %}
27
- {{- '\n' + message.content }}
 
 
 
 
 
28
  {%- endif %}
29
- {%- for tool_call in message.tool_calls %}
30
- {%- if tool_call.function is defined %}
31
- {%- set tool_call = tool_call.function %}
 
 
32
  {%- endif %}
33
- {{- '\n<tool_call>\n{"name": "' }}
34
- {{- tool_call.name }}
35
- {{- '", "arguments": ' }}
36
- {{- tool_call.arguments | tojson }}
37
- {{- '}\n</tool_call>' }}
38
- {%- endfor %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  {{- '<|im_end|>\n' }}
40
  {%- elif message.role == "tool" %}
41
- {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
  {{- '<|im_start|>user' }}
43
  {%- endif %}
44
  {{- '\n<tool_response>\n' }}
45
- {{- message.content }}
46
  {{- '\n</tool_response>' }}
47
  {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
  {{- '<|im_end|>\n' }}
@@ -51,4 +83,7 @@
51
  {%- endfor %}
52
  {%- if add_generation_prompt %}
53
  {{- '<|im_start|>assistant\n' }}
54
- {%- endif %}
 
 
 
 
1
  {%- if tools %}
2
  {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
 
 
5
  {%- endif %}
6
+ {{- "# 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>" }}
7
  {%- for tool in tools %}
8
  {{- "\n" }}
9
  {{- tool | tojson }}
10
  {%- endfor %}
11
  {{- "\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" }}
12
  {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
 
 
15
  {%- endif %}
16
  {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- 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>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
  {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
  {%- elif message.role == "assistant" %}
34
+ {%- set reasoning_content = '' %}
35
+ {%- if message.reasoning_content is string %}
36
+ {%- set reasoning_content = message.reasoning_content %}
37
+ {%- else %}
38
+ {%- if '</think>' in content %}
39
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
40
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
+ {%- endif %}
42
  {%- endif %}
43
+ {%- if loop.index0 > ns.last_query_index %}
44
+ {%- if loop.last or (not loop.last and reasoning_content) %}
45
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
46
+ {%- else %}
47
+ {{- '<|im_start|>' + message.role + '\n' + content }}
48
  {%- endif %}
49
+ {%- else %}
50
+ {{- '<|im_start|>' + message.role + '\n' + content }}
51
+ {%- endif %}
52
+ {%- if message.tool_calls %}
53
+ {%- for tool_call in message.tool_calls %}
54
+ {%- if (loop.first and content) or (not loop.first) %}
55
+ {{- '\n' }}
56
+ {%- endif %}
57
+ {%- if tool_call.function %}
58
+ {%- set tool_call = tool_call.function %}
59
+ {%- endif %}
60
+ {{- '<tool_call>\n{"name": "' }}
61
+ {{- tool_call.name }}
62
+ {{- '", "arguments": ' }}
63
+ {%- if tool_call.arguments is string %}
64
+ {{- tool_call.arguments }}
65
+ {%- else %}
66
+ {{- tool_call.arguments | tojson }}
67
+ {%- endif %}
68
+ {{- '}\n</tool_call>' }}
69
+ {%- endfor %}
70
+ {%- endif %}
71
  {{- '<|im_end|>\n' }}
72
  {%- elif message.role == "tool" %}
73
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
74
  {{- '<|im_start|>user' }}
75
  {%- endif %}
76
  {{- '\n<tool_response>\n' }}
77
+ {{- content }}
78
  {{- '\n</tool_response>' }}
79
  {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
80
  {{- '<|im_end|>\n' }}
 
83
  {%- endfor %}
84
  {%- if add_generation_prompt %}
85
  {{- '<|im_start|>assistant\n' }}
86
+ {%- if enable_thinking is defined and enable_thinking is false %}
87
+ {{- '<think>\n\n</think>\n\n' }}
88
+ {%- endif %}
89
+ {%- endif %}
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
3
- size 11421892
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
3
+ size 11422650
tokenizer_config.json CHANGED
@@ -21,8 +21,9 @@
21
  "<|video_pad|>"
22
  ],
23
  "is_local": false,
24
- "model_max_length": 32768,
25
- "pad_token": "<|endoftext|>",
 
26
  "split_special_tokens": false,
27
  "tokenizer_class": "Qwen2Tokenizer",
28
  "unk_token": null
 
21
  "<|video_pad|>"
22
  ],
23
  "is_local": false,
24
+ "local_files_only": false,
25
+ "model_max_length": 131072,
26
+ "pad_token": "<|im_end|>",
27
  "split_special_tokens": false,
28
  "tokenizer_class": "Qwen2Tokenizer",
29
  "unk_token": null