Update PersadianNanoV4Model.py
Browse files- PersadianNanoV4Model.py +7 -7
PersadianNanoV4Model.py
CHANGED
|
@@ -14,17 +14,17 @@ import torch.nn.functional as F
|
|
| 14 |
class PersadianNanoV4Config:
|
| 15 |
def __init__(self):
|
| 16 |
|
| 17 |
-
# Core architecture
|
| 18 |
-
self.hidden_size =
|
| 19 |
-
self.intermediate_size =
|
| 20 |
self.num_hidden_layers = 12
|
| 21 |
|
| 22 |
# Attention
|
| 23 |
-
self.num_attention_heads =
|
| 24 |
self.num_key_value_heads = 4
|
| 25 |
|
| 26 |
# MoE
|
| 27 |
-
self.num_experts =
|
| 28 |
self.num_experts_per_tok = 2
|
| 29 |
|
| 30 |
# Progressive experts
|
|
@@ -58,8 +58,8 @@ class PersadianNanoV4Config:
|
|
| 58 |
self.attention_dropout = 0.0
|
| 59 |
self.use_flash_attention = True
|
| 60 |
|
| 61 |
-
# Precision
|
| 62 |
-
self.torch_dtype =
|
| 63 |
|
| 64 |
|
| 65 |
# ============================================================
|
|
|
|
| 14 |
class PersadianNanoV4Config:
|
| 15 |
def __init__(self):
|
| 16 |
|
| 17 |
+
# Core architecture (MATCH CHECKPOINT)
|
| 18 |
+
self.hidden_size = 512
|
| 19 |
+
self.intermediate_size = 1024
|
| 20 |
self.num_hidden_layers = 12
|
| 21 |
|
| 22 |
# Attention
|
| 23 |
+
self.num_attention_heads = 8
|
| 24 |
self.num_key_value_heads = 4
|
| 25 |
|
| 26 |
# MoE
|
| 27 |
+
self.num_experts = 4
|
| 28 |
self.num_experts_per_tok = 2
|
| 29 |
|
| 30 |
# Progressive experts
|
|
|
|
| 58 |
self.attention_dropout = 0.0
|
| 59 |
self.use_flash_attention = True
|
| 60 |
|
| 61 |
+
# Precision (IMPORTANT: keep as string or remove entirely)
|
| 62 |
+
self.torch_dtype = "float16"
|
| 63 |
|
| 64 |
|
| 65 |
# ============================================================
|