Create configuration_phi3.py
Browse files- configuration_phi3.py +20 -0
configuration_phi3.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers.configuration_utils import PretrainedConfig
|
2 |
+
|
3 |
+
class Phi3Config(PretrainedConfig):
|
4 |
+
model_type = "phi3"
|
5 |
+
|
6 |
+
def __init__(self,
|
7 |
+
vocab_size=32064,
|
8 |
+
hidden_size=3072,
|
9 |
+
num_hidden_layers=32,
|
10 |
+
num_attention_heads=32,
|
11 |
+
intermediate_size=8192,
|
12 |
+
max_position_embeddings=4096,
|
13 |
+
**kwargs):
|
14 |
+
super().__init__(**kwargs)
|
15 |
+
self.vocab_size = vocab_size
|
16 |
+
self.hidden_size = hidden_size
|
17 |
+
self.num_hidden_layers = num_hidden_layers
|
18 |
+
self.num_attention_heads = num_attention_heads
|
19 |
+
self.intermediate_size = intermediate_size
|
20 |
+
self.max_position_embeddings = max_position_embeddings
|