Instructions to use McGill-NLP/A3-Qwen3.5-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use McGill-NLP/A3-Qwen3.5-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="McGill-NLP/A3-Qwen3.5-9B") 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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("McGill-NLP/A3-Qwen3.5-9B") model = AutoModelForMultimodalLM.from_pretrained("McGill-NLP/A3-Qwen3.5-9B", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use McGill-NLP/A3-Qwen3.5-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "McGill-NLP/A3-Qwen3.5-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "McGill-NLP/A3-Qwen3.5-9B", "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/McGill-NLP/A3-Qwen3.5-9B
- SGLang
How to use McGill-NLP/A3-Qwen3.5-9B 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 "McGill-NLP/A3-Qwen3.5-9B" \ --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": "McGill-NLP/A3-Qwen3.5-9B", "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 "McGill-NLP/A3-Qwen3.5-9B" \ --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": "McGill-NLP/A3-Qwen3.5-9B", "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 McGill-NLP/A3-Qwen3.5-9B with Docker Model Runner:
docker model run hf.co/McGill-NLP/A3-Qwen3.5-9B
Update pipeline tag to image-text-to-text and add transformers metadata
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
- agents
|
| 6 |
- web
|
| 7 |
- sft
|
| 8 |
- qwen
|
| 9 |
-
base_model: Qwen/Qwen3.5-9B
|
| 10 |
-
pipeline_tag: text-generation
|
| 11 |
---
|
| 12 |
|
| 13 |
<div align="center">
|
|
@@ -24,7 +25,9 @@ pipeline_tag: text-generation
|
|
| 24 |
|
| 25 |
</div>
|
| 26 |
|
| 27 |
-
A3-Qwen3.5-9B is a 9B web agent fine-tuned from [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B) on [A3-Synth](https://huggingface.co/datasets/McGill-NLP/A3-Synth), a synthetic dataset generated using the Agent-as-Annotators (A3) framework.
|
|
|
|
|
|
|
| 28 |
|
| 29 |
## Usage
|
| 30 |
|
|
@@ -51,3 +54,17 @@ vllm serve McGill-NLP/A3-Qwen3.5-9B --tensor-parallel-size 2 --max-model-len 655
|
|
| 51 |
| A3-Qwen3.5-9B | 9B | [McGill-NLP/A3-Qwen3.5-9B](https://huggingface.co/collections/McGill-NLP/a3-agent-as-annotators-69d854ab5b1993b10efc3fba) |
|
| 52 |
| A3-Qwen3.5-4B | 4B | [McGill-NLP/A3-Qwen3.5-4B](https://huggingface.co/McGill-NLP/A3-Qwen3.5-4B) |
|
| 53 |
| A3-Qwen3.5-2B | 2B | [McGill-NLP/A3-Qwen3.5-2B](https://huggingface.co/McGill-NLP/A3-Qwen3.5-2B) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen3.5-9B
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
+
pipeline_tag: image-text-to-text
|
| 6 |
+
library_name: transformers
|
| 7 |
tags:
|
| 8 |
- agents
|
| 9 |
- web
|
| 10 |
- sft
|
| 11 |
- qwen
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
<div align="center">
|
|
|
|
| 25 |
|
| 26 |
</div>
|
| 27 |
|
| 28 |
+
A3-Qwen3.5-9B is a 9B multimodal web agent fine-tuned from [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B) on [A3-Synth](https://huggingface.co/datasets/McGill-NLP/A3-Synth), a synthetic dataset generated using the Agent-as-Annotators (A3) framework.
|
| 29 |
+
|
| 30 |
+
The model achieves **41.5% on WebArena**, surpassing closed-source models such as Claude 3.5 Sonnet (36.0%) and GPT-4o (31.5%) under the same evaluation protocol.
|
| 31 |
|
| 32 |
## Usage
|
| 33 |
|
|
|
|
| 54 |
| A3-Qwen3.5-9B | 9B | [McGill-NLP/A3-Qwen3.5-9B](https://huggingface.co/collections/McGill-NLP/a3-agent-as-annotators-69d854ab5b1993b10efc3fba) |
|
| 55 |
| A3-Qwen3.5-4B | 4B | [McGill-NLP/A3-Qwen3.5-4B](https://huggingface.co/McGill-NLP/A3-Qwen3.5-4B) |
|
| 56 |
| A3-Qwen3.5-2B | 2B | [McGill-NLP/A3-Qwen3.5-2B](https://huggingface.co/McGill-NLP/A3-Qwen3.5-2B) |
|
| 57 |
+
|
| 58 |
+
## Citation
|
| 59 |
+
|
| 60 |
+
```bibtex
|
| 61 |
+
@misc{lu2026structured,
|
| 62 |
+
title={Structured Distillation of Web Agent Capabilities Enables Generalization},
|
| 63 |
+
author={Xing Han Lù and Siva Reddy},
|
| 64 |
+
year={2026},
|
| 65 |
+
eprint={2604.07776},
|
| 66 |
+
archivePrefix={arXiv},
|
| 67 |
+
primaryClass={cs.LG},
|
| 68 |
+
url={https://arxiv.org/abs/2604.07776},
|
| 69 |
+
}
|
| 70 |
+
```
|