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
Download chat_template.jinja from HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption: direct link, hf CLI and curl.
- Browser
- Download file 797 Bytes
-
https://huggingface.co/HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption/resolve/main/chat_template.jinja
- Command line
-
hf download hf://HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/HoqueMahmudul/llava-onevision-0.5b-qdora-radiology-image-caption/resolve/main/chat_template.jinja
797 Bytes
| {% 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 %} |