Ir para o conteúdo
ModelListadosExterno
Baixar

Llama 3.2 11B Vision Instruct RoVQA LoRA v1

This is a parameter-efficient Low-Rank Adaptation (LoRA) adapter for LLaMA 3.2 11B Vision Instruct fine-tuned on Romanian Visual Question Answering (VQA).

TipoOtherModelo baseunsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bitVersãoAdapter modelCnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
200 MB
Modelo base
unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit
Versão
vAdapter model
Atualizado
10 de out. de 2026
Fonte
Hugging Face

Descrição da fonte

Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1

This is a parameter-efficient Low-Rank Adaptation (LoRA) adapter for LLaMA 3.2 11B Vision Instruct fine-tuned on Romanian Visual Question Answering (VQA).

It was trained on the GRAI-UNSTPB/Flickr30K-RoQA-v1 dataset using Unsloth and Hugging Face's TRL library.

Model Details

Inference & Usage

You can load and run inference on this model either using Unsloth (for 2x faster inference) or standard Hugging Face transformers and peft.

Installation

pip install torch transformers peft pillow datasets
# If you want to use Unsloth for faster inference, install it via:
# pip install unsloth

1. Using Unsloth (Recommended)

from unsloth import FastVisionModel
import torch
from datasets import load_dataset

# Load model and processor
model, processor = FastVisionModel.from_pretrained(
    model_name="GRAI-UNSTPB/Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1",
    load_in_4bit=True
)
FastVisionModel.for_inference(model)

# Load a test sample directly from the Flickr30K-RoQA-v1 dataset
dataset = load_dataset("GRAI-UNSTPB/Flickr30K-RoQA-v1", split="test")
sample = dataset[0]
image = sample["image"]
question = sample["question"]

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": f"Răspunde la întrebare: {question}"}
        ]
    }
]

input_text = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(images=image, text=input_text, return_tensors="pt").to("cuda")

# Generate response
outputs = model.generate(**inputs, max_new_tokens=64)
# Decode only the generated response (excluding the prompt)
prompt_len = inputs.input_ids.shape[1]
response = processor.decode(outputs[0][prompt_len:], skip_special_tokens=True)
print(response)

2. Using Transformers & PEFT

from transformers import MllamaForConditionalGeneration, AutoProcessor
from peft import PeftModel
import torch
from PIL import Image

# Load base model and processor
base_model_id = "unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit"
processor = AutoProcessor.from_pretrained(base_model_id)

model = MllamaForConditionalGeneration.from_pretrained(
    base_model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)

# Load LoRA adapter
model = PeftModel.from_pretrained(model, "GRAI-UNSTPB/Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1")

# Inference setup follows the same structure as above...

Evaluation Results

The model was evaluated on the Flickr30K-RoQA test set and on Romanian Image Captioning (zero-shot transfer task without captioning fine-tuning).

Romanian Visual Question Answering (VQA)

ModelBERTScore F1 (%)ROUGE-L F1 (%)BLEU
LLaMA 3.2 11B Vision (Base)56.3711.580.90
LLaMA 3.2 11B Vision + RoVQA LoRA (Ours)70.3238.7021.14

Romanian Image Captioning (Zero-Shot Transfer)

ModelBERTScore F1 (%)ROUGE-L F1 (%)BLEU
LLaMA 3.2 11B Vision (Base)57.2214.001.53
LLaMA 3.2 11B Vision + RoVQA LoRA (Ours)66.6928.606.99

Citation

If you use this model or adapter in your research, please cite the following paper:

@article{dima2025parameter,
  title={Parameter-Efficient Multimodal Instruction Tuning for Romanian Vision--Language Models},
  author={Dima, George-Andrei and Smădu, Răzvan-Alexandru and Cercel, Dumitru-Clementin},
  journal={arXiv preprint arXiv:2512.14926},
  year={2025}
}

Fontes

1 fonte
Hugging FacePrimárioVersão 3120de5ed074537c1268b84f41af1a9b106ce3d2
huggingface.co/GRAI-UNSTPB/Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1/tree/3120de5ed074537c1268b84f41af1a9b106ce3d2

Verificado 10 de out.

Artefatos de modelo

1 artefato

adapter_model.safetensors

safetensors · 200 MB · SHA-256 27712bd919a7…57c2 · Hugging Face

Download file

Trechos de fonte

2 trechos

--- base_model: unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit tags: - text-generation-inference - transformers - unsloth - mllama - trl - lora - vqa - image-to-text - romanian license: apache-2.0 language: - ro --- # Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1 This is a parameter-efficient Low-Rank Adaptation (LoRA) adapter for LLaMA 3.2 11B Vision Instruct fine-tuned on Romanian Visual Question Answering (VQA). It was trained on the [GRAI-UNSTPB/Flickr30K-RoQA-v1](https://huggingface.co/datasets/GRAI-UNSTPB/Flickr30K-RoQA-v1) dataset using Unsloth and Hugging Face's TRL library. ## Model Details * **Base Model:** [unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit) * **Adapter Parameters:** LoRA modules injected into the language decoder block (~52M trainable parameters, representing 0.48% of total weights). ## Inference & Usage You can load and run inference on this model either using Unsloth (for 2x faster inference) or standard Hugging Face `transformers` and `peft`. ### Installation ```bash pip install torch transformers peft pillow datasets # If you want to use Unsloth for faster inference, install it via: # pip install unsloth ``` ### 1. Using Unsloth (Recommended) ```python from unsloth import FastVisionModel import torch from datasets import load_dataset # Load model and processor model, processor = FastVisionModel.from_pretrained( model_name="GRAI-UNSTPB/Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1", load_in_4bit=True ) FastVisionModel.for_inference(model) # Load a test sample directly from the Flickr30K-RoQA-v1 dataset dataset = load_dataset("GRAI-UNSTPB/Flickr30K-RoQA-v1", split="test") sample = dataset[0] image = sample["image"] question = sample["question"] messages = [ { "role": "user", "content": [ {"type": "image", "image": image}, {"type": "text", "text": f"Răspunde la întrebare: {question}"} ] } ] input_text = processor.apply_chat_template(messages, add_generation_prompt=True) inputs = processor(images=image, text=input_text, return_tensors="pt").to("cuda") # Generate response outputs = model.generate(**inputs, max_new_tokens=64) # Decode only the generated response (excluding the prompt) prompt_len = inputs.input_ids.shape[1] response = processor.decode(outputs[0][prompt_len:], skip_special_tokens=True) print(response) ``...

Source context: 0 downloads · 0 likes · Pipeline image-to-text · Library transformers · Repo GRAI-UNSTPB/Llama-3.2-11B-Vision-Instruct-RoVQA-lora-v1