Downloads · 30 days
5
4% of all-time downloads
Omarrran/Hnm_Llama3_2_Vision_lora_model
Hnm_Llama3_2_Vision_lora_model is a image-text-to-text model from Omarrran. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
- Developed by: Haq Nawaz Malik - License: apache-2.0 - Finetuned from model : unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit
Downloads · 30 days
5
4% of all-time downloads
All-time downloads
138
Public
Repo size
17.2 MB
Likes
0
Public
Click a slice to open those files.
.json17.3 MB · 100%
From the Hugging Face model README
The Hnm_Llama3.2_(11B)-Vision_lora_model is a fine-tuned version of Llama 3.2 (11B) Vision with LoRA-based parameter-efficient fine-tuning (PEFT). It specializes in vision-language tasks, particularly for medical image captioning and understanding.
This model was fine-tuned on a Tesla T4 (Google Colab) using Unsloth, a framework designed for efficient fine-tuning of large models.
unsloth/Llama-3.2-11B-Vision-Instructunsloth/Radiology_minifrom unsloth import FastVisionModel
model, tokenizer = FastVisionModel.from_pretrained(
"Hnm_Llama3.2_(11B)-Vision_lora_model",
load_in_4bit=True # Set to False for full precision
)
import torch
from transformers import TextStreamer
FastVisionModel.for_inference(model) # Enable inference mode
# Load an image from dataset
dataset = load_dataset("unsloth/Radiology_mini", split="train")
image = dataset[0]["image"]
instruction = "Describe this medical image accurately."
messages = [
{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": instruction}
]}
]
input_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
inputs = tokenizer(
image,
input_text,
add_special_tokens=False,
return_tensors="pt"
).to("cuda")
text_streamer = TextStreamer(tokenizer, skip_prompt=True)
_ = model.generate(**inputs, streamer=text_streamer, max_new_tokens=128,
use_cache=True, temperature=1.5, min_p=0.1)
If you use this model, please cite:
@misc{Hnm_Llama3.2_11B_Vision,
author = {Haq Nawaz Malik},
title = {Fine-tuned Llama 3.2 (11B) Vision Model},
year = {2025},
url = {https://huggingface.co/Omarrran/Hnm_Llama3_2_Vision_lora_model}
}
For any questions or support, reach out via: