File size: 758 Bytes
bebae60 |
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 28 |
import json
from transformers import PretrainedConfig
class LizardConfig(PretrainedConfig):
"""
This is the configuration class to store the configuration of a `LizardModel`.
It inherits from PretrainedConfig to get Hugging Face functionality.
"""
model_type = "lizard"
def __init__(
self,
vocab_size=24005,
d_model=256,
n_heads=8,
n_layers=6,
max_length=128,
pad_token_id=0,
**kwargs
):
self.vocab_size = vocab_size
self.d_model = d_model
self.n_heads = n_heads
self.n_layers = n_layers
self.max_length = max_length
self.pad_token_id = pad_token_id
super().__init__(pad_token_id=pad_token_id, **kwargs)
|