Qwen3.5: Difference between revisions
No edit summary |
No edit summary |
||
| Line 41: | Line 41: | ||
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-0.8B") | tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-0.8B") | ||
messages = [{"role": "user", "content": "Hi"}] | |||
tokenizer.apply_chat_template(messages, enable_thinking=False, tokenize=False, add_generation_prompt=True) | tokenizer.apply_chat_template(messages, enable_thinking=False, tokenize=False, add_generation_prompt=True) | ||
# -> '<|im_start|>user\nHi<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n' | |||
tokenizer.apply_chat_template(messages, enable_thinking=True, tokenize=False, add_generation_prompt=True) | |||
# -> '<|im_start|>user\nHi<|im_end|>\n<|im_start|>assistant\n<think>\n' | |||
tokenizer.apply_chat_template(messages, enable_thinking=True, tokenize=True, add_generation_prompt=True) | |||
# -> {'input_ids': [248045, 846, 198, 12675, 248046, 198, 248045, 74455, 198, 248068, 198], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== References == | == References == | ||
<references /> | <references /> | ||
Revision as of 12:57, 7 April 2026
| Qwen 3.5 | |
|---|---|
| Developer | Alibaba Cloud |
| Release Date | February 15, 2026 |
| Model Sizes | 0.8B, 2B, 4B, 9B, 27B (dense), 35B-A3B (MoE), 122B-A10B (MoE), 397B-A17B (MoE) |
| Architecture | Decoder-only Transformer |
| Modality | Image-Text-to-Text |
| Thinking | Yes (toggleable) |
| Context Length | 262,144 (up to 1M via API) |
| License | Apache 2.0 |
| Languages | 201 languages and dialects |
| Hugging Face | Qwen 3.5 |
| Paper | Link |
Qwen3.5 is an open-weight and native vision-language foundation model series developed by Alibaba and released on February 15, 2026.[1] It is build on a hybrid architecture using linear attention with Gated Delta Networks as well as sparse Mixture of Experts. The models support 201 languages and dialects, compared to 119 of their earlier Qwen3 model series.
Benchmarks
Results for the flagship 397B-A17B and 9b, 4B as well as 2B small models.
| Benchmark | Category | 397B-A17B | 9B | 4B | 2B | Claude Opus 4.6 |
|---|---|---|---|---|---|---|
| GPQA Diamond[2] | Science | 89.3 | 80.6 | 77.1 | -- | 89.6 |
| SWE-bench Verified | Coding | 76.4 | -- | -- | -- | 80.8 |
| MMMU-Pro | Multimodal | 79.0 | 70.1 | 66.3 | 50.3 | 73.9 |
| MMMLU | Multilingual | 88.5 | 81.2 | 76.1 | 63.1 | 91.1 |
Tokenizer
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-0.8B")
messages = [{"role": "user", "content": "Hi"}]
tokenizer.apply_chat_template(messages, enable_thinking=False, tokenize=False, add_generation_prompt=True)
# -> '<|im_start|>user\nHi<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n'
tokenizer.apply_chat_template(messages, enable_thinking=True, tokenize=False, add_generation_prompt=True)
# -> '<|im_start|>user\nHi<|im_end|>\n<|im_start|>assistant\n<think>\n'
tokenizer.apply_chat_template(messages, enable_thinking=True, tokenize=True, add_generation_prompt=True)
# -> {'input_ids': [248045, 846, 198, 12675, 248046, 198, 248045, 74455, 198, 248068, 198], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
References
- ↑ Qwen3.5: Towards Native Multimodal Agents. Qwen Team, February 2026.
- ↑ GPQA Diamond Benchmark Leaderboard: Results. Artificial Analysis, April 2026.