Instructions to use insagur/qwen3.5-9b-agentnet-ubuntu-1epoch with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use insagur/qwen3.5-9b-agentnet-ubuntu-1epoch with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="insagur/qwen3.5-9b-agentnet-ubuntu-1epoch") 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("insagur/qwen3.5-9b-agentnet-ubuntu-1epoch") model = AutoModelForMultimodalLM.from_pretrained("insagur/qwen3.5-9b-agentnet-ubuntu-1epoch") 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 insagur/qwen3.5-9b-agentnet-ubuntu-1epoch with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "insagur/qwen3.5-9b-agentnet-ubuntu-1epoch" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "insagur/qwen3.5-9b-agentnet-ubuntu-1epoch", "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/insagur/qwen3.5-9b-agentnet-ubuntu-1epoch
- SGLang
How to use insagur/qwen3.5-9b-agentnet-ubuntu-1epoch 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 "insagur/qwen3.5-9b-agentnet-ubuntu-1epoch" \ --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": "insagur/qwen3.5-9b-agentnet-ubuntu-1epoch", "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 "insagur/qwen3.5-9b-agentnet-ubuntu-1epoch" \ --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": "insagur/qwen3.5-9b-agentnet-ubuntu-1epoch", "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 insagur/qwen3.5-9b-agentnet-ubuntu-1epoch with Docker Model Runner:
docker model run hf.co/insagur/qwen3.5-9b-agentnet-ubuntu-1epoch
Qwen3.5-9B AgentNet Ubuntu (1 Epoch, Legacy Format)
Full fine-tuning of Qwen/Qwen3.5-9B on the AgentNet Ubuntu split (5K trajectories → 38,317 step-level samples after quality filtering).
Training format
Legacy Thought: / Action: / Code: template (no ## headers). For the OpenCUA ## format variant see insagur/qwen3.5-9b-agentnet-cot-l2-step100.
Thought: <reasoning>
Action: <one-sentence>
Code:
pyautogui.click(x=0.5, y=0.5)
Coordinates are normalized to [0, 1] of screen width/height.
Training config
- Hardware: 1 × 8 A100 80GB SXM4
- Distributed: DeepSpeed ZeRO-2 + bf16
- Optimizer: AdamW, LR 1e-5 cosine, warmup 200 steps
- Batch: per_device_bs=1 × grad_accum=16 × 8 GPU = global batch 128
- Epochs: 1 (300 steps)
- EMA teacher: target=block (last ViT block), decay=0.9995, α=0.5
- Sequence length: 3072 (truncated; p99=2713)
- Image tokens: 2048 (≈1.6M pixel cap; ~1689×950 post-resize)
- Gradient checkpointing: on
- Train runtime: 5h 14m
Metrics (final)
| Metric | Value |
|---|---|
| Train loss | 0.4726 |
| Train token_acc | 0.854 |
| Eval loss | 0.4622 |
| Eval token_acc | 0.841 |
| Eval samples | 1866 |
Offline eval on 50 val samples (scripts/eval.py):
| Metric | Value |
|---|---|
| parses_ok_frac | 0.18 |
| coord_l2 (parsed) | 0.219 |
| click_hit_rate (parsed) | 0.60 |
| action_kind_match | 0.57 |
Format adherence is the main limitation — the legacy bare-prefix format
isn't reliably emitted by Qwen3.5; the OpenCUA ## variant addresses
this.
Data
AgentNet Ubuntu 5K trajectories filtered with
task_completed AND alignment≥7 AND efficiency≥5 and per-step
last_step_correct AND NOT last_step_redundant. 5% trajectory-level val
split.
| Split | Trajectories | Samples |
|---|---|---|
| Train | 2,178 | 38,317 |
| Val | 114 | 1,866 |
Inference
from transformers import AutoModelForImageTextToText, AutoProcessor
from PIL import Image
model = AutoModelForImageTextToText.from_pretrained(
"insagur/qwen3.5-9b-agentnet-ubuntu-1epoch",
torch_dtype="bfloat16",
).to("cuda")
processor = AutoProcessor.from_pretrained("insagur/qwen3.5-9b-agentnet-ubuntu-1epoch")
system = (
"You are a computer-use agent operating a Linux desktop. "
"You receive the user's task and the current screenshot. "
"Respond with your reasoning, the action description, and the pyautogui code to execute. "
"All coordinates are normalized to [0, 1] of screen width/height. "
"Format your response exactly as:\n"
"Thought: <your reasoning>\nAction: <one-sentence description of the next action>\nCode:\n<pyautogui code>"
)
image = Image.open("screenshot.png").convert("RGB")
messages = [
{"role": "system", "content": system},
{"role": "user", "content": [
{"type": "image", "image": image},
{"type": "text", "text": "Task: Open the terminal.\n<image>\nWhat is the next action?"},
]},
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=256)
print(processor.batch_decode(out, skip_special_tokens=True)[0])
Recipe
Training code: https://github.com/2bhapby/gui_internal_worldmodel
SMOKE=0 WANDB=1 DS=z2 NPROC=8 PER_DEVICE_BS=1 GRAD_ACCUM=16 \
RUN_NAME=a100-full-9b-1epoch \
sbatch --gpus=8 scripts/slurm_train_qwen35_4b_agentnet.sbatch \
optim.num_train_epochs=1
- Downloads last month
- 19