Skip to content

Commit 1c402d3

Browse files
committed
updated opt vocab size
1 parent 236dc78 commit 1c402d3

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/fairseq2/models/opt/_config.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class OPTConfig:
2828
max_seq_len: int = 2048 + 1
2929
"""The maximum sequence length."""
3030

31-
vocab_size: int = 50272
31+
vocab_size: int = 258
3232
"""The size of the vocabulary."""
3333

3434
pad_idx: int | None = 1
@@ -61,3 +61,11 @@ def register_opt_configs(context: RuntimeContext) -> None:
6161
@arch("opt_125m")
6262
def opt_125m() -> OPTConfig:
6363
return OPTConfig()
64+
65+
@arch("opt_350m")
66+
def opt_350m() -> OPTConfig:
67+
config = opt_125m()
68+
69+
config.model_dim = 1024
70+
config.num_layers = 24
71+
config.num_attn_heads = 16

0 commit comments

Comments
 (0)