Upload folder using huggingface_hub
Browse files- Qwen3-0.6B-rk3588-w8a8-opt-0-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8-opt-0-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8-opt-0-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g128-opt-0-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g128-opt-0-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g128-opt-0-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g128-opt-1-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g128-opt-1-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g128-opt-1-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g256-opt-0-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g256-opt-0-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g256-opt-0-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g256-opt-1-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g256-opt-1-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g256-opt-1-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g512-opt-0-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g512-opt-0-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g512-opt-0-hybrid-ratio-1.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g512-opt-1-hybrid-ratio-0.0.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g512-opt-1-hybrid-ratio-0.5.rkllm +2 -2
- Qwen3-0.6B-rk3588-w8a8_g512-opt-1-hybrid-ratio-1.0.rkllm +2 -2
- README.md +11 -22
- added_tokens.json +28 -0
- chat_template.jinja +97 -0
- config.json +4 -3
- generation_config.json +13 -12
- special_tokens_map.json +31 -0
- tokenizer_config.json +7 -5
Qwen3-0.6B-rk3588-w8a8-opt-0-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33eaa663d464507081c1b8cb8b076b0733cf4e1df313a85f4f6ef480a93f8179
|
| 3 |
+
size 932189806
|
Qwen3-0.6B-rk3588-w8a8-opt-0-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33eaa663d464507081c1b8cb8b076b0733cf4e1df313a85f4f6ef480a93f8179
|
| 3 |
+
size 932189806
|
Qwen3-0.6B-rk3588-w8a8-opt-0-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33eaa663d464507081c1b8cb8b076b0733cf4e1df313a85f4f6ef480a93f8179
|
| 3 |
+
size 932189806
|
Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33eaa663d464507081c1b8cb8b076b0733cf4e1df313a85f4f6ef480a93f8179
|
| 3 |
+
size 932189806
|
Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33eaa663d464507081c1b8cb8b076b0733cf4e1df313a85f4f6ef480a93f8179
|
| 3 |
+
size 932189806
|
Qwen3-0.6B-rk3588-w8a8-opt-1-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33eaa663d464507081c1b8cb8b076b0733cf4e1df313a85f4f6ef480a93f8179
|
| 3 |
+
size 932189806
|
Qwen3-0.6B-rk3588-w8a8_g128-opt-0-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab0872969b9f6db51b16b4436432a1f1562d5f9e45399ff7a6e0b1f35ec4bded
|
| 3 |
+
size 1005831206
|
Qwen3-0.6B-rk3588-w8a8_g128-opt-0-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab0872969b9f6db51b16b4436432a1f1562d5f9e45399ff7a6e0b1f35ec4bded
|
| 3 |
+
size 1005831206
|
Qwen3-0.6B-rk3588-w8a8_g128-opt-0-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab0872969b9f6db51b16b4436432a1f1562d5f9e45399ff7a6e0b1f35ec4bded
|
| 3 |
+
size 1005831206
|
Qwen3-0.6B-rk3588-w8a8_g128-opt-1-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:922091b53a3698445df53ddebc19d7935aba4e303f8ea3027bf40dd41bfc0d41
|
| 3 |
+
size 996372166
|
Qwen3-0.6B-rk3588-w8a8_g128-opt-1-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:922091b53a3698445df53ddebc19d7935aba4e303f8ea3027bf40dd41bfc0d41
|
| 3 |
+
size 996372166
|
Qwen3-0.6B-rk3588-w8a8_g128-opt-1-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:922091b53a3698445df53ddebc19d7935aba4e303f8ea3027bf40dd41bfc0d41
|
| 3 |
+
size 996372166
|
Qwen3-0.6B-rk3588-w8a8_g256-opt-0-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a624af4291ab59aa458b9ab9d03dd71b07034f55cc0aa313e8776b8ceb672922
|
| 3 |
+
size 969552486
|
Qwen3-0.6B-rk3588-w8a8_g256-opt-0-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a624af4291ab59aa458b9ab9d03dd71b07034f55cc0aa313e8776b8ceb672922
|
| 3 |
+
size 969552486
|
Qwen3-0.6B-rk3588-w8a8_g256-opt-0-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a624af4291ab59aa458b9ab9d03dd71b07034f55cc0aa313e8776b8ceb672922
|
| 3 |
+
size 969552486
|
Qwen3-0.6B-rk3588-w8a8_g256-opt-1-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26b317c545c856b8604bda828c576653d6a326073188043f59043a25ccc39de0
|
| 3 |
+
size 965460166
|
Qwen3-0.6B-rk3588-w8a8_g256-opt-1-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26b317c545c856b8604bda828c576653d6a326073188043f59043a25ccc39de0
|
| 3 |
+
size 965460166
|
Qwen3-0.6B-rk3588-w8a8_g256-opt-1-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26b317c545c856b8604bda828c576653d6a326073188043f59043a25ccc39de0
|
| 3 |
+
size 965460166
|
Qwen3-0.6B-rk3588-w8a8_g512-opt-0-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a7a1e7b09af10a4e60d0cff4a2e275f9b2b95df54b413fcae1cab54981c4c7e
|
| 3 |
+
size 951413126
|
Qwen3-0.6B-rk3588-w8a8_g512-opt-0-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a7a1e7b09af10a4e60d0cff4a2e275f9b2b95df54b413fcae1cab54981c4c7e
|
| 3 |
+
size 951413126
|
Qwen3-0.6B-rk3588-w8a8_g512-opt-0-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a7a1e7b09af10a4e60d0cff4a2e275f9b2b95df54b413fcae1cab54981c4c7e
|
| 3 |
+
size 951413126
|
Qwen3-0.6B-rk3588-w8a8_g512-opt-1-hybrid-ratio-0.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69a6ade2b986eb2962c965c6dbfed4066a5403a805f8a5ed382e0e5136d46e58
|
| 3 |
+
size 950004166
|
Qwen3-0.6B-rk3588-w8a8_g512-opt-1-hybrid-ratio-0.5.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69a6ade2b986eb2962c965c6dbfed4066a5403a805f8a5ed382e0e5136d46e58
|
| 3 |
+
size 950004166
|
Qwen3-0.6B-rk3588-w8a8_g512-opt-1-hybrid-ratio-1.0.rkllm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69a6ade2b986eb2962c965c6dbfed4066a5403a805f8a5ed382e0e5136d46e58
|
| 3 |
+
size 950004166
|
README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
---
|
| 2 |
base_model:
|
| 3 |
-
- Qwen/Qwen3-0.6B
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
license_link: https://huggingface.co/Qwen/Qwen3-0.6B/blob/main/LICENSE
|
| 7 |
-
pipeline_tag: text-generation
|
| 8 |
---
|
| 9 |
# Qwen3-0.6B-RK3588-1.2.1
|
| 10 |
|
|
@@ -16,11 +14,7 @@ Compatible with RKLLM version: 1.2.1
|
|
| 16 |
|
| 17 |
# Original Model Card for base model, Qwen3-0.6B, below:
|
| 18 |
|
| 19 |
-
|
| 20 |
# Qwen3-0.6B
|
| 21 |
-
<a href="https://chat.qwen.ai/" target="_blank" style="margin: 2px;">
|
| 22 |
-
<img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
|
| 23 |
-
</a>
|
| 24 |
|
| 25 |
## Qwen3 Highlights
|
| 26 |
|
|
@@ -45,9 +39,6 @@ Qwen3 is the latest generation of large language models in Qwen series, offering
|
|
| 45 |
|
| 46 |
For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our [blog](https://qwenlm.github.io/blog/qwen3/), [GitHub](https://github.com/QwenLM/Qwen3), and [Documentation](https://qwen.readthedocs.io/en/latest/).
|
| 47 |
|
| 48 |
-
> [!TIP]
|
| 49 |
-
> If you encounter significant endless repetitions, please refer to the [Best Practices](#best-practices) section for optimal sampling parameters, and set the ``presence_penalty`` to 1.5.
|
| 50 |
-
|
| 51 |
## Quickstart
|
| 52 |
|
| 53 |
The code of Qwen3 has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
|
|
@@ -105,23 +96,21 @@ print("thinking content:", thinking_content)
|
|
| 105 |
print("content:", content)
|
| 106 |
```
|
| 107 |
|
| 108 |
-
For deployment, you can use `
|
| 109 |
-
- SGLang:
|
| 110 |
-
```shell
|
| 111 |
-
python -m sglang.launch_server --model-path Qwen/Qwen3-0.6B --reasoning-parser qwen3
|
| 112 |
-
```
|
| 113 |
- vLLM:
|
| 114 |
```shell
|
| 115 |
vllm serve Qwen/Qwen3-0.6B --enable-reasoning --reasoning-parser deepseek_r1
|
| 116 |
```
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
| 119 |
|
| 120 |
## Switching Between Thinking and Non-Thinking Mode
|
| 121 |
|
| 122 |
> [!TIP]
|
| 123 |
-
> The `enable_thinking` switch is also available in APIs created by
|
| 124 |
-
> Please refer to our documentation
|
| 125 |
|
| 126 |
### `enable_thinking=True`
|
| 127 |
|
|
@@ -219,7 +208,7 @@ if __name__ == "__main__":
|
|
| 219 |
print(f"Bot: {response_3}")
|
| 220 |
```
|
| 221 |
|
| 222 |
-
>
|
| 223 |
> For API compatibility, when `enable_thinking=True`, regardless of whether the user uses `/think` or `/no_think`, the model will always output a block wrapped in `<think>...</think>`. However, the content inside this block may be empty if thinking is disabled.
|
| 224 |
> When `enable_thinking=False`, the soft switches are not valid. Regardless of any `/think` or `/no_think` tags input by the user, the model will not generate think content and will not include a `<think>...</think>` block.
|
| 225 |
|
|
|
|
| 1 |
---
|
| 2 |
base_model:
|
| 3 |
+
- Qwen/Qwen3-0.6B
|
| 4 |
+
tags:
|
| 5 |
+
- unsloth
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
# Qwen3-0.6B-RK3588-1.2.1
|
| 8 |
|
|
|
|
| 14 |
|
| 15 |
# Original Model Card for base model, Qwen3-0.6B, below:
|
| 16 |
|
|
|
|
| 17 |
# Qwen3-0.6B
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Qwen3 Highlights
|
| 20 |
|
|
|
|
| 39 |
|
| 40 |
For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our [blog](https://qwenlm.github.io/blog/qwen3/), [GitHub](https://github.com/QwenLM/Qwen3), and [Documentation](https://qwen.readthedocs.io/en/latest/).
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
## Quickstart
|
| 43 |
|
| 44 |
The code of Qwen3 has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
|
|
|
|
| 96 |
print("content:", content)
|
| 97 |
```
|
| 98 |
|
| 99 |
+
For deployment, you can use `vllm>=0.8.5` or `sglang>=0.4.5.post2` to create an OpenAI-compatible API endpoint:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
- vLLM:
|
| 101 |
```shell
|
| 102 |
vllm serve Qwen/Qwen3-0.6B --enable-reasoning --reasoning-parser deepseek_r1
|
| 103 |
```
|
| 104 |
+
- SGLang:
|
| 105 |
+
```shell
|
| 106 |
+
python -m sglang.launch_server --model-path Qwen/Qwen3-0.6B --reasoning-parser deepseek-r1
|
| 107 |
+
```
|
| 108 |
|
| 109 |
## Switching Between Thinking and Non-Thinking Mode
|
| 110 |
|
| 111 |
> [!TIP]
|
| 112 |
+
> The `enable_thinking` switch is also available in APIs created by vLLM and SGLang.
|
| 113 |
+
> Please refer to [our documentation](https://qwen.readthedocs.io/) for more details.
|
| 114 |
|
| 115 |
### `enable_thinking=True`
|
| 116 |
|
|
|
|
| 208 |
print(f"Bot: {response_3}")
|
| 209 |
```
|
| 210 |
|
| 211 |
+
> **Note**
|
| 212 |
> For API compatibility, when `enable_thinking=True`, regardless of whether the user uses `/think` or `/no_think`, the model will always output a block wrapped in `<think>...</think>`. However, the content inside this block may be empty if thinking is disabled.
|
| 213 |
> When `enable_thinking=False`, the soft switches are not valid. Regardless of any `/think` or `/no_think` tags input by the user, the model will not generate think content and will not include a `<think>...</think>` block.
|
| 214 |
|
added_tokens.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</think>": 151668,
|
| 3 |
+
"</tool_call>": 151658,
|
| 4 |
+
"</tool_response>": 151666,
|
| 5 |
+
"<think>": 151667,
|
| 6 |
+
"<tool_call>": 151657,
|
| 7 |
+
"<tool_response>": 151665,
|
| 8 |
+
"<|box_end|>": 151649,
|
| 9 |
+
"<|box_start|>": 151648,
|
| 10 |
+
"<|endoftext|>": 151643,
|
| 11 |
+
"<|file_sep|>": 151664,
|
| 12 |
+
"<|fim_middle|>": 151660,
|
| 13 |
+
"<|fim_pad|>": 151662,
|
| 14 |
+
"<|fim_prefix|>": 151659,
|
| 15 |
+
"<|fim_suffix|>": 151661,
|
| 16 |
+
"<|im_end|>": 151645,
|
| 17 |
+
"<|im_start|>": 151644,
|
| 18 |
+
"<|image_pad|>": 151655,
|
| 19 |
+
"<|object_ref_end|>": 151647,
|
| 20 |
+
"<|object_ref_start|>": 151646,
|
| 21 |
+
"<|quad_end|>": 151651,
|
| 22 |
+
"<|quad_start|>": 151650,
|
| 23 |
+
"<|repo_name|>": 151663,
|
| 24 |
+
"<|video_pad|>": 151656,
|
| 25 |
+
"<|vision_end|>": 151653,
|
| 26 |
+
"<|vision_pad|>": 151654,
|
| 27 |
+
"<|vision_start|>": 151652
|
| 28 |
+
}
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 forward_message in messages %}
|
| 19 |
+
{%- set index = (messages|length - 1) - loop.index0 %}
|
| 20 |
+
{%- set message = messages[index] %}
|
| 21 |
+
{%- set tool_start = '<tool_response>' %}
|
| 22 |
+
{%- set tool_start_length = tool_start|length %}
|
| 23 |
+
{%- set start_of_message = message.content[:tool_start_length] %}
|
| 24 |
+
{%- set tool_end = '</tool_response>' %}
|
| 25 |
+
{%- set tool_end_length = tool_end|length %}
|
| 26 |
+
{%- set start_pos = (message.content|length) - tool_end_length %}
|
| 27 |
+
{%- if start_pos < 0 %}
|
| 28 |
+
{%- set start_pos = 0 %}
|
| 29 |
+
{%- endif %}
|
| 30 |
+
{%- set end_of_message = message.content[start_pos:] %}
|
| 31 |
+
{%- if ns.multi_step_tool and message.role == "user" and not(start_of_message == tool_start and end_of_message == tool_end) %}
|
| 32 |
+
{%- set ns.multi_step_tool = false %}
|
| 33 |
+
{%- set ns.last_query_index = index %}
|
| 34 |
+
{%- endif %}
|
| 35 |
+
{%- endfor %}
|
| 36 |
+
{%- for message in messages %}
|
| 37 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 38 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 39 |
+
{%- elif message.role == "assistant" %}
|
| 40 |
+
{%- set content = message.content %}
|
| 41 |
+
{%- set reasoning_content = '' %}
|
| 42 |
+
{%- if message.reasoning_content is defined and message.reasoning_content is not none %}
|
| 43 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 44 |
+
{%- else %}
|
| 45 |
+
{%- if '</think>' in message.content %}
|
| 46 |
+
{%- set content = (message.content.split('</think>')|last).lstrip('\n') %}
|
| 47 |
+
{%- set reasoning_content = (message.content.split('</think>')|first).rstrip('\n') %}
|
| 48 |
+
{%- set reasoning_content = (reasoning_content.split('<think>')|last).lstrip('\n') %}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- if loop.index0 > ns.last_query_index %}
|
| 52 |
+
{%- if loop.last or (not loop.last and reasoning_content) %}
|
| 53 |
+
{{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
| 54 |
+
{%- else %}
|
| 55 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 56 |
+
{%- endif %}
|
| 57 |
+
{%- else %}
|
| 58 |
+
{{- '<|im_start|>' + message.role + '\n' + content }}
|
| 59 |
+
{%- endif %}
|
| 60 |
+
{%- if message.tool_calls %}
|
| 61 |
+
{%- for tool_call in message.tool_calls %}
|
| 62 |
+
{%- if (loop.first and content) or (not loop.first) %}
|
| 63 |
+
{{- '\n' }}
|
| 64 |
+
{%- endif %}
|
| 65 |
+
{%- if tool_call.function %}
|
| 66 |
+
{%- set tool_call = tool_call.function %}
|
| 67 |
+
{%- endif %}
|
| 68 |
+
{{- '<tool_call>\n{"name": "' }}
|
| 69 |
+
{{- tool_call.name }}
|
| 70 |
+
{{- '", "arguments": ' }}
|
| 71 |
+
{%- if tool_call.arguments is string %}
|
| 72 |
+
{{- tool_call.arguments }}
|
| 73 |
+
{%- else %}
|
| 74 |
+
{{- tool_call.arguments | tojson }}
|
| 75 |
+
{%- endif %}
|
| 76 |
+
{{- '}\n</tool_call>' }}
|
| 77 |
+
{%- endfor %}
|
| 78 |
+
{%- endif %}
|
| 79 |
+
{{- '<|im_end|>\n' }}
|
| 80 |
+
{%- elif message.role == "tool" %}
|
| 81 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 82 |
+
{{- '<|im_start|>user' }}
|
| 83 |
+
{%- endif %}
|
| 84 |
+
{{- '\n<tool_response>\n' }}
|
| 85 |
+
{{- message.content }}
|
| 86 |
+
{{- '\n</tool_response>' }}
|
| 87 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 88 |
+
{{- '<|im_end|>\n' }}
|
| 89 |
+
{%- endif %}
|
| 90 |
+
{%- endif %}
|
| 91 |
+
{%- endfor %}
|
| 92 |
+
{%- if add_generation_prompt %}
|
| 93 |
+
{{- '<|im_start|>assistant\n' }}
|
| 94 |
+
{%- if enable_thinking is defined and enable_thinking is false %}
|
| 95 |
+
{{- '<think>\n\n</think>\n\n' }}
|
| 96 |
+
{%- endif %}
|
| 97 |
+
{%- endif %}
|
config.json
CHANGED
|
@@ -4,7 +4,6 @@
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
-
"bos_token_id": 151643,
|
| 8 |
"eos_token_id": 151645,
|
| 9 |
"head_dim": 128,
|
| 10 |
"hidden_act": "silu",
|
|
@@ -17,14 +16,16 @@
|
|
| 17 |
"num_attention_heads": 16,
|
| 18 |
"num_hidden_layers": 28,
|
| 19 |
"num_key_value_heads": 8,
|
|
|
|
| 20 |
"rms_norm_eps": 1e-06,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 1000000,
|
| 23 |
"sliding_window": null,
|
| 24 |
"tie_word_embeddings": true,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
-
"transformers_version": "4.
|
|
|
|
| 27 |
"use_cache": true,
|
| 28 |
"use_sliding_window": false,
|
| 29 |
"vocab_size": 151936
|
| 30 |
-
}
|
|
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
|
|
|
| 7 |
"eos_token_id": 151645,
|
| 8 |
"head_dim": 128,
|
| 9 |
"hidden_act": "silu",
|
|
|
|
| 16 |
"num_attention_heads": 16,
|
| 17 |
"num_hidden_layers": 28,
|
| 18 |
"num_key_value_heads": 8,
|
| 19 |
+
"pad_token_id": 151654,
|
| 20 |
"rms_norm_eps": 1e-06,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 1000000,
|
| 23 |
"sliding_window": null,
|
| 24 |
"tie_word_embeddings": true,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
+
"transformers_version": "4.52.0.dev0",
|
| 27 |
+
"unsloth_fixed": true,
|
| 28 |
"use_cache": true,
|
| 29 |
"use_sliding_window": false,
|
| 30 |
"vocab_size": 151936
|
| 31 |
+
}
|
generation_config.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
| 1 |
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
151645,
|
| 6 |
+
151643
|
| 7 |
+
],
|
| 8 |
+
"max_length": 40960,
|
| 9 |
+
"pad_token_id": 151654,
|
| 10 |
+
"temperature": 0.6,
|
| 11 |
+
"top_k": 20,
|
| 12 |
+
"top_p": 0.95,
|
| 13 |
+
"transformers_version": "4.52.0.dev0"
|
| 14 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
+
"eos_token": {
|
| 18 |
+
"content": "<|im_end|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
"pad_token": {
|
| 25 |
+
"content": "<|vision_pad|>",
|
| 26 |
+
"lstrip": false,
|
| 27 |
+
"normalized": false,
|
| 28 |
+
"rstrip": false,
|
| 29 |
+
"single_word": false
|
| 30 |
+
}
|
| 31 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -227,13 +227,15 @@
|
|
| 227 |
"<|video_pad|>"
|
| 228 |
],
|
| 229 |
"bos_token": null,
|
| 230 |
-
"chat_template": "{%- 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 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.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in message.content %}\n {%- set content = message.content.split('</think>')[-1].lstrip('\\n') %}\n {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\\n').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 {{- message.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 %}",
|
| 231 |
"clean_up_tokenization_spaces": false,
|
| 232 |
"eos_token": "<|im_end|>",
|
| 233 |
"errors": "replace",
|
| 234 |
-
"
|
| 235 |
-
"
|
|
|
|
|
|
|
| 236 |
"split_special_tokens": false,
|
| 237 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 238 |
-
"unk_token": null
|
| 239 |
-
}
|
|
|
|
|
|
| 227 |
"<|video_pad|>"
|
| 228 |
],
|
| 229 |
"bos_token": null,
|
|
|
|
| 230 |
"clean_up_tokenization_spaces": false,
|
| 231 |
"eos_token": "<|im_end|>",
|
| 232 |
"errors": "replace",
|
| 233 |
+
"extra_special_tokens": {},
|
| 234 |
+
"model_max_length": 40960,
|
| 235 |
+
"pad_token": "<|vision_pad|>",
|
| 236 |
+
"padding_side": "left",
|
| 237 |
"split_special_tokens": false,
|
| 238 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 239 |
+
"unk_token": null,
|
| 240 |
+
"chat_template": "{%- 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 forward_message in messages %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- set message = messages[index] %}\n {%- set tool_start = '<tool_response>' %}\n {%- set tool_start_length = tool_start|length %}\n {%- set start_of_message = message.content[:tool_start_length] %}\n {%- set tool_end = '</tool_response>' %}\n {%- set tool_end_length = tool_end|length %}\n {%- set start_pos = (message.content|length) - tool_end_length %}\n {%- if start_pos < 0 %}\n {%- set start_pos = 0 %}\n {%- endif %}\n {%- set end_of_message = message.content[start_pos:] %}\n {%- if ns.multi_step_tool and message.role == \"user\" and not(start_of_message == tool_start and end_of_message == tool_end) %}\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.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in message.content %}\n {%- set content = (message.content.split('</think>')|last).lstrip('\\n') %}\n {%- set reasoning_content = (message.content.split('</think>')|first).rstrip('\\n') %}\n {%- set reasoning_content = (reasoning_content.split('<think>')|last).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 {{- message.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 %}"
|
| 241 |
+
}
|