Ivme-Conversate-S-v2-Instruct / configuration_ivme_s_v2_instruct.py
ereniko's picture
Upload folder using huggingface_hub
320c763 verified
Raw
History Blame Contribute Delete
1.09 kB
"""
Configuration class for Ivme-Conversate-S-v2-Instruct.
Mirrors train_conversate_s_v2_instruct.ModelConfig exactly (same field
names, same defaults), so config.json produced from a real training run's
ModelConfig round-trips into this class with no field remapping needed.
"""
from transformers import PretrainedConfig
class IvmeConversateSV2InstructConfig(PretrainedConfig):
model_type = "ivme_conversate_s_v2_instruct"
def __init__(
self,
vocab_size: int = 8000,
d_model: int = 224,
n_layers: int = 9,
n_heads: int = 7,
d_ff: int = 896,
max_seq_len: int = 1024,
norm_eps: float = 1e-5,
rope_theta: float = 10000.0,
**kwargs,
):
self.vocab_size = vocab_size
self.d_model = d_model
self.n_layers = n_layers
self.n_heads = n_heads
self.d_ff = d_ff
self.max_seq_len = max_seq_len
self.norm_eps = norm_eps
self.rope_theta = rope_theta
kwargs.setdefault("tie_word_embeddings", True)
super().__init__(**kwargs)