alexm commited on
Commit
bf0b272
·
0 Parent(s):

Add T-Search model

Browse files
.gitattributes ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ assets/t-search-benchmarks.png filter=lfs diff=lfs merge=lfs -text
37
+ assets/t-search-latency-quality.png filter=lfs diff=lfs merge=lfs -text
38
+ assets/t-search-rl-training.png filter=lfs diff=lfs merge=lfs -text
39
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - ru
6
+ pipeline_tag: text-generation
7
+ library_name: transformers
8
+ tags:
9
+ - 35b-a3b
10
+ - mixture-of-experts
11
+ - moe
12
+ - agent
13
+ - search-agent
14
+ - agentic-search
15
+ - search
16
+ - information-retrieval
17
+ - retrieval
18
+ - tool-use
19
+ - function-calling
20
+ - rag
21
+ base_model:
22
+ - Qwen/Qwen3.6-35B-A3B
23
+ ---
24
+
25
+ # T-Search
26
+
27
+ **🚨 T-Search is designed for use with the [official T-Search harness](https://github.com/turbo-llm/t-search-harness). However, we did not observe noticeable differences relative to the Qwen3.6-35B-A3B base model on general-purpose benchmarks.**
28
+
29
+ **🚨 Users are advised to exercise caution and are responsible for any additional training and oversight required to ensure the model's responses meet acceptable ethical and safety standards. The responsibility for incorporating this model into industrial or commercial solutions lies entirely with those who choose to deploy it.**
30
+
31
+ ## **Highlights**
32
+
33
+ We introduce **T-Search**, an agentic retriever built for difficult multi-step search in English and Russian. It plans and executes searches across multiple rounds with a configurable search budget.
34
+
35
+ - **Agentic retrieval:** issues queries, inspects results, tracks coverage, carries compact evidence and search state across rounds, and returns a ranked chunk set.
36
+ - **Retrieval quality:** outperforms the base model and larger open models on average across the evaluated retrieval benchmarks.
37
+ - **Retriever robustness:** trained and evaluated with multiple retrievers, maintaining strong retrieval quality across configurations.
38
+
39
+ ![T-Search benchmark recall](https://huggingface.co/t-tech/T-Search/raw/main/assets/t-search-benchmarks.svg)
40
+
41
+ ## Description
42
+
43
+ T-Search is an agent retriever for difficult multi-step search. It is built on **Qwen3.6-35B-A3B** and trained on fully synthetic search tasks generated for the same harness used at inference time.
44
+
45
+ The model is responsible for collecting evidence. Given a question and access to a corpus search backend, it formulates queries, reads retrieved snippets, decides which chunks are worth preserving, and returns a ranked evidence set. A downstream generator, reranker, or full-text fetcher can then consume that ranking.
46
+
47
+ ## ⛷️ T-Search Harness
48
+
49
+ The [official T-Search harness](https://github.com/turbo-llm/t-search-harness) implements the inference protocol used for training and evaluation. The retriever operates in rounds. Within each round, it follows a ReAct loop with an approximately 32K-token context budget and three tools:
50
+
51
+ - `search_corpus` searches the corpus and returns document chunks;
52
+ - `save_and_advance` preserves important chunks and starts a new round;
53
+ - `finalize_ranking` ends the search and returns a ranked evidence set.
54
+
55
+ The agent sees the original question, previously saved chunks, and the current coverage state: which parts of the question are supported by evidence and which remain open. It chooses search queries, inspects retrieved chunks, and decides whether to continue searching, preserve state for another round, or finalize.
56
+
57
+ At 75% context utilization, `search_corpus` is locked. The agent must either call `finalize_ranking` or use `save_and_advance` to build compact memory for the next round: preserved chunks with reasons, covered and open parts of the question, previous attempts, and a useful next step. Full tool history and intermediate noise do not cross the round boundary.
58
+
59
+ ## 🧠 Training
60
+
61
+ T-Search is built on **Qwen3.6-35B-A3B** and trained in two stages: supervised fine-tuning on fully synthetic search trajectories, followed by reinforcement learning with GSPO and recall-based rewards. At each stage, separate English and Russian experts are trained on language-specific data and then merged into a single checkpoint.
62
+
63
+ ### Synthetic task factory
64
+
65
+ Training tasks contain a question, a fixed index, annotated evidence chunks, and a full tool-use trajectory. Candidate tasks pass adversarial checks for trivial query leakage, answerability from model weights, single-document shortcuts, missing evidence, and weak distractors.
66
+
67
+ ### Supervised fine-tuning
68
+
69
+ Long teacher trajectories are split into self-contained rounds. Invalid tool actions are masked from the loss, while useful recovery behavior after a tool error is retained. Productive rounds are selected by evidence gain rather than by final recall alone, preserving useful behavior from difficult tasks.
70
+
71
+ Training uses **11K SFT examples from 8K unique questions per language**; one quarter targets robustness to different retrievers. An additional non-overlapping pool of **2K questions per language** is reserved for RL.
72
+
73
+ ### Reinforcement learning
74
+
75
+ The policy is optimized with GSPO. RL optimizes the complete search policy on full tool-use trajectories. The main reward is recall over gold `chunk_id` values; precision and F-score are tracked for diagnostics but are not used as the primary training signal. This discourages the agent from finalizing early with a small high-precision but incomplete evidence set.
76
+
77
+ **A detailed Russian-language training report will be available soon on Habr.**
78
+
79
+ ## 📊 Benchmarks
80
+
81
+ All results in this section were produced with the released T-Search harness and fixed benchmark indices.
82
+
83
+ ### Evaluation datasets
84
+
85
+ The accompanying evaluation datasets are released as [**TRuST**](https://huggingface.co/datasets/t-tech/TRuST) and [**SynthComp**](https://huggingface.co/datasets/t-tech/SynthComp).
86
+
87
+ | Benchmark | Description |
88
+ |---|---|
89
+ | **TRuST** | 324 manually authored Russian multi-step search questions with fixed indices and annotated evidence. |
90
+ | **SynthComp-En / SynthComp-Ru** | English and Russian synthetic fixed-index benchmarks with 395 questions each, separated from the SFT and RL data by question and evidence overlap checks. |
91
+ | **ru-BrowseComp-Plus** | Adapted Russian-language version of BrowseComp-Plus. |
92
+ | **ru-SealQA** | Adapted Russian-language version of SealQA. |
93
+
94
+ We use **Recall@10** as the primary metric.
95
+
96
+ We report single-rollout results for all models and, for T-Search, an additional N=3 configuration that runs three independent rollouts in parallel and combines their rankings using reciprocal rank fusion (RRF).
97
+
98
+ | Model | BrowseComp-Plus | ru-BrowseComp-Plus | SealQA | ru-SealQA | SynthComp-En | SynthComp-Ru | TRuST | Avg |
99
+ |---|---:|---:|---:|---:|---:|---:|---:|---:|
100
+ | **T-Search (N=3)** | **72.65** | **62.93** | **66.08** | **61.98** | **58.52** | **58.00** | **49.12** | **61.33** |
101
+ | **T-Search (N=1)** | 65.35 | 55.95 | 61.16 | 57.72 | 54.52 | 53.13 | 43.92 | 55.96 |
102
+ | GLM-5.1 | 64.32 | 58.18 | 55.49 | 53.21 | 51.69 | 51.71 | 43.11 | 53.96 |
103
+ | GLM-5.2 | 63.01 | 52.54 | 55.30 | 54.69 | 52.29 | 49.37 | 37.07 | 52.04 |
104
+ | Kimi-K2.6 | 60.71 | 49.76 | 56.86 | 52.46 | 48.25 | 47.06 | 42.39 | 51.07 |
105
+ | DeepSeek-V4-Flash | 53.27 | 46.30 | 55.70 | 51.12 | 44.83 | 45.68 | 40.40 | 48.19 |
106
+ | Qwen3.6-27B | 56.69 | 46.81 | 54.01 | 48.95 | 46.82 | 46.99 | 38.12 | 48.34 |
107
+ | Qwen3.6-35B-A3B (baseline) | 43.66 | 38.58 | 46.07 | 43.26 | 41.82 | 43.88 | 33.53 | 41.54 |
108
+ | gemma-4-26B-A4B-it | 35.32 | 27.51 | 45.13 | 39.05 | 36.24 | 34.77 | 21.75 | 34.25 |
109
+ | Qwen3.5-397B-A17B | 53.48 | 44.06 | 51.68 | 48.33 | 47.38 | 46.91 | 38.57 | 47.20 |
110
+ | Qwen3.5-122B-A10B | 47.81 | 40.15 | 51.57 | 44.74 | 42.11 | 42.25 | 30.55 | 42.74 |
111
+
112
+ We also study the latency–quality trade-off by varying the maximum number of search rounds and the number of parallel agent runs. This separates the effect of deeper sequential search from broader parallel exploration.
113
+
114
+ ![Latency-quality trajectories](https://huggingface.co/t-tech/T-Search/raw/main/assets/t-search-latency-quality.svg)
115
+
116
+ To evaluate retrieval robustness, we varied the search backend while keeping the model and agent configuration fixed.
117
+
118
+ | Retriever | BrowseComp-Plus | ru-BrowseComp-Plus | SealQA | ru-SealQA | SynthComp-En | SynthComp-Ru | TRuST | Avg |
119
+ |---|---:|---:|---:|---:|---:|---:|---:|---:|
120
+ | Qwen3-Embedding-8B | 65.35 | 55.95 | 61.16 | 57.72 | 54.52 | 53.13 | 43.92 | 55.96 |
121
+ | **Qwen3-Embedding-8B + LLM reranking** | **75.04** | **66.24** | **64.82** | **59.95** | 62.71 | 62.39 | 48.93 | **62.87** |
122
+ | Qwen3-Embedding-0.6B | 51.70 | 43.71 | 56.80 | 49.53 | 54.72 | 52.27 | 36.95 | 49.38 |
123
+ | jina-embeddings-v5-text-small-retrieval | 60.52 | 51.41 | 62.46 | 55.60 | 56.37 | 54.56 | 39.31 | 54.32 |
124
+ | BM25 | 39.49 | 31.97 | 55.33 | 50.00 | **66.87** | **65.15** | **49.18** | 51.14 |
125
+
126
+ ## 👨‍💻 Usage
127
+
128
+ ### Recommended generation parameters
129
+
130
+ ```yaml
131
+ do_sample: true
132
+ temperature: 0.7
133
+ top_p: 1.0
134
+ ```
135
+
136
+ Serve `t-tech/T-Search` through an OpenAI-compatible endpoint. See the [harness README](https://github.com/turbo-llm/t-search-harness) for installation and search-backend integration.
137
+
138
+ ### Reference SGLang serving setup
139
+
140
+ The following SGLang configuration can be used as a reference:
141
+
142
+ ```bash
143
+ export SGLANG_ENABLE_SPEC_V2=1
144
+
145
+ python3 -m sglang.launch_server \
146
+ --model-path "/path/to/model" \
147
+ --served-model-name "t-tech/T-Search" \
148
+ --tp 2 \
149
+ --trust-remote-code \
150
+ --host 0.0.0.0 \
151
+ --port 8000 \
152
+ --reasoning-parser qwen3 \
153
+ --tool-call-parser qwen3_coder \
154
+ --speculative-algorithm NEXTN \
155
+ --speculative-num-steps 3 \
156
+ --speculative-eagle-topk 1 \
157
+ --speculative-num-draft-tokens 4 \
158
+ --mem-fraction-static 0.90 \
159
+ --context-length 65536 \
160
+ --chunked-prefill-size 16384 \
161
+ --max-prefill-tokens 32768
162
+ ```
163
+
164
+ ### Example
165
+
166
+ ```python
167
+ from retriever_agent import (
168
+ AgentConfig,
169
+ HttpSearchClient,
170
+ OpenAILLMClient,
171
+ RetrieverAgent,
172
+ )
173
+
174
+ config = AgentConfig(model="t-tech/T-Search")
175
+ llm = OpenAILLMClient(["http://<sglang-host>:8000/v1"], config)
176
+ search = HttpSearchClient("http://<search-host>:8000")
177
+
178
+ agent = RetrieverAgent(config, llm, search)
179
+ result = agent.retrieve("your query")
180
+
181
+ for doc in result.documents:
182
+ print(doc.rank, doc.doc_id, doc.score, doc.text)
183
+ ```
assets/t-search-benchmarks.png ADDED

Git LFS Details

  • SHA256: 1f56255a1355e68eb65c07f068cc02254b8985096e5b66fdefc41ab65551f7d9
  • Pointer size: 131 Bytes
  • Size of remote file: 122 kB
assets/t-search-benchmarks.svg ADDED
assets/t-search-latency-quality.png ADDED

Git LFS Details

  • SHA256: 2cb69cbaf600cb09d950d3cbfbec01067787bd69a6fd271b5feb67a03a7b0193
  • Pointer size: 131 Bytes
  • Size of remote file: 180 kB
assets/t-search-latency-quality.svg ADDED
assets/t-search-rl-training.png ADDED

Git LFS Details

  • SHA256: a7dc9f078ecc047ab0f7e2d32cf9edc478cc250173ba7d99437278ddc0b997b4
  • Pointer size: 131 Bytes
  • Size of remote file: 184 kB
assets/t-search-rl-training.svg ADDED
chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- raise_exception('System message must be at the beginning.') }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if loop.index0 > ns.last_query_index %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
154
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5MoeForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 248056,
6
+ "model_type": "qwen3_5_moe",
7
+ "text_config": {
8
+ "attention_bias": false,
9
+ "attention_dropout": 0.0,
10
+ "attn_output_gate": true,
11
+ "bos_token_id": null,
12
+ "dtype": "bfloat16",
13
+ "eos_token_id": 248044,
14
+ "full_attention_interval": 4,
15
+ "head_dim": 256,
16
+ "hidden_act": "silu",
17
+ "hidden_size": 2048,
18
+ "initializer_range": 0.02,
19
+ "layer_types": [
20
+ "linear_attention",
21
+ "linear_attention",
22
+ "linear_attention",
23
+ "full_attention",
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "linear_attention",
27
+ "full_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "linear_attention",
31
+ "full_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "full_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "full_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "linear_attention",
51
+ "full_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "linear_attention",
55
+ "full_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "linear_attention",
59
+ "full_attention"
60
+ ],
61
+ "linear_conv_kernel_dim": 4,
62
+ "linear_key_head_dim": 128,
63
+ "linear_num_key_heads": 16,
64
+ "linear_num_value_heads": 32,
65
+ "linear_value_head_dim": 128,
66
+ "mamba_ssm_dtype": "float32",
67
+ "max_position_embeddings": 262144,
68
+ "mlp_only_layers": [],
69
+ "model_type": "qwen3_5_moe_text",
70
+ "moe_intermediate_size": 512,
71
+ "mtp_num_hidden_layers": 1,
72
+ "mtp_use_dedicated_embeddings": false,
73
+ "num_attention_heads": 16,
74
+ "num_experts": 256,
75
+ "num_experts_per_tok": 8,
76
+ "num_hidden_layers": 40,
77
+ "num_key_value_heads": 2,
78
+ "output_router_logits": false,
79
+ "pad_token_id": null,
80
+ "partial_rotary_factor": 0.25,
81
+ "rms_norm_eps": 1e-06,
82
+ "rope_parameters": {
83
+ "mrope_interleaved": true,
84
+ "mrope_section": [
85
+ 11,
86
+ 11,
87
+ 10
88
+ ],
89
+ "partial_rotary_factor": 0.25,
90
+ "rope_theta": 10000000,
91
+ "rope_type": "default"
92
+ },
93
+ "router_aux_loss_coef": 0.001,
94
+ "shared_expert_intermediate_size": 512,
95
+ "tie_word_embeddings": false,
96
+ "use_cache": true,
97
+ "vocab_size": 248320
98
+ },
99
+ "tie_word_embeddings": false,
100
+ "transformers_version": "5.9.0",
101
+ "video_token_id": 248057,
102
+ "vision_config": {
103
+ "deepstack_visual_indexes": [],
104
+ "depth": 27,
105
+ "dtype": "bfloat16",
106
+ "hidden_act": "gelu_pytorch_tanh",
107
+ "hidden_size": 1152,
108
+ "in_channels": 3,
109
+ "initializer_range": 0.02,
110
+ "intermediate_size": 4304,
111
+ "model_type": "qwen3_5_moe_vision",
112
+ "num_heads": 16,
113
+ "num_position_embeddings": 2304,
114
+ "out_hidden_size": 2048,
115
+ "patch_size": 16,
116
+ "spatial_merge_size": 2,
117
+ "temporal_patch_size": 2
118
+ },
119
+ "vision_end_token_id": 248054,
120
+ "vision_start_token_id": 248053
121
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 248044,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 248046,
6
+ 248044
7
+ ],
8
+ "pad_token_id": 248044,
9
+ "temperature": 0.7,
10
+ "top_p": 1.0,
11
+ "transformers_version": "5.9.0",
12
+ "trust_remote_code": false
13
+ }
model-mtp.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62e6f4b910fd5ff7594e85863fe28cfd0177890c8251655ee9bcbc35a208d78b
3
+ size 1689283688
model.safetensors-00001-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4091e4b53dc0bc53a55745ed0003579f9d8eb460e28768b787289cc0e451b976
3
+ size 5368709848
model.safetensors-00002-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fd4ef00da2ca81bcecbc08b704df95e2e9bde3798774c3783b0f2d8dd5c2930
3
+ size 5368709840
model.safetensors-00003-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8a356dfb0b8e2408e55ac375784f6bdf6fd0fc6279b43adcef2e8ffc3592134
3
+ size 5368709840
model.safetensors-00004-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96c14f7b2a0f8f4cdc7a8b36410e53ca078b6c7eb003ef835a91145995d981e8
3
+ size 5368709840
model.safetensors-00005-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fba3155737a3a916f582e5390a73032991120fa1125c1d6af6b8cbfca303b3fc
3
+ size 5368709848
model.safetensors-00006-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9a0f7daa27bf0708c7a988c566cdb198edb5fb62c522f96fc6bfc17c15582d3
3
+ size 5368709840
model.safetensors-00007-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd55dfa7853edd6470c7486df9479ed18842946ca034b51d8ef717824ce92c4e
3
+ size 5368709840
model.safetensors-00008-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc264260b562fc1f11febe8556a608aca21377d6ef173d0b13cac84a67d169e5
3
+ size 5368709840
model.safetensors-00009-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d71108e70fc14cdb542f5e207e3517e4e7a56649eed0950196241f3dc5dadca
3
+ size 5255463968
model.safetensors-00010-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e77d0f5078cb6119681619ac600199b7da1cc339e12079b8957b925a4b90df42
3
+ size 5368710488
model.safetensors-00011-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9819a66dd1052afa47c7212f30a34dfb5f22b9af9f1c35224f745c4488f8d949
3
+ size 5368710496
model.safetensors-00012-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a51ed8287578bcd5d1a549fbd9f0a9831ab91a0ef31557090721b090d7e9d42
3
+ size 5368710488
model.safetensors-00013-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62a8945ee67d670795adc3b1ee51cebb8279edc3d870cfacc54708caf208eb9a
3
+ size 5300730392
model.safetensors-00014-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7911aa86d68d794c70839c37c369294d56c417444b3ab79b6844fdf86a6844bd
3
+ size 602488168
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "Qwen2VLImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "merge_size": 2,
18
+ "patch_size": 16,
19
+ "resample": 3,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "longest_edge": 16777216,
23
+ "shortest_edge": 65536
24
+ },
25
+ "temporal_patch_size": 2
26
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": true,
13
+ "local_files_only": false,
14
+ "model_max_length": 262144,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null,
29
+ "video_token": "<|video_pad|>",
30
+ "vision_bos_token": "<|vision_start|>",
31
+ "vision_eos_token": "<|vision_end|>",
32
+ "processor_class": "Qwen3VLProcessor"
33
+ }