Skip to content

Commit 19a6542

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: 52b80d0 Pull Request resolved: #1161
1 parent b672a74 commit 19a6542

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
@@ -546,3 +546,19 @@ unit:
546546
- url: mmf://models/unit_models/unit.all_8_datasets.shared_dec_with_coco_init_without_task_embedding.tar.gz
547547
file_name: unit.all_8_datasets.shared_dec_with_coco_init_without_task_embedding.tar.gz
548548
hashcode: c4a3c1072f07e605de76402ff7c0e2bc8d4514561c52dc94b3d28b3d4d7f698e
549+
550+
vilt:
551+
defaults: ${vilt.vqa}
552+
vqa:
553+
# Model from project : projects/vilt, Val: 69.55
554+
version: 1.0_2021_011_29
555+
resources:
556+
- url: mmf://models/vilt/vilt.finetuned.vqa2.tar.gz
557+
file_name: vilt.finetuned.vqa2.tar.gz
558+
hashcode: 83539fb58f19592f4286a499557c40f084f366722700232943824922160aeacd
559+
pretrained:
560+
version: 1.0_2021_011_29
561+
resources:
562+
- url: mmf://models/vilt/vilt.pretrained.tar.gz
563+
file_name: vilt.pretrained.tar.gz
564+
hashcode: a933ef78e9afafe044de22ef042d4ffe50388c19544921db044cd446e688c5fd

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)