Instructions to use armand0e/Qwen3.5-9B-Opus-Agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use armand0e/Qwen3.5-9B-Opus-Agent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="armand0e/Qwen3.5-9B-Opus-Agent") 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("armand0e/Qwen3.5-9B-Opus-Agent") model = AutoModelForMultimodalLM.from_pretrained("armand0e/Qwen3.5-9B-Opus-Agent", 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 armand0e/Qwen3.5-9B-Opus-Agent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "armand0e/Qwen3.5-9B-Opus-Agent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "armand0e/Qwen3.5-9B-Opus-Agent", "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/armand0e/Qwen3.5-9B-Opus-Agent
- SGLang
How to use armand0e/Qwen3.5-9B-Opus-Agent 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 "armand0e/Qwen3.5-9B-Opus-Agent" \ --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": "armand0e/Qwen3.5-9B-Opus-Agent", "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 "armand0e/Qwen3.5-9B-Opus-Agent" \ --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": "armand0e/Qwen3.5-9B-Opus-Agent", "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 armand0e/Qwen3.5-9B-Opus-Agent with Docker Model Runner:
docker model run hf.co/armand0e/Qwen3.5-9B-Opus-Agent
discuss on training
hi bro,
Nice work on the improvements! I’m curious about what made the biggest difference compared to Qwen3.5-9B-Agent.
I checked your old training script and noticed the learning rate looked relatively high before (2e-4). Do you think the performance gain mainly comes from lowering the learning rate and stabilizing training? Or was it more about the new dataset you introduced?
Yea my tests have concluded that the lower LR directly resulted in more stable tool calling behavior.
As for actual performance gains though I'm still experimenting to see what gives the best overall results. Because the 2e-4 run for the agent actually showed major improvements in arc, see here:
arc arc/e boolq
armand0e/Qwen3.5-9B-Opus-Agent 0.589 0.747 0.901
Jackrong/Qwopus3.5-9B-Coder 0.561 0.721 0.89
Qwen3.5-9B 0.571 0.719 0.895
armand0e/Qwen3.5-9B-Agent 0.625 0.813 0.898
Unfortunately the tool call instability isn't viable in production so had to keep pumping out different experiments.
There are a bunch of variables at play here and I'll keep running tests in the future to try and get the best of both worlds.
thanks for the reply, in my case the learning rate is 1e-6, even smaller, and the ratio to kl-div is: 1.0 * loss_kl (top-32 kl) + 0.5 * loss_sft
I have only experimented with LR as low as 8e-6, please share how that low LR turns out 😄
From my understanding, the Qwen3.5 base models are all well trained on huge pre-training corpus, they natively have all the tool calling capabilities required by agentic coding.
However, their team are ordered to release the model on time, so may be they use a higher learning rate for aligment and post-training, resulting in models performed not well.
I did use 1e-6 as the learning rate, but my training pipeline is quite complex contains SFT + offline RL. I recommand you trying 1e-6, and freeze both lm_head and token_embed, the training can converge very fast :)
Very good advice, will have to try it. Just to confirm you are doing a full finetune from the base model?
only lora, r=32, dropout=0.0
Best