Image-to-Text
Transformers
Safetensors
PEFT
English
vision-language
image-captioning
SmolVLM
LoRA
QLoRA
COCO
accelerate
Instructions to use Amirhossein75/VLM-Image-Captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Amirhossein75/VLM-Image-Captioning with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="Amirhossein75/VLM-Image-Captioning")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Amirhossein75/VLM-Image-Captioning", dtype="auto") - PEFT
How to use Amirhossein75/VLM-Image-Captioning with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| <|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance> | |
| {% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %} |