Image-to-Text
Transformers
Safetensors
Turkish
vision-encoder-decoder
image-text-to-text
image-captioning
Instructions to use atasoglu/vit-base-patch16-224-turkish-gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use atasoglu/vit-base-patch16-224-turkish-gpt2 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="atasoglu/vit-base-patch16-224-turkish-gpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("atasoglu/vit-base-patch16-224-turkish-gpt2") model = AutoModelForMultimodalLM.from_pretrained("atasoglu/vit-base-patch16-224-turkish-gpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update generation_config.json
#1
by atasoglu - opened
- generation_config.json +1 -1
generation_config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
"early_stopping": true,
|
| 5 |
"eos_token_id": 0,
|
| 6 |
"length_penalty": 2.0,
|
| 7 |
-
"max_length":
|
| 8 |
"no_repeat_ngram_size": 3,
|
| 9 |
"num_beams": 4,
|
| 10 |
"pad_token_id": 0,
|
|
|
|
| 4 |
"early_stopping": true,
|
| 5 |
"eos_token_id": 0,
|
| 6 |
"length_penalty": 2.0,
|
| 7 |
+
"max_length": 20,
|
| 8 |
"no_repeat_ngram_size": 3,
|
| 9 |
"num_beams": 4,
|
| 10 |
"pad_token_id": 0,
|