Skip to content

Commit d412c25

Browse files
[docs] Add ViLT model checkpoint instructions
Add ViLT model checkpoints to model zoo. Add ViLT finetuning and pretraining instructions to project docs. ghstack-source-id: 9948005 Pull Request resolved: #1161
1 parent d578f79 commit d412c25

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

mmf/configs/zoo/models.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,3 +564,19 @@ villa:
564564
- url: mmf://models/uniter/villa.pretrained.tar.gz
565565
file_name: villa.pretrained.tar.gz
566566
hashcode: 7a8f31421ef644fddc99bd142a0090660573dd526a779d025253c3fd996754fc
567+
568+
vilt:
569+
defaults: ${vilt.vqa}
570+
vqa:
571+
# Model from project : projects/vilt, Val: 69.55
572+
version: 1.0_2021_011_29
573+
resources:
574+
- url: mmf://models/vilt/vilt.finetuned.vqa2.tar.gz
575+
file_name: vilt.finetuned.vqa2.tar.gz
576+
hashcode: c1a96abfaffa140c0970592691c2cb828b3bb16be7a6c610f7d02c9c05951c1f
577+
pretrained:
578+
version: 1.0_2021_011_29
579+
resources:
580+
- url: mmf://models/vilt/vilt.pretrained.tar.gz
581+
file_name: vilt.pretrained.tar.gz
582+
hashcode: fb4478665ba6709bd454cec40b66dcb89570b998853745cc400bfb6f99aaeb69

website/docs/projects/vilt.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,24 @@ Follow installation instructions in the [documentation](https://mmf.readthedocs.
2424

2525
## Training
2626

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

3232
To finetune using different pretrained starting weights, change the `pretrained_model_name` under image_encoder in the config yaml to reference a huggingface model.
33+
34+
To finetrain a pretrained ViLT model on the VQA2.0 dataset,
35+
```
36+
mmf_run config=projects/vilt/configs/vqa2/defaults.yaml run_type=train_val dataset=vqa2 model=vilt checkpoint.resume_zoo=vilt.pretrained
37+
```
38+
39+
To test a ViLT model already finetuned on the VQA2.0 dataset,
40+
```
41+
mmf_run config=projects/vilt/configs/vqa2/defaults.yaml run_type=val dataset=vqa2 model=vilt checkpoint.resume_zoo=vilt.vqa
42+
```
43+
44+
To pretrain a ViLT model from scratch on the COCO dataset,
45+
```
46+
mmf_run config=projects/vilt/configs/masked_coco/pretrain.yaml run_type=train_val dataset=masked_coco model=vilt
47+
```

0 commit comments

Comments
 (0)