VinayHajare commited on
Commit
90bb054
·
verified ·
1 Parent(s): 6f3fb73

Add V4-Nano config (~523M params for testing)

Browse files
Files changed (1) hide show
  1. configs/config_nano.json +55 -0
configs/config_nano.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "deepseek_v4",
3
+ "architectures": ["DeepSeekV4ForCausalLM"],
4
+ "_comment": "DeepSeek-V4-Nano: Minimal config for testing and validation (~523M total params, ~200M active)",
5
+ "vocab_size": 129280,
6
+ "hidden_size": 1024,
7
+ "num_hidden_layers": 7,
8
+ "num_attention_heads": 16,
9
+ "q_lora_rank": 384,
10
+ "head_dim": 128,
11
+ "qk_rope_head_dim": 32,
12
+ "num_key_value_heads": 1,
13
+ "o_groups": 4,
14
+ "o_lora_rank": 256,
15
+ "window_size": 64,
16
+ "compress_ratios": [128, 4, 128, 4, 128, 4, 0],
17
+ "compress_rope_theta": 160000.0,
18
+ "index_n_heads": 16,
19
+ "index_head_dim": 64,
20
+ "index_topk": 128,
21
+ "moe_intermediate_size": 1024,
22
+ "n_routed_experts": 8,
23
+ "n_shared_experts": 1,
24
+ "num_experts_per_tok": 2,
25
+ "num_hash_layers": 1,
26
+ "scoring_func": "sqrtsoftplus",
27
+ "topk_method": "noaux_tc",
28
+ "norm_topk_prob": true,
29
+ "routed_scaling_factor": 2.5,
30
+ "swiglu_limit": 10.0,
31
+ "expert_dtype": "bf16",
32
+ "hc_mult": 4,
33
+ "hc_sinkhorn_iters": 10,
34
+ "hc_eps": 1e-6,
35
+ "num_nextn_predict_layers": 1,
36
+ "rms_norm_eps": 1e-6,
37
+ "hidden_act": "silu",
38
+ "rope_theta": 10000.0,
39
+ "rope_scaling": {
40
+ "type": "yarn",
41
+ "factor": 4,
42
+ "original_max_position_embeddings": 4096,
43
+ "beta_fast": 32,
44
+ "beta_slow": 1
45
+ },
46
+ "max_position_embeddings": 16384,
47
+ "initializer_range": 0.02,
48
+ "use_cache": true,
49
+ "tie_word_embeddings": false,
50
+ "bos_token_id": 0,
51
+ "eos_token_id": 1,
52
+ "torch_dtype": "float32",
53
+ "attention_bias": false,
54
+ "attention_dropout": 0.0
55
+ }