Instructions to use seul77/CICA-Qwen2.5-VL-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seul77/CICA-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="seul77/CICA-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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("seul77/CICA-Qwen2.5-VL-7B") model = AutoModelForMultimodalLM.from_pretrained("seul77/CICA-Qwen2.5-VL-7B", 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 seul77/CICA-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 "seul77/CICA-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": "seul77/CICA-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/seul77/CICA-Qwen2.5-VL-7B
- SGLang
How to use seul77/CICA-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 "seul77/CICA-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": "seul77/CICA-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 "seul77/CICA-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": "seul77/CICA-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 seul77/CICA-Qwen2.5-VL-7B with Docker Model Runner:
docker model run hf.co/seul77/CICA-Qwen2.5-VL-7B
๐ฟ CICA-Qwen2.5-VL-7B
Qwen2.5-VL-7B-Instruct trained with cross-image credit assignment (CICA) on ASTERISM-Train, from the paper ASTERISM: Do Multimodal LLMs Actually Look at All the Images?
CICA extends RLVR. For every token of a response, it compares the policy's likelihood under all images with its likelihood under the best single image, and moves credit toward the tokens that need more than one image. It keeps the data, the reward and the RL objective, and adds no parameters, rollouts or backward pass.
Results
| Model | ASTERISM |
|---|---|
| Qwen2.5-VL-7B-Instruct | 40.7 |
| CICA-Qwen2.5-VL-7B | 46.7 |
The ASTERISM score is the macro average over its seven task categories, with greedy decoding.
Usage
The example needs the accelerate and qwen-vl-utils packages (pip install accelerate qwen-vl-utils).
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
path = "seul77/CICA-Qwen2.5-VL-7B"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(path, torch_dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(path)
messages = [{
"role": "user",
"content": [
{"type": "image", "image": "image_1.jpg"},
{"type": "image", "image": "image_2.jpg"},
{"type": "text", "text": "Which image shows the same object from a different side?"},
],
}]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
images, videos = process_vision_info(messages)
inputs = processor(text=[text], images=images, videos=videos, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=8192, do_sample=False, repetition_penalty=1.0)
print(processor.batch_decode(out[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)[0])
The configuration, tokenizer and processor files are those of Qwen2.5-VL-7B-Instruct, so generation_config.json keeps its sampling defaults; the ASTERISM scores use greedy decoding without repetition penalty, as in the example above. The evaluation code and the prompts used for the ASTERISM numbers are in the GitHub repository (https://github.com/chanseul01/ASTERISM). Training follows Supp. F and G of the paper.
License
Apache 2.0, following the base model Qwen2.5-VL-7B-Instruct.
Citation
@article{asterism,
title = {ASTERISM: Do Multimodal LLMs Actually Look at All the Images?},
author = {Cho, Chanseul and Kim, Dongwoo and Bae, Noori and Moon, Seungjae and Lee, Seongsu and Ro, Youngmin},
journal = {arXiv preprint arXiv:2611.32316},
year = {2026}
}
- Downloads last month
- 50
Model tree for seul77/CICA-Qwen2.5-VL-7B
Base model
Qwen/Qwen2.5-VL-7B-Instruct