Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 81bd6f4

Browse files
committed
[FSDP2] set vocab_size=32 to avoid must be divisible by 16 error
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 6e80e7c Pull Request resolved: #264
1 parent f7a920d commit 81bd6f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_fsdp2/test_fsdp2_eager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ def init_multi_module(self) -> nn.Module:
5757
def init_transformer(self, weight_tying: bool) -> nn.Module:
5858
torch.manual_seed(42)
5959
args = ModelArgs(
60-
n_layers=3, dim=768, n_heads=12, dropout_p=0.0, weight_tying=weight_tying
60+
n_layers=3,
61+
dim=768,
62+
n_heads=12,
63+
dropout_p=0.0,
64+
weight_tying=weight_tying,
65+
vocab_size=32,
6166
)
6267
module = Transformer(args).cuda()
6368
self.broadcast_module(module)

0 commit comments

Comments
 (0)