Instructions to use Idan/fga-vqa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Idan/fga-vqa with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "visual-question-answering" 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("visual-question-answering", model="Idan/fga-vqa")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Idan/fga-vqa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Replace with the open-ended model
Browse files- config.json +4 -4
config.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
"classifier_dropout": 0.3,
|
| 6 |
"dropout": 0.5,
|
| 7 |
"dtype": "float32",
|
|
|
|
| 8 |
"hidden_size": 512,
|
| 9 |
"image_feature_dim": 2048,
|
|
|
|
| 10 |
"mask_padding": true,
|
| 11 |
"max_question_length": 15,
|
| 12 |
-
"model_type": "
|
| 13 |
"num_answers": 3001,
|
| 14 |
-
"num_choices": 18,
|
| 15 |
"num_regions": 36,
|
| 16 |
"pad_token_id": 0,
|
| 17 |
"pooling_dim": 16000,
|
| 18 |
"transformers_version": "5.14.1",
|
| 19 |
"use_cache": false,
|
| 20 |
-
"use_ternary": true,
|
| 21 |
"vocab_size": 8597,
|
| 22 |
"word_embed_dim": 512
|
| 23 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"OpenEndedVQAModel"
|
| 4 |
],
|
| 5 |
"classifier_dropout": 0.3,
|
| 6 |
"dropout": 0.5,
|
| 7 |
"dtype": "float32",
|
| 8 |
+
"gated_tanh": true,
|
| 9 |
"hidden_size": 512,
|
| 10 |
"image_feature_dim": 2048,
|
| 11 |
+
"loss_type": "soft_ce",
|
| 12 |
"mask_padding": true,
|
| 13 |
"max_question_length": 15,
|
| 14 |
+
"model_type": "open_ended_vqa",
|
| 15 |
"num_answers": 3001,
|
|
|
|
| 16 |
"num_regions": 36,
|
| 17 |
"pad_token_id": 0,
|
| 18 |
"pooling_dim": 16000,
|
| 19 |
"transformers_version": "5.14.1",
|
| 20 |
"use_cache": false,
|
|
|
|
| 21 |
"vocab_size": 8597,
|
| 22 |
"word_embed_dim": 512
|
| 23 |
}
|