Image-to-Text
Transformers
Safetensors
vision-encoder-decoder
image-text-to-text
Generated from Trainer
Instructions to use mo-thecreator/ViT-GPT2-Image-Captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mo-thecreator/ViT-GPT2-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="mo-thecreator/ViT-GPT2-Image-Captioning")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("mo-thecreator/ViT-GPT2-Image-Captioning") model = AutoModelForImageTextToText.from_pretrained("mo-thecreator/ViT-GPT2-Image-Captioning") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForImageTextToText
tokenizer = AutoTokenizer.from_pretrained("mo-thecreator/ViT-GPT2-Image-Captioning")
model = AutoModelForImageTextToText.from_pretrained("mo-thecreator/ViT-GPT2-Image-Captioning")Quick Links
ViT-GPT2
This model is a fine-tuned version of motheecreator/ViT-GPT2-Image_Captioning_model on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.125337
- Rouge2 Precision: None
- Rouge2 Recall: None
- Rouge2 Fmeasure: 0.155
- Bleu: 9.7054
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 256
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Rouge2 Precision | Rouge2 Recall | Rouge2 Fmeasure | Bleu |
|---|---|---|---|---|---|---|---|
| 2.1537 | 0.9993 | 1171 | 2.13666 | None | None | 0.1531 | 9.4673 |
| 2.0434 | 1.9985 | 2342 | 2.125337 | None | None | 0.155 | 9.7054 |
Framework versions
- Transformers 4.44.2
- Pytorch 2.4.0
- Datasets 3.0.0
- Tokenizers 0.19.1
- Downloads last month
- 5
# 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="mo-thecreator/ViT-GPT2-Image-Captioning")