Instructions to use chisato111/AOT-Qwen2.5-VL-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chisato111/AOT-Qwen2.5-VL-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="chisato111/AOT-Qwen2.5-VL-7B-Instruct") 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("chisato111/AOT-Qwen2.5-VL-7B-Instruct") model = AutoModelForMultimodalLM.from_pretrained("chisato111/AOT-Qwen2.5-VL-7B-Instruct", 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 chisato111/AOT-Qwen2.5-VL-7B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chisato111/AOT-Qwen2.5-VL-7B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chisato111/AOT-Qwen2.5-VL-7B-Instruct", "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/chisato111/AOT-Qwen2.5-VL-7B-Instruct
- SGLang
How to use chisato111/AOT-Qwen2.5-VL-7B-Instruct 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 "chisato111/AOT-Qwen2.5-VL-7B-Instruct" \ --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": "chisato111/AOT-Qwen2.5-VL-7B-Instruct", "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 "chisato111/AOT-Qwen2.5-VL-7B-Instruct" \ --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": "chisato111/AOT-Qwen2.5-VL-7B-Instruct", "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 chisato111/AOT-Qwen2.5-VL-7B-Instruct with Docker Model Runner:
docker model run hf.co/chisato111/AOT-Qwen2.5-VL-7B-Instruct
๐ก๏ธ AOT: Dynamic Adversarial Reinforcement Learning for Robust Multimodal Large Language Models
Authors: Yicheng Bao, Xuhong Wang, Qiaosheng Zhang, Chaochao Lu, Xia Hu, Xin Tan.
Affiliations: East China Normal University, Shanghai AI Laboratory.
๐ Overview
This repository hosts the Defender model weights from the paper "To Deceive is to Teach? Forging Perceptual Robustness via Adversarial Reinforcement Learning".
AOT (Adversarial Opponent Training) is a co-evolutionary framework designed to address the perceptual fragility of Multimodal Large Language Models (MLLMs). Current MLLMs often fail when confronted with visually complex scenes or semantic distractors.
Instead of relying on finite, manually annotated datasets, AOT formulates the training as a dynamic, adversarial game between:
- An Attacker: An image-editing model that autonomously generates semantic adversarial examples (e.g., inserting plausible distractors) to deceive the defender.
- A Defender: The MLLM, which improves its perceptual robustness by training on the curriculum generated by the attacker.
This model is the Defender (Iter. 3), based on Qwen2.5-VL-7B-Instruct, which has been hardened through iterative adversarial self-play.
๐ง The AOT Framework
The AOT framework orchestrates a co-evolution where both models improve in tandem:
- Attacker Evolution: The attacker (Qwen-Image-Edit) is optimized via Flow-GRPO to discover diverse attack strategies (e.g., object addition, removal, replacement) that specifically target the defender's weaknesses while maintaining semantic integrity.
- Defender Enhancement: The defender is fine-tuned via DAPO (Direct Preference Optimization) on the challenging adversarial data generated by the attacker.
๐ Key Results
Extensive experiments demonstrate that AOT significantly enhances robustness without compromising general capabilities:
- Perceptual Robustness: Achieves state-of-the-art performance on fine-grained perception benchmarks like VStar and HRBench (4K & 8K).
- Reduced Hallucination: Outperforms baselines on POPE and HallusionBench, indicating that better perception leads to more factual responses.
- General Capabilities: Maintains or improves performance on general multimodal benchmarks such as MMMU and RealWorldQA.
- Downloads last month
- 16