Upload configuration_nexus_small.py with huggingface_hub
Browse files- configuration_nexus_small.py +33 -1
configuration_nexus_small.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
from dataclasses import dataclass
|
|
|
|
|
|
|
| 2 |
|
| 3 |
@dataclass
|
| 4 |
class NexusConfig:
|
|
@@ -32,4 +34,34 @@ class NexusConfig:
|
|
| 32 |
|
| 33 |
seed: int = 42
|
| 34 |
|
| 35 |
-
nexus_config = NexusConfig()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from dataclasses import dataclass
|
| 2 |
+
from transformers import PretrainedConfig
|
| 3 |
+
|
| 4 |
|
| 5 |
@dataclass
|
| 6 |
class NexusConfig:
|
|
|
|
| 34 |
|
| 35 |
seed: int = 42
|
| 36 |
|
| 37 |
+
nexus_config = NexusConfig()
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
class NexusSmAllConfig(PretrainedConfig):
|
| 41 |
+
model_type = "nexus_small"
|
| 42 |
+
|
| 43 |
+
def __init__(
|
| 44 |
+
self,
|
| 45 |
+
vocab_size=50304,
|
| 46 |
+
max_seq_len=512,
|
| 47 |
+
dim=768,
|
| 48 |
+
num_layers=10,
|
| 49 |
+
num_heads=12,
|
| 50 |
+
num_kv_heads=4,
|
| 51 |
+
multiple_of=256,
|
| 52 |
+
ff_dim=2048,
|
| 53 |
+
norm_eps=1e-6,
|
| 54 |
+
rope_theta=500000.0,
|
| 55 |
+
**kwargs,
|
| 56 |
+
):
|
| 57 |
+
super().__init__(**kwargs)
|
| 58 |
+
self.vocab_size = vocab_size
|
| 59 |
+
self.max_seq_len = max_seq_len
|
| 60 |
+
self.dim = dim
|
| 61 |
+
self.num_layers = num_layers
|
| 62 |
+
self.num_heads = num_heads
|
| 63 |
+
self.num_kv_heads = num_kv_heads
|
| 64 |
+
self.multiple_of = multiple_of
|
| 65 |
+
self.ff_dim = ff_dim
|
| 66 |
+
self.norm_eps = norm_eps
|
| 67 |
+
self.rope_theta = rope_theta
|