Instructions to use Kimhi/AWARES-Qwen2.5-VL-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kimhi/AWARES-Qwen2.5-VL-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Kimhi/AWARES-Qwen2.5-VL-7B") 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("Kimhi/AWARES-Qwen2.5-VL-7B") model = AutoModelForImageTextToText.from_pretrained("Kimhi/AWARES-Qwen2.5-VL-7B") 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 Kimhi/AWARES-Qwen2.5-VL-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kimhi/AWARES-Qwen2.5-VL-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kimhi/AWARES-Qwen2.5-VL-7B", "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/Kimhi/AWARES-Qwen2.5-VL-7B
- SGLang
How to use Kimhi/AWARES-Qwen2.5-VL-7B 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 "Kimhi/AWARES-Qwen2.5-VL-7B" \ --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": "Kimhi/AWARES-Qwen2.5-VL-7B", "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 "Kimhi/AWARES-Qwen2.5-VL-7B" \ --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": "Kimhi/AWARES-Qwen2.5-VL-7B", "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 Kimhi/AWARES-Qwen2.5-VL-7B with Docker Model Runner:
docker model run hf.co/Kimhi/AWARES-Qwen2.5-VL-7B
AWARES-Qwen2.5-VL-7B
AWARES (Adaptive Resolution with Active REqueStingS) is a fine-tuned Qwen2.5-VL-7B-Instruct model trained with GRPO (Group Relative Policy Optimization) to intelligently request high-resolution image crops when needed to answer visual questions.
How It Works
Given a low-resolution image and a question, the model decides whether it needs more visual detail. If so, it emits a GET_CROPS tool call specifying which region(s) to zoom into. The high-res crops are then provided back, and the model produces its final answer.
Crop regions — the model can request any of 9 predefined crop indices:
CROPS_MAP = {
'0': 'top-left', '1': 'top-right', '2': 'bottom-left', '3': 'bottom-right',
'4': 'center', '5': 'top', '6': 'bottom', '7': 'left', '8': 'right',
}
Quick Start
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"Kimhi/AWARES-Qwen2.5-VL-7B", torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained("Kimhi/AWARES-Qwen2.5-VL-7B")
For full usage examples (multi-turn inference with GET_CROPS, crop extraction, etc.) and evaluation scripts, see the AwaRes repository.
Evaluation
We provide a custom lmms-eval model type (qwen2_5_vl_awares) that handles the full AWARES multi-turn pipeline automatically — including low-res input, GET_CROPS parsing, crop extraction, and second-turn generation with KV-cache reuse.
See the evaluation instructions in the AwaRes repository for setup and benchmarking details.
Training Details
- Base model: Qwen2.5-VL-7B-Instruct
- Training method: GRPO (Group Relative Policy Optimization) with LoRA, then merged
- Reward signals: Text similarity, crop cost penalty, LLM-as-a-judge
- Framework: Custom TRL fork + DeepSpeed ZeRO-2
Citation
@article{shabtay2026awares,
title={Look Where It Matters: High-Resolution Crops Retrieval for Efficient VLMs},
author={Shabtay, Nimrod and Kimhi, Moshe and Spector, Artem and Haray, Sivan and Rivlin, Ehud and Baskin, Chaim and Giryes, Raja and Schwartz, Eli},
journal={arXiv preprint arXiv:2603.16932},
year={2026}
}
- Downloads last month
- 48