gamansai commited on
Commit
ec2ef58
·
verified ·
1 Parent(s): f8a46ad

Add README

Browse files
Files changed (1) hide show
  1. README.md +43 -0
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Asteria Custom Model
2
+
3
+ Custom MoE model with **Kimi K2.7's trained brain weights**.
4
+
5
+ ## Architecture (matches Kimi K2.7)
6
+
7
+ - 61 layers (Layer 0 = dense, Layers 1-60 = MoE)
8
+ - 384 experts per MoE layer, 8 active per token
9
+ - 1 shared expert per MoE layer (always active)
10
+ - MLA attention (Multi-head Latent Attention)
11
+ - Hidden size: 7168
12
+ - Vocab: 163,840
13
+ - Total params: ~1 trillion
14
+ - Active per token: ~32 billion
15
+
16
+ ## Features
17
+
18
+ 1. **Sparse loading**: Only 8 experts in RAM per layer (~700 MB)
19
+ 2. **Expert training**: Train one expert at a time with LoRA
20
+ 3. **Router always trainable**: Whole brain improves when any expert trains
21
+ 4. **Dynamic experts**: Add/remove experts on the fly
22
+
23
+ ## Source
24
+
25
+ Weights transferred from `gamansai/ai/custom_models/Kimi-K2.7-Code/` (originally from `moonshotai/Kimi-K2.7-Code`).
26
+
27
+ ## Usage
28
+
29
+ ```python
30
+ from huggingface_hub import snapshot_download
31
+ import torch, numpy as np
32
+
33
+ # Download config
34
+ path = snapshot_download(repo_id="gamansai/asteria-custom-model", allow_patterns="config.json")
35
+
36
+ # Load expert weights (sparse — only fetch what you need)
37
+ path = snapshot_download(
38
+ repo_id="gamansai/asteria-custom-model",
39
+ allow_patterns="L01/experts/E000/*"
40
+ )
41
+ # Load gate_proj weights
42
+ raw = open(f"{path}/L01/experts/E000/gate_proj_weight_packed.bin", "rb").read()
43
+ ```