Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

Metrics (Test Set)

MetricValue
Accuracy78.1%
Weighted F10.74
Macro F10.45
No DR F10.955
Moderate F10.708
Avg Latency (GPU)1.16s

Usage

python

from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
import torch
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"ottokevin/JUSTCSL-OphthaVision-3B",
torch_dtype=torch.bfloat16,
device_map="auto",
)
processor = AutoProcessor.from_pretrained("ottokevin/JUSTCSL-OphthaVision-3B")
# Prepare image + prompt
from PIL import Image
image = Image.open("retina.png").convert("RGB")
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": "Classify this retina image: 0=No DR, 1=Mild, 2=Moderate, 3=Severe, 4=Proliferative DR. Answer:"},
],
},
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], padding=True, return_tensors="pt").to(model.device)
generated = model.generate(**inputs, max_new_tokens=8, do_sample=False)
response = processor.tokenizer.decode(generated[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response)

Model provider

ottokevin

Model tree

Base

Qwen/Qwen2.5-VL-3B-Instruct

Fine-tuned

this model

Modalities

Input

Text, Image

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today