Image-Text-to-Text
Transformers
PyTorch
vision-encoder-decoder
image-captioning
Generated from Trainer
Instructions to use gagan3012/ViTGPT2I2A with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gagan3012/ViTGPT2I2A with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="gagan3012/ViTGPT2I2A")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("gagan3012/ViTGPT2I2A") model = AutoModelForImageTextToText.from_pretrained("gagan3012/ViTGPT2I2A") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use gagan3012/ViTGPT2I2A with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gagan3012/ViTGPT2I2A" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gagan3012/ViTGPT2I2A", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gagan3012/ViTGPT2I2A
- SGLang
How to use gagan3012/ViTGPT2I2A with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "gagan3012/ViTGPT2I2A" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gagan3012/ViTGPT2I2A", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "gagan3012/ViTGPT2I2A" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gagan3012/ViTGPT2I2A", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gagan3012/ViTGPT2I2A with Docker Model Runner:
docker model run hf.co/gagan3012/ViTGPT2I2A
update model card README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
tags:
|
|
|
|
| 3 |
- generated_from_trainer
|
| 4 |
model-index:
|
| 5 |
- name: ViTGPT2I2A
|
|
@@ -11,9 +13,9 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 11 |
|
| 12 |
# ViTGPT2I2A
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [](https://huggingface.co/) on
|
| 15 |
It achieves the following results on the evaluation set:
|
| 16 |
-
- Loss: 0.
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
tags:
|
| 4 |
+
- image-captioning
|
| 5 |
- generated_from_trainer
|
| 6 |
model-index:
|
| 7 |
- name: ViTGPT2I2A
|
|
|
|
| 13 |
|
| 14 |
# ViTGPT2I2A
|
| 15 |
|
| 16 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the vizwiz dataset.
|
| 17 |
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 0.0708
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|