File size: 644 Bytes
34cfbe5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
from transformers import PretrainedConfig
from typing import List
class MGPTConfig(PretrainedConfig):
model_type = "mgpt"
def __init__(
self,
block_size: int = 1024,
vocab_size: int = 12000,
n_layer: int = 12,
n_head: int = 8,
n_embd: int = 512,
dropout: float = 0.1,
bias: bool = False,
**kwargs,
):
self.block_size = block_size
self.vocab_size = vocab_size
self.n_layer = n_layer
self.n_head = n_head
self.n_embd = n_embd
self.dropout = dropout
self.bias = bias
super().__init__(**kwargs)
|