This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable FSDP usage for PyCls models (#176)
Summary: Pull Request resolved: #176 Add support for running PyCls ViT models with [FSDP](https://fairscale.readthedocs.io/en/latest/api/nn/fsdp.html). Authors: Anjali Sridhar, Vaibhav Aggarwal Reviewed By: sdebnathusc Differential Revision: D34689650 fbshipit-source-id: 062021781d69383fa4f6fe114cf92e30db068c36
- Loading branch information
1 parent
8709e4f
commit 0a97464
Showing
6 changed files
with
193 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
MODEL: | ||
TYPE: vit | ||
NUM_CLASSES: 1000 | ||
VIT: | ||
PATCH_SIZE: 16 | ||
STEM_TYPE: "patchify" | ||
NUM_LAYERS: 32 | ||
NUM_HEADS: 16 | ||
HIDDEN_DIM: 1280 | ||
MLP_DIM: 5120 | ||
CLASSIFIER_TYPE: "pooled" | ||
BN: | ||
USE_PRECISE_STATS: False | ||
OPTIM: | ||
OPTIMIZER: adamw | ||
LR_POLICY: cos | ||
BASE_LR: 0.001 | ||
MIN_LR: 0.005 | ||
MAX_EPOCH: 100 | ||
WEIGHT_DECAY: 0.24 | ||
WARMUP_EPOCHS: 5 | ||
EMA_ALPHA: 1.0e-5 | ||
EMA_UPDATE_PERIOD: 32 | ||
BIAS_USE_CUSTOM_WEIGHT_DECAY: True | ||
BIAS_CUSTOM_WEIGHT_DECAY: 0. | ||
MTA: True | ||
LN: | ||
EPS: 1e-6 | ||
USE_CUSTOM_WEIGHT_DECAY: True | ||
CUSTOM_WEIGHT_DECAY: 0. | ||
TRAIN: | ||
DATASET: imagenet | ||
IM_SIZE: 224 | ||
BATCH_SIZE: 256 | ||
MIXUP_ALPHA: 0.8 | ||
CUTMIX_ALPHA: 1.0 | ||
LABEL_SMOOTHING: 0.1 | ||
AUGMENT: AutoAugment | ||
MIXED_PRECISION: True | ||
TEST: | ||
DATASET: imagenet | ||
IM_SIZE: 224 | ||
BATCH_SIZE: 256 | ||
DATA_LOADER: | ||
NUM_WORKERS: 10 | ||
LOG_PERIOD: 100 | ||
NUM_GPUS: 8 | ||
LAUNCH: | ||
GPU_TYPE: "volta32gb" | ||
MODE: "local" | ||
FSDP: | ||
ENABLED: True | ||
RESHARD_AFTER_FW: False | ||
LAYER_NORM_FP32: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
black==19.3b0 | ||
isort==4.3.21 | ||
iopath | ||
fairscale | ||
flake8 | ||
pyyaml | ||
matplotlib | ||
|