File size: 1,520 Bytes
35fd7fa | 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | """Hugging Face configuration for Vortex Alpha."""
from __future__ import annotations
from transformers import PretrainedConfig
class VortexConfig(PretrainedConfig):
model_type = "vortex"
def __init__(
self,
vocab_size: int = 8192,
hidden_size: int = 1024,
num_hidden_layers: int = 12,
num_attention_heads: int = 16,
num_key_value_heads: int = 4,
head_dim: int = 64,
intermediate_size: int = 3664,
hidden_act: str = "silu",
max_position_embeddings: int = 4096,
rope_theta: float = 100000.0,
rms_norm_eps: float = 1e-5,
attention_bias: bool = False,
tie_word_embeddings: bool = True,
use_cache: bool = False,
**kwargs,
) -> None:
super().__init__(
tie_word_embeddings=tie_word_embeddings,
**kwargs,
)
self.vocab_size = vocab_size
self.hidden_size = hidden_size
self.num_hidden_layers = num_hidden_layers
self.num_attention_heads = num_attention_heads
self.num_key_value_heads = num_key_value_heads
self.head_dim = head_dim
self.intermediate_size = intermediate_size
self.hidden_act = hidden_act
self.max_position_embeddings = max_position_embeddings
self.rope_theta = rope_theta
self.rms_norm_eps = rms_norm_eps
self.attention_bias = attention_bias
self.tie_word_embeddings = tie_word_embeddings
self.use_cache = use_cache
|