Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
vision
gui-agent
fine-tuned
qwen3-vl
conversational
Instructions to use BLR2/qwen3-vl-4b-gui-agent1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BLR2/qwen3-vl-4b-gui-agent1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="BLR2/qwen3-vl-4b-gui-agent1") 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("BLR2/qwen3-vl-4b-gui-agent1") model = AutoModelForImageTextToText.from_pretrained("BLR2/qwen3-vl-4b-gui-agent1") 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
- vLLM
How to use BLR2/qwen3-vl-4b-gui-agent1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BLR2/qwen3-vl-4b-gui-agent1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BLR2/qwen3-vl-4b-gui-agent1", "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/BLR2/qwen3-vl-4b-gui-agent1
- SGLang
How to use BLR2/qwen3-vl-4b-gui-agent1 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 "BLR2/qwen3-vl-4b-gui-agent1" \ --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": "BLR2/qwen3-vl-4b-gui-agent1", "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 "BLR2/qwen3-vl-4b-gui-agent1" \ --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": "BLR2/qwen3-vl-4b-gui-agent1", "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 BLR2/qwen3-vl-4b-gui-agent1 with Docker Model Runner:
docker model run hf.co/BLR2/qwen3-vl-4b-gui-agent1
Fine-tuned Qwen3-VL-4B for GUI Click Actions
This model is a fine-tuned version of Qwen/Qwen3-VL-4B-Instruct trained on GUI trajectory data for click action prediction.
Training Details
- Base Model: Qwen/Qwen3-VL-4B-Instruct
- Training Checkpoint: Step 137, Epoch 0
- Task: Predict click coordinates from screenshot + instruction
Usage
With Transformers
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from PIL import Image
model = Qwen3VLForConditionalGeneration.from_pretrained(
"BLR2/qwen3-vl-4b-gui-agent1",
torch_dtype="auto",
device_map="auto",
)
processor = AutoProcessor.from_pretrained("BLR2/qwen3-vl-4b-gui-agent1")
# Load your screenshot
image = Image.open("screenshot.png")
instruction = "Click on the search button"
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": instruction},
],
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=50)
response = processor.decode(outputs[0], skip_special_tokens=True)
print(response) # Outputs coordinates like "0.5234 0.7891"
With vLLM
vllm serve BLR2/qwen3-vl-4b-gui-agent1 --dtype bfloat16
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="dummy")
# For vLLM with vision, encode image as base64
response = client.chat.completions.create(
model="BLR2/qwen3-vl-4b-gui-agent1",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64,{base64_image}"}},
{"type": "text", "text": "Click on the search button"}
]
}
],
max_tokens=50
)
print(response.choices[0].message.content)
Output Format
The model outputs normalized coordinates in the format: x y where both values are in range [0, 1].
To convert to pixel coordinates:
x_norm, y_norm = map(float, output.split())
x_pixel = int(x_norm * image_width)
y_pixel = int(y_norm * image_height)
- Downloads last month
- 2
Model tree for BLR2/qwen3-vl-4b-gui-agent1
Base model
Qwen/Qwen3-VL-4B-Instruct