Instructions to use DawnLiu/EVAN-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DawnLiu/EVAN-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DawnLiu/EVAN-3B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("DawnLiu/EVAN-3B") model = AutoModelForMultimodalLM.from_pretrained("DawnLiu/EVAN-3B", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DawnLiu/EVAN-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DawnLiu/EVAN-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DawnLiu/EVAN-3B", "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/DawnLiu/EVAN-3B
- SGLang
How to use DawnLiu/EVAN-3B 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 "DawnLiu/EVAN-3B" \ --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": "DawnLiu/EVAN-3B", "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 "DawnLiu/EVAN-3B" \ --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": "DawnLiu/EVAN-3B", "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 DawnLiu/EVAN-3B with Docker Model Runner:
docker model run hf.co/DawnLiu/EVAN-3B
EVAN-3B
Built with Qwen. Released under the Qwen Research License, for non-commercial use only.
EVAN-3B is Qwen2.5-VL-3B-Instruct trained with EVAN (EVidence-Ablated Negatives), the method of our NeurIPS 2026 paper Grounding Multimodal Reasoning with Evidence-Ablated Negatives.
Code: github.com/DawnLIU35/EVAN | Models: EVAN-3B ยท EVAN-7B ยท EVAN-8B
Method
RLVR rewards typically check only the final answer, not whether it came from the image or from language priors and dataset shortcuts. EVAN masks the visual evidence a question needs, lets the current policy answer without it, and penalizes plausible wrong answers under the clean image. EVAN-3B is trained with DAPO on ViRL39K. The GitHub repository has the full method, data pipeline, and training scripts.
Results
Accuracy (%) from Table 1 of the paper, with sampling at temperature 1.0. DAPO uses the same data and training recipe without EVAN.
| Model | Geo3K | MathVista | MathVerse | We-Math | DynaMath | MathVision | MMK12 | MMMU-Pro | LogicVista | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|
| Qwen2.5-VL-3B-Instruct | 19.4 | 46.3 | 33.5 | 29.9 | 40.4 | 18.2 | 36.3 | 19.8 | 32.1 | 30.7 |
| DAPO | 38.8 | 62.4 | 60.4 | 60.5 | 59.3 | 26.5 | 72.2 | 29.9 | 43.0 | 50.3 |
| EVAN-3B | 39.9 | 62.7 | 62.8 | 64.6 | 60.6 | 27.6 | 71.5 | 31.0 | 43.3 | 51.6 |
Usage
Requires transformers>=4.57, accelerate, and torchvision. Add the instruction below after the question, as in training. The default generation config holds the sampling settings we used for evaluation. With vLLM, also pass top_k=50 in SamplingParams: vLLM skips generation-config values that equal the transformers defaults.
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "DawnLiu/EVAN-3B"
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
question = "Which object is the largest?"
prompt = (
f"{question}\n\n"
"You first think through the reasoning process as an internal monologue, enclosed within <think> </think> tags. Then, provide your final answer enclosed within \\boxed{}."
)
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": "path/to/image.png"},
{"type": "text", "text": prompt},
],
}
]
inputs = processor.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_dict=True, return_tensors="pt"
).to(model.device)
output = model.generate(**inputs)
print(processor.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
License
EVAN-3B is released under the Qwen Research License of Qwen2.5-VL-3B-Instruct, which permits non-commercial use only. Relative to the base model, the weights were changed by RL training with EVAN, generation_config.json sets our evaluation sampling defaults, and the other configuration, tokenizer, and processor files were re-saved (with dtype set to bfloat16 in config.json).
- Downloads last month
- 43