LuJa111/GMM-Sefai-Dataset
Viewer • Updated • 164 • 334
How to use LuJa111/GMM-sefai-model with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bit")
model = PeftModel.from_pretrained(base_model, "LuJa111/GMM-sefai-model")How to use LuJa111/GMM-sefai-model with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LuJa111/GMM-sefai-model to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LuJa111/GMM-sefai-model to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LuJa111/GMM-sefai-model to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="LuJa111/GMM-sefai-model",
max_seq_length=2048,
)LoRA adapter that fine-tunes Qwen3-VL-8B-Instruct (4-bit) to caption images in Lithuanian. Built to show captioning changes before vs. after fine-tuning.
unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bitLuJa111/GMM-Sefai-Dataset).from unsloth import FastVisionModel
from PIL import Image
model, tok = FastVisionModel.from_pretrained("LuJa111/GMM-sefai-model", load_in_4bit=True)
FastVisionModel.for_inference(model)
INSTRUCTION = "Aprašyk šį vaizdą taisyklinga, sklandžia lietuvių kalba vienu ar dviem sakiniais."
img = Image.open("photo.jpg").convert("RGB")
msgs = [{"role": "user", "content": [{"type": "text", "text": INSTRUCTION}, {"type": "image"}]}]
text = tok.apply_chat_template(msgs, add_generation_prompt=True)
inputs = tok(img, text, add_special_tokens=False, return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=64, do_sample=False, repetition_penalty=1.3, no_repeat_ngram_size=3)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip())
Careful for greedy decoding GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA GELTONA
Base model
Qwen/Qwen3-VL-8B-Instruct