Image-Text-to-Text
PEFT
Safetensors
English
lora
dora
qlora
4-bit precision
adapter
medical
radiology
image-captioning
image-to-text
llava-onevision
qwen2
vision-language
imageclef
rocov2
conversational
Instructions to use HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("llava-hf/llava-onevision-qwen2-0.5b-ov-hf") model = PeftModel.from_pretrained(base_model, "HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption") - Notebooks
- Google Colab
- Kaggle
File size: 797 Bytes
33c1754 | 1 2 3 4 | {% for message in messages %}{{'<|im_start|>' + message['role'] + ' '}}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>' }}{% endfor %}{# Render all video then #}{% for content in message['content'] | selectattr('type', 'equalto', 'video') %}{{ '<video>' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ '
' + content['text'] }}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ '
' + content['text'] }}{% endgeneration %}{% endfor %}{% endif %}{{'<|im_end|>'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %} |