| 34 | |
| 35 | @dataclass |
| 36 | class Config: |
| 37 | MAX_LEN = 256 # length of each input sample in tokens |
| 38 | BATCH_SIZE = 32 # batch size |
| 39 | LR = 0.001 # learning rate |
| 40 | VOCAB_SIZE = 512 # max number of words in vocabulary |
| 41 | EMBED_DIM = 128 # word embedding vector size |
| 42 | NUM_HEAD = 8 # used in bert model |
| 43 | FF_DIM = 128 # feedforward; used in bert model |
| 44 | NUM_LAYERS = 1 # number of BERT module layers |
| 45 | |
| 46 | config = Config() |
| 47 |