Uploaded model

Quick start

from datasets import load_dataset
from unsloth import FastVisionModel

model, tokenizer = FastVisionModel.from_pretrained(
    model_name = "MMoshtaghi/Pixtral-12B-2409-LoRAAdpt-General",
    load_in_4bit = True,
)
FastVisionModel.for_inference(model) # Enable for inference!

dataset = load_dataset("unsloth/llava-instruct-mix-vsft-mini", split = "train")
image = dataset[2]["images"][0]
instruction = "Is there something interesting about this image?"

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")

from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer, skip_prompt = True)
_ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 64,
                   use_cache = True, temperature = 1.5, min_p = 0.1)

Framework versions

  • TRL: 0.13.0
  • Transformers: 4.47.1
  • Pytorch: 2.5.1+cu121
  • Datasets: 3.2.0
  • Tokenizers: 0.21.0
  • Unsloth: 2025.1.5

Training procedure

(Log-in required!) Visualize in Weights & Biases

Citations

This VLM model was trained 2x faster with Unsloth and Huggingface's TRL library.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no pipeline_tag.

Dataset used to train MMoshtaghi/Pixtral-12B-2409-LoRAAdpt-General