Views
No views yet
1import torch
2from PIL import Image
3from transformers import AutoModelForCausalLM, AutoTokenizer, AutoImageProcessor
4
5repo = "JiwanKim/CompoDistill-Teacher-4B"
6model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True,
7 torch_dtype=torch.float16).to("cuda")
8tokenizer = AutoTokenizer.from_pretrained(repo, use_fast=False)
9image_processor = AutoImageProcessor.from_pretrained(repo)
10
11image = Image.open("example.jpg")
12print(model.chat("What is happening in this image?", tokenizer,
13 image=image, image_processor=image_processor))1@article{kim2025compodistill,
2 title={CompoDistill: Attention Distillation for Compositional Reasoning in Multimodal LLMs},
3 author={Kim, Jiwan and Kim, Kibum and Seo, Sangwoo and Park, Chanyoung},
4 journal={arXiv preprint arXiv:2510.12184},
5 year={2025}
6}