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