Instructions to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="glyphsoftware/qwen3.5-9b-opus4.6-distilled") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("glyphsoftware/qwen3.5-9b-opus4.6-distilled") model = AutoModelForImageTextToText.from_pretrained("glyphsoftware/qwen3.5-9b-opus4.6-distilled") - llama-cpp-python
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="glyphsoftware/qwen3.5-9b-opus4.6-distilled", filename="Qwen3.5-9B.BF16-mmproj.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16 # Run inference directly in the terminal: llama-cli -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16 # Run inference directly in the terminal: llama-cli -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16 # Run inference directly in the terminal: ./llama-cli -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Use Docker
docker model run hf.co/glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
- LM Studio
- Jan
- vLLM
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "glyphsoftware/qwen3.5-9b-opus4.6-distilled" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "glyphsoftware/qwen3.5-9b-opus4.6-distilled", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
- SGLang
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled 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 "glyphsoftware/qwen3.5-9b-opus4.6-distilled" \ --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": "glyphsoftware/qwen3.5-9b-opus4.6-distilled", "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 "glyphsoftware/qwen3.5-9b-opus4.6-distilled" \ --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": "glyphsoftware/qwen3.5-9b-opus4.6-distilled", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Ollama:
ollama run hf.co/glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
- Unsloth Studio new
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for glyphsoftware/qwen3.5-9b-opus4.6-distilled to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for glyphsoftware/qwen3.5-9b-opus4.6-distilled to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for glyphsoftware/qwen3.5-9b-opus4.6-distilled to start chatting
- Pi new
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Run Hermes
hermes
- Docker Model Runner
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Docker Model Runner:
docker model run hf.co/glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
- Lemonade
How to use glyphsoftware/qwen3.5-9b-opus4.6-distilled with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull glyphsoftware/qwen3.5-9b-opus4.6-distilled:BF16
Run and chat with the model
lemonade run user.qwen3.5-9b-opus4.6-distilled-BF16
List all available models
lemonade list
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
- Downloads last month
- 94
4-bit