Image-to-Text
Transformers
ONNX
Safetensors
vision-encoder-decoder
image-text-to-text
image-captioning
Instructions to use tarekziade/distilvit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tarekziade/distilvit 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="tarekziade/distilvit")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("tarekziade/distilvit") model = AutoModelForMultimodalLM.from_pretrained("tarekziade/distilvit") - Notebooks
- Google Colab
- Kaggle
This model is a variation of https://huggingface.co/nlpconnect/vit-gpt2-image-captioning
- Read the blog post here https://ziade.org/2024/03/17/distilvit-image-captioning-model
- The training code is here: https://github.com/tarekziade/distilvit
Results after after 3 epochs (and ~45 hours of training)
- eval_loss: 0.19939416646957397
- eval_rouge1: 43.006
- eval_rouge2: 16.9939
- eval_rougeL: 38.8923
- eval_rougeLsum: 38.8877
- eval_gen_len: 11.327256736227712
- eval_runtime: 1816.5255
- eval_samples_per_second: 13.77
- eval_steps_per_second': 1.721
- train_runtime: 46263.3695
- train_samples_per_second: 38.373
- train_steps_per_second: 4.797
- train_loss: 0.05974134062104816
- Downloads last month
- 9
Model tree for tarekziade/distilvit
Base model
distilbert/distilgpt2