inarikami commited on
Commit
fe67b9a
·
verified ·
1 Parent(s): 540e926

upload config data

Browse files
Files changed (2) hide show
  1. config.json +83 -0
  2. configscript.sh +7 -0
config.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "mlp_bias": false,
3
+ "attn_bias": false,
4
+ "rotary_base": 10000,
5
+ "rotary_scaling": {
6
+ "beta_fast": 32,
7
+ "beta_slow": 1,
8
+ "factor": 40,
9
+ "mscale": 1.0,
10
+ "mscale_all_dim": 1.0,
11
+ "original_max_position_embeddings": 4096,
12
+ "type": "yarn"
13
+ },
14
+ "residual_mlp": false,
15
+ "disable_weight_only_quant_plugin": false,
16
+ "moe": {
17
+ "num_experts": 256,
18
+ "shared_expert_intermediate_size": 2048,
19
+ "top_k": 8,
20
+ "normalization_mode": 3,
21
+ "sparse_mixer_epsilon": 0.01,
22
+ "tp_mode": 0,
23
+ "topk_method": 2,
24
+ "device_limited_n_group": 8,
25
+ "device_limited_topk_group": 4,
26
+ "device_limited_routed_scaling_factor": 2.5
27
+ },
28
+ "remove_duplicated_kv_heads": false,
29
+ "fc_after_embed": false,
30
+ "use_input_layernorm_in_first_layer": true,
31
+ "use_last_layernorm": true,
32
+ "layer_idx_offset": 0,
33
+ "architecture": "DeepseekV2ForCausalLM",
34
+ "dtype": "bfloat16",
35
+ "vocab_size": 129280,
36
+ "hidden_size": 7168,
37
+ "num_hidden_layers": 61,
38
+ "num_attention_heads": 128,
39
+ "hidden_act": "swiglu",
40
+ "logits_dtype": "float32",
41
+ "norm_epsilon": 1e-06,
42
+ "runtime_defaults": null,
43
+ "position_embedding_type": "rope_gpt_neox",
44
+ "num_key_value_heads": 128,
45
+ "intermediate_size": 18432,
46
+ "max_position_embeddings": 163840,
47
+ "mapping": {
48
+ "world_size": 4,
49
+ "gpus_per_node": 8,
50
+ "cp_size": 1,
51
+ "tp_size": 4,
52
+ "pp_size": 1,
53
+ "moe_tp_size": 4,
54
+ "moe_ep_size": 1
55
+ },
56
+ "quantization": {
57
+ "quant_algo": "W4A16",
58
+ "kv_cache_quant_algo": null,
59
+ "group_size": 128,
60
+ "smoothquant_val": 0.5,
61
+ "clamp_val": null,
62
+ "use_meta_recipe": false,
63
+ "has_zero_point": false,
64
+ "pre_quant_scale": false,
65
+ "exclude_modules": null
66
+ },
67
+ "use_parallel_embedding": false,
68
+ "embedding_sharding_dim": 0,
69
+ "head_size": 56,
70
+ "qk_layernorm": false,
71
+ "rotary_embedding_dim": 56,
72
+ "moe_inter_size": 2048,
73
+ "kv_lora_rank": 512,
74
+ "q_lora_rank": 1536,
75
+ "qk_nope_head_dim": 128,
76
+ "qk_rope_head_dim": 64,
77
+ "v_head_dim": 128,
78
+ "topk_method": "noaux_tc",
79
+ "first_k_dense_replace": 3,
80
+ "moe_layer_freq": 1,
81
+ "coring_func": "sigmoid",
82
+ "fp8_format": false
83
+ }
configscript.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ python convert_checkpoint.py --model_dir /home/user/hf/deepseek-v3-bf16 \
2
+ --output_dir /home/user/hf/deepseek-v3-int4 \
3
+ --dtype bfloat16 \
4
+ --tp_size 4 \
5
+ --use_weight_only \
6
+ --weight_only_precision int4 \
7
+ --workers 4