Downloads · 30 days
7
3% of all-time downloads
deepguess/weather-vlm-qwen2.5-7b
weather-vlm-qwen2.5-7b is a image-to-text model from deepguess. Use it when you need a caption or text from an image.
This model is a fine-tuned version of Qwen2.5-VL-7B for weather and meteorological image analysis.
Downloads · 30 days
7
3% of all-time downloads
All-time downloads
261
Public
Parameters
8.3B
16.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.6 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Qwen2.5-VL-7B for weather and meteorological image analysis.
{ "global_step": 7209, "epoch": 2.999610014819437, "total_flos": 4.9811140881314e+18, "best_metric": 0.7554888129234314 }
from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
from PIL import Image
import torch
# Load model and processor
model = Qwen2VLForConditionalGeneration.from_pretrained("qwen2.5VL-7b-weather-sft")
processor = AutoProcessor.from_pretrained("qwen2.5VL-7b-weather-sft")
# Prepare image and prompt
image = Image.open("weather_image.png")
prompt = "Analyze this weather image and describe the meteorological conditions."
# Process inputs
messages = [
{
"role": "user",
"content": [
{"type": "text", "text": prompt},
{"type": "image", "image": image},
],
}
]
# Apply chat template
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], return_tensors="pt")
# Generate response
with torch.no_grad():
generated_ids = model.generate(**inputs, max_new_tokens=512)
generated_ids_trimmed = [
out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)[0]
print(output_text)
This model has been fine-tuned to excel at:
Same as base model (Qwen2.5-VL-7B-Instruct)