TIR-Qwen3.5-4B-Thinking
This is a full-parameter supervised fine-tune of Qwen/Qwen3.5-4B for multimodal tool-integrated reasoning. It was trained in thinking mode with a strict 32,768-token training length.
The checkpoint is in standard Hugging Face Transformers format and can be served with recent vLLM or Transformers releases that support Qwen3.5.
TIR-Bench results
Evaluation used the full 1,215-example, 13-task TIR-Bench suite in agent mode with a Python sandbox, no task-specific prompts, rule-based scoring, a 32,768-token context window, and up to 12,768 generated tokens. Thinking was enabled. Missing/error outputs remain in the denominator.
| Task | Correct | Total | Accuracy | Errors |
|---|---|---|---|---|
| color | 39 | 100 | 39.00% | 0 |
| contrast | 14 | 50 | 28.00% | 0 |
| instrument | 16 | 80 | 20.00% | 1 |
| jigsaw | 0 | 120 | 0.00% | 0 |
| math | 31 | 120 | 25.83% | 1 |
| maze | 65 | 120 | 54.17% | 0 |
| ocr | 21 | 60 | 35.00% | 0 |
| refcoco | 29 | 120 | 24.17% | 0 |
| rotation_game | 51 | 75 | 68.00% | 0 |
| spot_difference | 4 | 100 | 4.00% | 0 |
| symbolic | 22 | 50 | 44.00% | 0 |
| visual_search | 63 | 120 | 52.50% | 0 |
| word_search | 21 | 100 | 21.00% | 0 |
| Overall | 376 | 1,215 | 30.95% | 2 |
Machine-readable aggregate files and per-task reports are under results/.
Training data
The 28,735-row thinking mixture contains:
| Component | Rows | Notes |
|---|---|---|
| AgenticData original tasks | 6,007 | maze 2,000; symbolic 2,007; word search 2,000 |
| CodeDance SFT | 13,828 | multimodal tool-use examples |
| Cotrain attachment | 2,200 | jigsaw 1,200; spot difference 1,000 |
| TIR synthetic attachment | 6,700 | all 13 benchmark task families |
The final file contains 10,907 assistant messages with <think> blocks, no duplicate rows, and no image-placeholder mismatches. Its SHA-256 is 2efe0976228458d6188c54001b8a3f0d01b468def4824b4d7820c5ffa16f5253. See TRAINING_DATA.md for provenance and reconstruction caveats.
Inference
Install a recent vLLM build with Qwen3.5 support, then serve the private repository with your Hugging Face token available in HF_TOKEN:
vllm serve HEART77/TIR-Qwen3.5-4B-Thinking \
--port 8000 \
--max-model-len 32768 \
--reasoning-parser qwen3
In another shell:
pip install openai
python inference.py --image /path/to/image.png --prompt "Describe the image and solve the problem."
inference.py also accepts text-only prompts when --image is omitted. Thinking mode is enabled by default for this repository.
Training configuration
- Full-parameter SFT with ms-swift/Megatron
- Base model:
Qwen/Qwen3.5-4B - Maximum training length: 32,768
- Epochs: 1
- Global batch size: 64
- Micro batch size: 1
- Tensor parallel size: 2
- Pipeline parallel size: 1
- Vision tower and aligner frozen; language model trainable
- Final optimizer step/checkpoint: 448
- Weight dtype: bfloat16
The exported args.json records the complete training arguments.
Limitations
This model is specialized for the training mixture and has not been comprehensively evaluated for general-purpose safety, factuality, multilingual quality, or out-of-domain robustness. Tool execution must be sandboxed; never execute model-generated code directly in a trusted environment.