Zum Inhalt springen
ModelAufgelistetExtern
Herunterladen

Qwen3 VL 8B Ipu10k Thaicaption LoRA

This model is a fine-tuned Qwen3-VL-8B-Instruct, adapted for Thai image captioning.

ArtOtherBasismodellunsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bitVersionRevision 079ec66CBewertung

Modellquelle

Art
Other
Dateigröße
98,0 MB
Basismodell
unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bit
Version
vRevision 079ec66
Aktualisiert
14. Sept. 2026
Downloads
1
Quelle
Hugging Face

Quellenbeschreibung

This is only an adapter!! You are required to load the original model via unsloth first before use this.

This model is a fine-tuned Qwen3-VL-8B-Instruct, adapted for Thai image captioning.

It is trained using LoRA (Low-Rank Adaptation) on a subset of the COCO Thai caption dataset saksornr/coco_caption-thai-ipu24-train-sample10k to generate Thai caption from images.


Model Description

  • Base Model: Qwen3-VL-8B-Instruct (4-bit quantized via Unsloth)
  • Fine-tuning Method: LoRA (PEFT)
  • Task: Image Captioning (Thai)
  • Language: Thai
  • Framework: Transformers + TRL + Unsloth

Training Details

Dataset

  • Name: saksornr/coco_caption-thai-ipu24-train-sample10k
  • A Thai-translated version of COCO captions
  • ~10,000 samples used for training

Training Setup

  • Method: Supervised Fine-Tuning (SFT)
  • Adapter: LoRA
  • Quantization: 4-bit (bnb)
  • Frameworks: TRL + Transformers + Unsloth
  • Training code is released here

Usage

from PIL import Image
from unsloth import FastVisionModel
model, tokenizer = FastVisionModel.from_pretrained(
    "unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bit",
    load_in_4bit = True,
)
model.load_adapter("KiruruP/Qwen3-VL-8B-ipu10k-thaicaption-lora")
FastVisionModel.for_inference(model)

instruction = "จงบรรยายภาพนี้เป็นภาษาไทยแบบสั้น กระชับ และเป็นธรรมชาติ"
messages = [
    {"role": "user", 
    "content": [
        {"type": "image"},
        {"type": "text", "text": instruction}
    ]}
]
input_text = tokenizer.apply_chat_template(messages, add_generation_prompt = True, tokenize = False)

image = Image.open("example.jpg").convert("RGB")
inputs = tokenizer(
    image,
    input_text,
    add_special_tokens = False,
    return_tensors = "pt",
).to("cuda")
output = model.generate(**inputs, max_new_tokens = 100)
generated_tokens = outputs[0][inputs.input_ids.shape[1]:] # For filtering prompt in output
caption = tokenizer.decode(generated_tokens, skip_special_tokens=True).strip()
print(caption)

Quellen

1 Quelle
Hugging FacePrimärVersion 079ec66a7d6ee610590f6ad60f6e627b0176bdf6
huggingface.co/KiruruP/Qwen3-VL-8B-ipu10k-thaicaption-lora/tree/079ec66a7d6ee610590f6ad60f6e627b0176bdf6

Verifiziert 20. Aug.

Modellartefakte

1 Artefakt

adapter_model.safetensors

safetensors · 98,0 MB · SHA-256 79329288ce37…d034 · Hugging Face

Herunterladen

Quellenauszüge

2 Auszüge

--- base_model: - unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bit library_name: peft pipeline_tag: image-to-text tags: - vision-language - image-captioning - thai - lora - sft - transformers - trl - unsloth datasets: - saksornr/coco_caption-thai-ipu24-train-sample10k language: - th --- # This is only an adapter!! You are required to load the original model via unsloth first before use this. This model is a fine-tuned **Qwen3-VL-8B-Instruct**, adapted for **Thai image captioning**. It is trained using **LoRA (Low-Rank Adaptation)** on a subset of the COCO Thai caption dataset `saksornr/coco_caption-thai-ipu24-train-sample10k` to generate Thai caption from images. --- ## Model Description - **Base Model:** Qwen3-VL-8B-Instruct (4-bit quantized via Unsloth) - **Fine-tuning Method:** LoRA (PEFT) - **Task:** Image Captioning (Thai) - **Language:** Thai - **Framework:** Transformers + TRL + Unsloth - --- ## Training Details ### Dataset - **Name:** `saksornr/coco_caption-thai-ipu24-train-sample10k` - A Thai-translated version of COCO captions - ~10,000 samples used for training ### Training Setup - **Method:** Supervised Fine-Tuning (SFT) - **Adapter:** LoRA - **Quantization:** 4-bit (bnb) - **Frameworks:** TRL + Transformers + Unsloth - Training code is released [here](https://github.com/KiruruPoko/superaiss6_lvl1-image_captioning) --- ## Usage ```py from PIL import Image from unsloth import FastVisionModel model, tokenizer = FastVisionModel.from_pretrained( "unsloth/Qwen3-VL-8B-Instruct-unsloth-bnb-4bit", load_in_4bit = True, ) model.load_adapter("KiruruP/Qwen3-VL-8B-ipu10k-thaicaption-lora") FastVisionModel.for_inference(model) instruction = "จงบรรยายภาพนี้เป็นภาษาไทยแบบสั้น กระชับ และเป็นธรรมชาติ" messages = [ {"role": "user", "content": [ {"type": "image"}, {"type": "text", "text": instruction} ]} ] input_text = tokenizer.apply_chat_template(messages, add_generation_prompt = True, tokenize = False) image = Image.open("example.jpg").convert("RGB") inputs = tokenizer( image, input_text, add_special_tokens = False, return_tensors = "pt", ).to("cuda") output = model.generate(**inputs, max_new_tokens = 100) generated_tokens = outputs[0][inputs.input_ids.shape[1]:] # For filtering prompt in output caption = tokenizer.decode(generated_tokens, skip_special_tokens=True).strip() print(caption) ```

Source context: 1 downloads · 0 likes · Pipeline image-to-text · Library peft · Repo KiruruP/Qwen3-VL-8B-ipu10k-thaicaption-lora