Instructions to use keypa/Qwen3.5-9B-Claude-Opus-4.7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keypa/Qwen3.5-9B-Claude-Opus-4.7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="keypa/Qwen3.5-9B-Claude-Opus-4.7") 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("keypa/Qwen3.5-9B-Claude-Opus-4.7") model = AutoModelForMultimodalLM.from_pretrained("keypa/Qwen3.5-9B-Claude-Opus-4.7", 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 keypa/Qwen3.5-9B-Claude-Opus-4.7 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keypa/Qwen3.5-9B-Claude-Opus-4.7" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keypa/Qwen3.5-9B-Claude-Opus-4.7", "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/keypa/Qwen3.5-9B-Claude-Opus-4.7
- SGLang
How to use keypa/Qwen3.5-9B-Claude-Opus-4.7 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 "keypa/Qwen3.5-9B-Claude-Opus-4.7" \ --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": "keypa/Qwen3.5-9B-Claude-Opus-4.7", "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 "keypa/Qwen3.5-9B-Claude-Opus-4.7" \ --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": "keypa/Qwen3.5-9B-Claude-Opus-4.7", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use keypa/Qwen3.5-9B-Claude-Opus-4.7 with Docker Model Runner:
docker model run hf.co/keypa/Qwen3.5-9B-Claude-Opus-4.7
Qwen3.5-9B-Claude-Opus-4.7 Reasoning Distill
Model Description
This model is a fine-tuned version of Qwen/Qwen3.5-9B, specifically optimized for enhanced reasoning and step-by-step logical deduction. It was trained using Unsloth via distillation from high-quality reasoning chains produced by Claude Opus 4.7.
The goal of this fine-tune is to bring "large-model" reasoning capabilities to a compact, 9-billion parameter efficiency, allowing for complex problem solving on consumer-grade hardware.
- Developed by: keypa
- Finetuned from model:Qwen/Qwen3.5-9B
- Dataset:lordx64/reasoning-distill-claude-opus-4-7-max
- Language: English
- License: Apache-2.0
Training Details
The model was trained using a LoRA (Low-Rank Adaptation) approach, targeting all linear modules to ensure maximum knowledge retention from the distillation source.
- Epochs: 2
- Total Steps: 1,016
- Batch Size: 16 (Total)
- Learning Rate: 2e-4 (Linear Decay)
- Final Loss: ~1.1074
- Precision: 4-bit QLoRA (Bfloat16 internal)
Training Tooling
This model was trained 2x faster with Unsloth and Huggingface's TRL library.
Usage
The model uses the standard ChatML prompt format. For best results, ask the model to "Think step by step" or provide a logic-heavy prompt.
Prompt Template (ChatML)
<|im_start|>system
You are a helpful assistant with advanced reasoning capabilities.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
<|im_thought|>
How to use
You can load this model using the transformers library or via Unsloth for optimized inference:
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "keypa/Qwen3.5-9B-Claude-Opus-4.7",
max_seq_length = 2048,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
- Downloads last month
- 197