Downloads · 30 days
0
srai86825/qwen-vl-tool-assistant-lora
qwen-vl-tool-assistant-lora is a text generation model from srai86825. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This is a LoRA adapter for the Qwen2.5-VL-32B model, fine-tuned for tool-use with visual input.
Downloads · 30 days
0
Access
Public
Updated May 9, 2025
Repo size
818 MB
Likes
0
Public
Click a slice to open those files.
.pt538 MB · 49%
From the Hugging Face model README
This is a LoRA adapter for the Qwen2.5-VL-32B model, fine-tuned for tool-use with visual input.
from transformers import AutoProcessor, AutoModelForCausalLM
from peft import PeftModel
import torch
from PIL import Image
# Load the model
processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-32B-Instruct")
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-VL-32B-Instruct",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
model = PeftModel.from_pretrained(
base_model,
"srai86825/qwen-vl-tool-assistant-lora"
)
# Use the model
image = Image.open("your_image.jpg")
text = "What is in this image?"
inputs = processor(text=text, images=image, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=100)
result = processor.decode(outputs[0], skip_special_tokens=True)
print(result)
This model uses the Low-Rank Adaptation (LoRA) technique to efficiently fine-tune the Qwen2.5-VL-32B-Instruct model. LoRA works by adding small, trainable rank decomposition matrices to existing weights, allowing for parameter-efficient fine-tuning.
The adapter is applied to all attention layers in the model, which allows it to learn new capabilities without modifying the entire model.