Views
No views yet

visual, image_newline, patch_embed, and related keys
stripped from safetensors shardsconfig.json updated: architectures → Qwen3_5ForCausalLM, vision_config removedtokenizer_config.json and chat_template.jinja: image/video branches stripped from
the Jinja2 chat template — prevents tokenizer errors when no image is providedpreprocessor_config.json, processor_config.json,
video_preprocessor_config.json)
| Model | Type | Base model |
|---|---|---|
| Qwen/Qwen3.5-4B | f16 · VLM · source | — |
| techwithsergiu/Qwen3.5-4B-bnb-4bit | BNB NF4 · VLM | Qwen/Qwen3.5-4B |
| techwithsergiu/Qwen3.5-text-4B | bf16 · text-only | Qwen/Qwen3.5-4B |
| techwithsergiu/Qwen3.5-text-4B-bnb-4bit | BNB NF4 · text-only | Qwen3.5-text-4B |
| techwithsergiu/Qwen3.5-text-4B-GGUF | GGUF quants | Qwen3.5-text-4B |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_name = "techwithsergiu/Qwen3.5-text-4B"
5
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7model = AutoModelForCausalLM.from_pretrained(
8 model_name,
9 dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13messages = [{"role": "user", "content": "What is the capital of Romania?"}]
14
15# Thinking OFF — direct answer
16text = tokenizer.apply_chat_template(
17 messages,
18 tokenize=False,
19 add_generation_prompt=True,
20 enable_thinking=False,
21)
22inputs = tokenizer(text, return_tensors="pt").to(model.device)
23outputs = model.generate(**inputs, max_new_tokens=256)
24response = tokenizer.decode(
25 outputs[0][inputs["input_ids"].shape[1]:],
26 skip_special_tokens=True,
27)
28print(response)
29
30# Thinking ON — chain-of-thought before the answer
31text = tokenizer.apply_chat_template(
32 messages,
33 tokenize=False,
34 add_generation_prompt=True,
35 enable_thinking=True,
36)
37inputs = tokenizer(text, return_tensors="pt").to(model.device)
38outputs = model.generate(**inputs, max_new_tokens=1024)
39response = tokenizer.decode(
40 outputs[0][inputs["input_ids"].shape[1]:],
41 skip_special_tokens=True,
42)
43print(response)
1@misc{qwen3.5,
2 title = {{Qwen3.5}: Towards Native Multimodal Agents},
3 author = {{Qwen Team}},
4 month = {February},
5 year = {2026},
6 url = {https://qwen.ai/blog?id=qwen3.5}
7}