Instructions to use wanglne/EVA-Qwen2.5-VL-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wanglne/EVA-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="wanglne/EVA-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("wanglne/EVA-Qwen2.5-VL-7B-Instruct") model = AutoModelForMultimodalLM.from_pretrained("wanglne/EVA-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 wanglne/EVA-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 "wanglne/EVA-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": "wanglne/EVA-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/wanglne/EVA-Qwen2.5-VL-7B-Instruct
- SGLang
How to use wanglne/EVA-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 "wanglne/EVA-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": "wanglne/EVA-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 "wanglne/EVA-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": "wanglne/EVA-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 wanglne/EVA-Qwen2.5-VL-7B-Instruct with Docker Model Runner:
docker model run hf.co/wanglne/EVA-Qwen2.5-VL-7B-Instruct
EVA-Qwen2.5-VL-7B-Instruct
This repository contains the final Qwen2.5-VL-7B-Instruct checkpoint produced by EVA.
EVA is an editing-based framework for improving the robustness and safety alignment of large language models and vision-language models against diverse jailbreak attacks while preserving their general capabilities on benign tasks.
Model information
- EVA checkpoint:
wanglne/EVA-Qwen2.5-VL-7B-Instruct - Base model: Qwen/Qwen2.5-VL-7B-Instruct
Resources
- Paper: EVA: Editing for Versatile Alignment against Jailbreaks
- IEEE TPAMI: 10.1109/TPAMI.2026.3694189
- Code: wanglne/EVA
- EVA model collection: EVA models
Intended use
This checkpoint is released for research, reproduction, safety evaluation, and comparison with other alignment methods.
License
This checkpoint is derived from Qwen2.5-VL-7B-Instruct. Its use and redistribution remain subject to the Apache License 2.0 and the applicable base-model terms.
The EVA source code is released separately under the MIT License.
Citation
@ARTICLE{11523146,
author={Wang, Yi and Qiu, Hongye and Xu, Yue and Yang, Sibei and Qin, Zhan and Huang, Minlie and Wang, Wenjie},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={EVA: Editing for Versatile Alignment against Jailbreaks},
year={2026},
volume={},
number={},
pages={1-16},
keywords={Automatic speech recognition;Modeling;Safety;Visualization;Large language models;Conferences;Optimization;Educational institutions;Light emitting diodes;Tuning;Safety Alignment;Jailbreak Attacks;Model Editing;Large Language Models;Vision Language Models},
doi={10.1109/TPAMI.2026.3694189}}
- Downloads last month
- 32