Reinforcement Learning
Transformers
Safetensors
English
chess
mamba
Mixture of Experts
kiyengine
ssm
mixture-of-experts
custom_code
Instructions to use Kiy-K/KiyEngine-V3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kiy-K/KiyEngine-V3 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Kiy-K/KiyEngine-V3", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload configuration_kiyengine.py with huggingface_hub
Browse files- configuration_kiyengine.py +26 -0
configuration_kiyengine.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
class KiyEngineConfig(PretrainedConfig):
|
| 4 |
+
model_type = "kiyengine"
|
| 5 |
+
|
| 6 |
+
def __init__(
|
| 7 |
+
self,
|
| 8 |
+
d_model=384,
|
| 9 |
+
n_layers=4,
|
| 10 |
+
n_experts=8,
|
| 11 |
+
top_k=2,
|
| 12 |
+
d_state=16,
|
| 13 |
+
d_conv=4,
|
| 14 |
+
expansion_factor=2,
|
| 15 |
+
vocab_size=768,
|
| 16 |
+
**kwargs
|
| 17 |
+
):
|
| 18 |
+
self.d_model = d_model
|
| 19 |
+
self.n_layers = n_layers
|
| 20 |
+
self.n_experts = n_experts
|
| 21 |
+
self.top_k = top_k
|
| 22 |
+
self.d_state = d_state
|
| 23 |
+
self.d_conv = d_conv
|
| 24 |
+
self.expansion_factor = expansion_factor
|
| 25 |
+
self.vocab_size = vocab_size
|
| 26 |
+
super().__init__(**kwargs)
|