How to use from the
Use from the
PEFT library
from peft import PeftModel
from transformers import AutoModelForCausalLM

base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-VL-2B-Instruct")
model = PeftModel.from_pretrained(base_model, "RetrO21/agrofinetune")

Model Card for output

This model is a fine-tuned version of Qwen/Qwen2-VL-2B-Instruct.
It has been trained using TRL and PEFT LoRA.

Quick start

from transformers import pipeline

question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"

generator = pipeline(
    "text-generation", 
    model="RetrO21/agrofinetune",  # replace with your repo
    device="cuda"
)

output = generator(
    [{"role": "user", "content": question}],
    max_new_tokens=128,
    return_full_text=False
)[0]

print(output["generated_text"])
Downloads last month
1
Safetensors
Model size
8B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for RetrO21/agrofinetune

Base model

Qwen/Qwen2-VL-2B
Adapter
(156)
this model