File size: 362 Bytes
500f774 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from dataclasses import dataclass
from transformers import PretrainedConfig
@dataclass
class CustomGPTConfig(PretrainedConfig):
"""
Configuration class for custom GPT model.
"""
model_type = "custom_gpt"
block_size: int = 768
vocab_size: int = 50257
n_layer: int = 8
n_head: int = 8
n_embd: int = 768
dropout: float = 0.1 |