Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions mmf/configs/zoo/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,19 @@ villa:
- url: mmf://models/uniter/villa.pretrained.tar.gz
file_name: villa.pretrained.tar.gz
hashcode: 7a8f31421ef644fddc99bd142a0090660573dd526a779d025253c3fd996754fc

vilt:
defaults: ${vilt.vqa}
vqa:
# Model from project : projects/vilt, Val: 69.55
version: 1.0_2021_011_29
resources:
- url: mmf://models/vilt/vilt.finetuned.vqa2.tar.gz
file_name: vilt.finetuned.vqa2.tar.gz
hashcode: c1a96abfaffa140c0970592691c2cb828b3bb16be7a6c610f7d02c9c05951c1f
pretrained:
version: 1.0_2021_011_29
resources:
- url: mmf://models/vilt/vilt.pretrained.tar.gz
file_name: vilt.pretrained.tar.gz
hashcode: fb4478665ba6709bd454cec40b66dcb89570b998853745cc400bfb6f99aaeb69
17 changes: 16 additions & 1 deletion website/docs/projects/vilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,24 @@ Follow installation instructions in the [documentation](https://mmf.readthedocs.

## Training

To train ViLT model on the VQA2.0 dataset, run the following command
To train ViLT model from scratch on the VQA2.0 dataset, run the following command
```
mmf_run config=projects/vilt/configs/vqa2/defaults.yaml run_type=train_val dataset=vqa2 model=vilt
```

To finetune using different pretrained starting weights, change the `pretrained_model_name` under image_encoder in the config yaml to reference a huggingface model.

To finetrain a pretrained ViLT model on the VQA2.0 dataset,
```
mmf_run config=projects/vilt/configs/vqa2/defaults.yaml run_type=train_val dataset=vqa2 model=vilt checkpoint.resume_zoo=vilt.pretrained
```

To test a ViLT model already finetuned on the VQA2.0 dataset,
```
mmf_run config=projects/vilt/configs/vqa2/defaults.yaml run_type=val dataset=vqa2 model=vilt checkpoint.resume_zoo=vilt.vqa
```

To pretrain a ViLT model from scratch on the COCO dataset,
```
mmf_run config=projects/vilt/configs/masked_coco/pretrain.yaml run_type=train_val dataset=masked_coco model=vilt
```