| 18 | |
| 19 | @dataclass |
| 20 | class Config: |
| 21 | MAX_LEN = 256 # length of each input sample |
| 22 | BATCH_SIZE = 32 # batch size |
| 23 | LR = 0.001 # learning rate |
| 24 | VOCAB_SIZE = 512 # max number of words in vocabulary |
| 25 | EMBED_DIM = 128 # word embedding vector size |
| 26 | NUM_HEAD = 8 # used in bert model |
| 27 | FF_DIM = 128 # feedforward; used in bert model |
| 28 | NUM_LAYERS = 1 # number of BERT module layers |
| 29 | |
| 30 | config = Config() |
| 31 |