Instructions to use smirki/qwen3.5-4b-terminal-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use smirki/qwen3.5-4b-terminal-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="smirki/qwen3.5-4b-terminal-v1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("smirki/qwen3.5-4b-terminal-v1") model = AutoModelForMultimodalLM.from_pretrained("smirki/qwen3.5-4b-terminal-v1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use smirki/qwen3.5-4b-terminal-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "smirki/qwen3.5-4b-terminal-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "smirki/qwen3.5-4b-terminal-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/smirki/qwen3.5-4b-terminal-v1
- SGLang
How to use smirki/qwen3.5-4b-terminal-v1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "smirki/qwen3.5-4b-terminal-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "smirki/qwen3.5-4b-terminal-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "smirki/qwen3.5-4b-terminal-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "smirki/qwen3.5-4b-terminal-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use smirki/qwen3.5-4b-terminal-v1 with Docker Model Runner:
docker model run hf.co/smirki/qwen3.5-4b-terminal-v1
smirki/qwen3.5-4b-terminal-v1
A Qwen3.5-4B variant for terminal and coding-agent use. Full merged weights in
bf16, same architecture, tokenizer, chat template, and native XML tool-call
format as Qwen/Qwen3.5-4B. Drop-in replacement wherever the base model runs.
Terminal-Bench 2.1
Harbor terminus-2 harness, k=2 attempts per task, 65,536-token context with
8,192 output tokens per turn, thinking on, shipped per-task timeouts, at most
24 concurrent trials per H100. The stock model was run under the identical
setup. 76 of the 89 tasks (the 13 with agent budgets of 60 minutes or more
were not run for either column).
| Qwen3.5-4B | this model | |
|---|---|---|
| mean reward (152 trials) | 0.145 | 0.211 |
| tasks solved at least once | 15 / 76 | 21 / 76 |
| tasks solved both attempts | 7 | 11 |
| trials timed out | 95 | 83 |
| median output tokens per trial | 29.1k | 29.6k |
Per task: 10 improved, 1 regressed, 65 unchanged (sign test p = 0.012).
Running it
vllm serve smirki/qwen3.5-4b-terminal-v1 \
--max-model-len 65536 \
--language-model-only \
--enable-auto-tool-choice --tool-call-parser qwen3_xml \
--reasoning-parser qwen3
--language-model-only drops the unused vision tower. The tool-call parser
name is qwen3_xml (alias qwen3_coder) in vLLM 0.28; the hermes parser
does not understand this model's tool-call format.
Sampling defaults from the Qwen3.5 model card apply unchanged: thinking mode
temperature 1.0 / top_p 0.95 / top_k 20 / presence_penalty 1.5; non-thinking
mode temperature 0.7 / top_p 0.8 / top_k 20. Non-thinking mode is selected by
passing enable_thinking=False to the chat template, exactly as for the base
model.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
r = client.chat.completions.create(
model="smirki/qwen3.5-4b-terminal-v1",
messages=[{"role": "user", "content": "List the largest files under /var/log."}],
tools=[{"type": "function", "function": {
"name": "bash",
"description": "Run a shell command",
"parameters": {"type": "object",
"properties": {"command": {"type": "string"}},
"required": ["command"]}}}],
)
print(r.choices[0].message.tool_calls)
Files
model.safetensors (bf16, 9.1 GB), config.json, generation_config.json,
tokenizer files, and the preprocessor configs inherited from the base model.
License
Apache-2.0, inheriting the license of Qwen/Qwen3.5-4B by the Qwen team,
Alibaba Cloud.
- Downloads last month
- 23