Views
No views yet
1from transformers import Qwen2VLForConditionalGeneration, Qwen2VLProcessor
2import torch
3
4# Load base model
5model = Qwen2VLForConditionalGeneration.from_pretrained(
6 "Qwen/Qwen2-VL-7B-Instruct",
7 torch_dtype=torch.bfloat16,
8 device_map="auto"
9)
10processor = Qwen2VLProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct")
11
12# Load fine-tuned adapter
13model.load_adapter("azdin/qwen2-vl-weather-adalora")
14
15# Use for weather analysis...