Instructions to use occ-ai/Qwen3.5-0.8B-Unloop with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use occ-ai/Qwen3.5-0.8B-Unloop with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="occ-ai/Qwen3.5-0.8B-Unloop") 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("occ-ai/Qwen3.5-0.8B-Unloop") model = AutoModelForMultimodalLM.from_pretrained("occ-ai/Qwen3.5-0.8B-Unloop", 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 occ-ai/Qwen3.5-0.8B-Unloop with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "occ-ai/Qwen3.5-0.8B-Unloop" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "occ-ai/Qwen3.5-0.8B-Unloop", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/occ-ai/Qwen3.5-0.8B-Unloop
- SGLang
How to use occ-ai/Qwen3.5-0.8B-Unloop 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 "occ-ai/Qwen3.5-0.8B-Unloop" \ --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": "occ-ai/Qwen3.5-0.8B-Unloop", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "occ-ai/Qwen3.5-0.8B-Unloop" \ --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": "occ-ai/Qwen3.5-0.8B-Unloop", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use occ-ai/Qwen3.5-0.8B-Unloop with Docker Model Runner:
docker model run hf.co/occ-ai/Qwen3.5-0.8B-Unloop
Qwen3.5-0.8B-Unloop
Qwen3.5-0.8B-Unloop is OCC AI's fine-tune of Qwen3.5-0.8B, trained to remove loops and inefficient reasoning. On real prompts selected to elicit looping, it cuts looping responses by 87.8% and responses that hit the token limit by 73.5%. Across seven benchmarks it uses 49.5% fewer output tokens on average while raising the mean score from 19.5 to 24.7. It works without a presence penalty and is less sensitive to sampling parameters than the base model.
Training approach
Loops and inefficient reasoning waste tokens. To detect loops, we developed LoopScore, a metric that counts repeated phrases and marks where the loop begins. We cut the response there and train with Direct Preference Optimization (DPO) to prefer a continuation that moves on to the answer.
Unloop family
The Qwen3.5-Unloop collection includes 0.8B, 2B, 4B, and 9B models fine-tuned from the original Qwen3.5 checkpoints, each with a GGUF version:
- Qwen3.5-0.8B-Unloop · GGUF
- Qwen3.5-2B-Unloop · GGUF
- Qwen3.5-4B-Unloop · GGUF
- Qwen3.5-9B-Unloop · GGUF
Evaluation scope
All results below compare Qwen3.5-0.8B with Qwen3.5-0.8B-Unloop, both in BF16 with thinking on. Each model uses its own recommended sampling settings: the original Qwen settings for the base model and ours for Unloop.
Loop reduction
We run both models on the same 6,000 prompts from Antidoom-mix, LiquidAI's collection of real prompts from public datasets, picked because models often loop on them. Each response may use up to 8,192 tokens. We count loops with LoopScore. For comparison, we also report LiquidAI's detector from Antidoom (find_inner_repetition). LoopScore covers more loops (25.12% vs 2.35% of base-model responses) because it also counts phrases that recur with other text in between, not only back-to-back repeats.
Benchmarks
* BFCL MT: the multi-turn category of the BFCL benchmark, with 800 tasks in four subsets of 200 (base, missing function, missing parameter and long context).
How to reproduce
Serving: BF16 · vLLM 0.19.0 · thinking on · output cap 32,768 tokens (AIME 2026: 81,920). For BFCL and τ²-bench, the whole dialogue must fit in a 131,072-token context.
Sampling, Qwen3.5-0.8B: temperature 1.0 · top_p 0.95 · top_k 20 · min_p 0 · presence_penalty 1.5 · repetition_penalty 1.
Sampling, Qwen3.5-0.8B-Unloop: temperature 0.6 · top_p 0.95 · top_k 20 · min_p 0 · presence_penalty 0 · repetition_penalty 1.
Scores: percentages, averaged over five seeds; MMLU-Pro is a single run over all 12,032 questions.
Tokens: output tokens, including reasoning. A response that hits the cap is counted at the cap. For agentic benchmarks we sum all model calls in a rollout and leave out simulated-user tokens; medians are taken over the rollouts of all five runs.
τ²-bench: if the model ends its turn with no output, we count the rollout as a failure and leave it out of the token counts. This happens in 81.9% of rollouts for Qwen3.5-0.8B and 73.9% for Qwen3.5-0.8B-Unloop.
Stability across sampling parameters
Unloop's scores change less with sampling temperature than the base model's, even without a presence penalty. Across temperatures 0 to 1, this holds on GPQA Diamond, IFBench and MATH-500. On AIME 2026 both models score zero.
One seed per temperature; each panel has its own score axis.
Both models: top_p 0.95 · top_k 20 · no repetition penalty. Presence penalty: 1.5 for Qwen3.5-0.8B, 0 for Qwen3.5-0.8B-Unloop.
How to use
Recommended settings
Use temperature=0.6, top_p=0.95, top_k=20 and presence_penalty=0. Unlike the base model, Unloop does not need a presence or repetition penalty to avoid loops. Use an output budget of 32,768 tokens (81,920 for competition-level math and code).
This is a full Qwen3.5 checkpoint (language model, vision encoder and MTP head) and runs anywhere Qwen3.5-0.8B runs.
GGUF
The GGUF version (BF16 to Q4_0, plus the vision projector) works with llama.cpp, Ollama, LM Studio and other GGUF runtimes:
llama-server -hf occ-ai/Qwen3.5-0.8B-Unloop-GGUF:Q4_K_M --jinja --temp 0.6 --top-p 0.95 --top-k 20 --presence-penalty 0
Transformers
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "occ-ai/Qwen3.5-0.8B-Unloop"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
vLLM
vllm serve occ-ai/Qwen3.5-0.8B-Unloop \
--max-model-len 262144 \
--reasoning-parser qwen3 \
--enable-auto-tool-choice \
--tool-call-parser qwen3_coder \
--port 8000
Add --language-model-only to skip the vision encoder and free memory for the KV cache.
See the Qwen3.5-0.8B deployment instructions for installation and other backends.
Optional MTP decoding
The weights include the MTP head of Qwen3.5-0.8B, unchanged. To enable self-speculative decoding in vLLM, append:
--speculative-config '{"method": "qwen3_next_mtp", "num_speculative_tokens": 2}'
The head was trained with the base model, so it may accept fewer draft tokens with Unloop. The outputs are the same either way.
License
Qwen3.5-0.8B-Unloop is released under the Apache 2.0 License, the same license as the base model, Qwen3.5-0.8B.
Only the language model is fine-tuned, with DPO through a LoRA adapter merged into the weights; the vision components are inherited from Qwen3.5-0.8B unchanged.
Citation
@misc{qwen35-0.8b-unloop,
title = {Qwen3.5-0.8B-Unloop},
author = {OCC AI},
year = {2026},
url = {https://huggingface.co/occ-ai/Qwen3.5-0.8B-Unloop}
}
Acknowledgements
Thanks to the Qwen team for Qwen3.5, and to LiquidAI for the Antidoom work and Antidoom-mix prompt dataset.
- Downloads last month
- 20
