Views
No views yet
1from vllm import LLM, SamplingParams
2from PIL import Image
3
4# Initialize the model
5llm = LLM(model="sakp7/Qwen2.5-VL-7B-Instruct-INT8", quantization="8bit")
6
7# Prepare image and prompt
8image = Image.open("example.jpg")
9prompt = "Describe this image in detail."
10
11# Generate response
12sampling_params = SamplingParams(temperature=0.7, max_tokens=256)
13outputs = llm.generate_for_multimodal_prompts([[prompt, image]], sampling_params)
14print(outputs[0].outputs[0].text)