Qwen3.5-9B-Opus4.6-Distilled

A reasoning-optimized language model built on Qwen3.5-9B, fine-tuned using Chain-of-Thought (CoT) distillation from Claude 4.6 Opus reasoning traces. The model produces structured, efficient reasoning within <think> tags before delivering final answers.

Model Summary

Attribute Detail
Architecture Qwen3.5 Dense Transformer (9B parameters)
Base Model Qwen/Qwen3.5-9B
Training Method Supervised Fine-Tuning (SFT) with LoRA
Distillation Source Claude 4.6 Opus reasoning trajectories
Training Masking Response-only, masked on <|im_start|>assistant\n<think>
Modality Text only
Context Length 262,144 tokens (inherited from Qwen3.5)
License Apache 2.0
Developer glyphsoftware

Training Details

Methodology

Base Model (Qwen3.5-9B)
        │
        ▼
Supervised Fine-Tuning (SFT) + LoRA
(Response-Only Training, masked on "<|im_start|>assistant\n<think>")
        │
        ▼
Final Model (qwen3.5-9b-opus4.6-distilled)

The fine-tuning pipeline uses LoRA (Low-Rank Adaptation) with response-only training. The training signal is masked so that only the model's reasoning and answer tokens (starting from the <think> block) receive gradient updates. Input/prompt tokens are excluded from loss computation.

Distillation Approach

The core training data consists of structured reasoning traces distilled from Claude 4.6 Opus interactions. Through deep distillation and structural imitation of Opus-style reasoning chains, the model learns to adopt a more efficient thinking pattern:

  • Decompose complex prompts into clearly defined sub-tasks
  • Plan step-by-step solution strategies within <think> blocks
  • Self-correct logical errors before producing a final response
  • Avoid verbose over-analysis on simple queries

This specifically targets Qwen3.5's tendency toward excessive transitional or repetitive reasoning loops on straightforward problems, resulting in improved inference efficiency without sacrificing analytical depth.

Training Data

The training corpus includes Claude 4.6 Opus-style reasoning samples spanning domains such as:

  • General instruction-following
  • Mathematics and formal reasoning
  • Science and technical analysis
  • Code generation and debugging
  • Multi-step planning and problem decomposition

Intended Use

Primary Use Cases

  • Agentic workflows: Strong structured reasoning makes the model well-suited for tool-using agents (e.g., Claude Code, OpenCode, Cline, Aider).
  • Complex reasoning tasks: Multi-step math, logic puzzles, code debugging, research analysis.
  • Instruction following: Tasks requiring careful decomposition and planning before execution.
  • Local inference: 9B dense parameters allow deployment on consumer GPUs (single GPU with quantization).

Out of Scope

  • Safety-critical or high-stakes decision-making without human oversight
  • Tasks requiring real-time or up-to-date world knowledge
  • Vision/multimodal tasks (this is a text-only fine-tune)

How to Use

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "glyphsoftware/qwen3.5-9b-opus4.6-distilled"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
)

messages = [
    {"role": "user", "content": "Explain the trade-offs between microservices and monolithic architecture."}
]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)

output = model.generate(**inputs, max_new_tokens=4096, temperature=0.6, top_p=0.95, top_k=20)
response = tokenizer.decode(output[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True)
print(response)

vLLM

vllm serve glyphsoftware/qwen3.5-9b-opus4.6-distilled \
  --port 8000 \
  --tensor-parallel-size 1 \
  --max-model-len 131072 \
  --reasoning-parser qwen3

SGLang

python -m sglang.launch_server \
  --model-path glyphsoftware/qwen3.5-9b-opus4.6-distilled \
  --port 8000 \
  --mem-fraction-static 0.8 \
  --reasoning-parser qwen3

llama.cpp / Ollama (GGUF)

If a GGUF quantization is available:

ollama run glyphsoftware/qwen3.5-9b-opus4.6-distilled

Chat Template

The model uses the standard Qwen3.5 ChatML format with thinking enabled by default:

<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
{user_message}<|im_end|>
<|im_start|>assistant
<think>
{internal_reasoning}
</think>

{final_response}<|im_end|>

Disabling Thinking Mode

To get direct responses without the <think> block, append /no_think to the user message or configure your inference framework accordingly.

Stripping Thinking from Output

import re

def strip_thinking(text: str) -> str:
    """Remove <think> blocks, returning only the final answer."""
    return re.sub(r'<think>.*?</think>\s*', '', text, flags=re.DOTALL).strip()

Recommended Inference Parameters

Parameter Recommended Value
temperature 0.6
top_p 0.95
top_k 20
repeat_penalty 1.05
max_new_tokens 4096–8192

For more creative outputs, raise temperature to 0.8 and top_k to 40. If the model loops inside <think> tags, lower temperature to 0.4–0.5 and increase repeat_penalty to 1.08.

Limitations

  • Text only: Vision capabilities from the base Qwen3.5 are not preserved in this fine-tune.
  • Thinking loops: Under high temperature or adversarial prompts, the model may enter repetitive reasoning patterns inside <think> blocks. Mitigate with lower temperature and higher repeat penalty.
  • Knowledge cutoff: Inherits the base model's training data cutoff; no retrieval augmentation is built in.
  • Distillation artifacts: Reasoning style may occasionally echo Opus-specific phrasing patterns that don't generalize to all domains.
  • Not safety-tuned beyond base: This fine-tune targets reasoning quality, not alignment or safety. The base Qwen3.5 safety training is inherited but not reinforced.

Ethical Considerations

This model was created by distilling reasoning patterns from a proprietary model (Claude 4.6 Opus). Users should be aware of the following:

  • The distilled reasoning patterns are derivative of Anthropic's Claude model outputs. Consult Anthropic's usage policies regarding downstream use of model outputs for training.
  • The model has not undergone independent red-teaming or safety evaluation beyond what the base Qwen3.5 model provides.
  • Users deploying this model in production should implement their own safety guardrails appropriate to their use case.

Citation

@misc{glyphsoftware_qwen35_opus_distilled,
  title   = {Qwen3.5-9B-Opus4.6-Distilled},
  author  = {glyphsoftware},
  year    = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/glyphsoftware/qwen3.5-9b-opus4.6-distilled}}
}

Acknowledgments

  • Qwen Team for the Qwen3.5-9B base model
  • Anthropic for the Claude 4.6 Opus model used as the distillation source
  • Unsloth for efficient fine-tuning tooling
  • The open-source community for GGUF quantization and serving infrastructure
Downloads last month
542
GGUF
Model size
9B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for glyphsoftware/qwen3.5-9b-opus4.6-distilled

Finetuned
Qwen/Qwen3.5-9B
Adapter
(122)
this model