Uploaded finetuned model

🧠 Qwen2-VL-2B-MedVQA-PMC-TR (v2)

Türkçe medikal görsel soru-cevaplama (VQA) için fine-tune edilmiş Qwen2-VL-2B tabanlı bir modeldir. Model, radyoloji görüntüleri ve doğal dilde sorulan Türkçe sorular üzerinden evet/hayır gibi kısa yanıtlara odaklanır.

Bu sürüm, önceki versiyona göre daha uzun dizilerle (384 token), daha yüksek batch boyutuyla ve validation destekli olarak eğitilmiştir.


📁 Datasetler

  • nezahatkorkmaz/unsloth-pmc-vqa-tr (ana VQA eğitimi için)
  • aosm/vqa-rad-tr-yesno-2025 (evet/hayır doğrulama için)

⚙️ Eğitim Parametreleri

Parametre Değer
Model Temeli unsloth/Qwen2-VL-2B-Instruct
Epoch 3.0
Adım (steps) 50
Batch size (efektif) 256 (64 x 4)
Learning Rate 2e-5
LoRA r / alpha 16 / 16
Max Seq Length 384
Precision bf16
GPU NVIDIA T4 (Colab)
Eğitim Süresi 40 dakika (2413 sn)
Token Sayısı 2.36M

📊 Eğitim Sonuçları

🎯 Evet/Hayır (Binary QA)

Metrik Değer
✅ Exact Match 56.04%
🎯 Ortalama F1 56.04%
🧪 Accuracy 56.04%
🧪 Binary F1 31.92%

Model yalnızca "evet" veya "hayır" yanıtları verecek şekilde prompt mühendisliği ile yönlendirilmiştir.

🧠 Semantik Değerlendirme (converted_test_dataset)

Metrik Değer
📘 ROUGE-L 0.0317
🧠 BERTScore (F1) 0.3991

Açıklamalı cevaplara dayalı testlerde semantik kalite temel düzeydedir. Bu sonuçlar, modelin tam metin üretimi yerine kısa yanıtlar için optimize edildiğini gösterir.


📌 Kullanım

from unsloth import FastVisionModel
from PIL import Image

# Modeli yükle
model, tokenizer = FastVisionModel.from_pretrained(
    "nezahatkorkmaz/Qwen2-VL-2B-MedVQA-PMC-TR",
    use_safetensors=True
)
FastVisionModel.for_inference(model)

# Görsel ve soru
image = Image.open("ornek.jpg").convert("RGB")
question = "Bu akciğer filminde sıvı birikimi var mı?"

# Tahmin al
messages = [{"role": "user", "content": [
    {"type": "text", "text": question},
    {"type": "image", "image": image}
]}]
input_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
inputs = tokenizer(image, input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=16)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)

- **Developed by:** nezahatkorkmaz
- **License:** apache-2.0
- **Finetuned from model :** unsloth/qwen2-vl-2b-instruct-unsloth-bnb-4bit

This qwen2_vl model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
Downloads last month
3
Safetensors
Model size
2.21B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support