File size: 4,623 Bytes
963e33f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{
  "architectures": [
    "Glm5NextForConditionalGeneration"
  ],
  "text_config": {
    "attention_bias": false,
    "attention_dropout": 0.0,
    "dtype": "bfloat16",
    "eos_token_id": [
      154820,
      154827,
      154829
    ],
    "first_k_dense_replace": 3,
    "hc_eps": 1e-06,
    "hc_mult": 4,
    "hc_sinkhorn_iters": 20,
    "head_dim": 0,
    "hidden_act": "silu",
    "hidden_size": 256,
    "index_head_dim": 128,
    "index_kpool": 4,
    "index_kpool_always_select_tail": true,
    "index_kpool_compress": true,
    "index_n_heads": 32,
    "index_topk": 2048,
    "index_share_for_mtp_iteration": true,
    "indexer_rope_interleave": true,
    "indexer_types": [
      "full",
      "full",
      "full",
      "full"
    ],
    "initializer_range": 0.02,
    "intermediate_size": 12288,
    "kv_lora_rank": 512,
    "layer_types": [
      "linear_attention",
      "linear_attention",
      "linear_attention",
      "deepseek_sparse_attention"
    ],
    "linear_attn_config": {
      "num_heads": 64,
      "gate_lower_bound": -5.0,
      "head_dim": 128,
      "short_conv_kernel_size": 4,
      "kda_layers": [
        0,
        1,
        2
      ],
      "full_attn_layers": [
        3
      ]
    },
    "max_position_embeddings": 8192,
    "mhc": true,
    "mla_use_nope": true,
    "mlp_layer_types": [
      "dense",
      "dense",
      "dense",
      "sparse"
    ],
    "model_type": "glm5_next_text",
    "moe_intermediate_size": 2048,
    "moe_router_dtype": "float32",
    "n_group": 1,
    "n_routed_experts": 288,
    "n_shared_experts": 1,
    "norm_topk_prob": true,
    "num_attention_heads": 64,
    "num_experts_per_tok": 8,
    "num_hidden_layers": 4,
    "num_key_value_heads": 64,
    "num_nextn_predict_layers": 1,
    "output_router_logits": false,
    "pad_token_id": 154820,
    "q_lora_rank": 1536,
    "qk_head_dim": 256,
    "qk_nope_head_dim": 256,
    "qk_rope_head_dim": 0,
    "rms_norm_eps": 1e-05,
    "routed_scaling_factor": 2.5,
    "router_aux_loss_coef": 0.001,
    "scoring_func": "sigmoid",
    "swiglu_limit": 10.0,
    "tie_word_embeddings": false,
    "topk_group": 1,
    "topk_method": "noaux_tc",
    "use_cache": true,
    "v_head_dim": 256,
    "vocab_size": 154880
  },
  "vision_config": {
    "attention_bias": true,
    "attention_dropout": 0.0,
    "depth": 1,
    "hidden_act": "silu",
    "hidden_size": 128,
    "image_size": 56,
    "in_channels": 3,
    "initializer_range": 0.02,
    "intermediate_size": 256,
    "model_type": "glm5_next_vision",
    "num_heads": 4,
    "out_hidden_size": 256,
    "patch_size": 14,
    "projection_intermediate_size": 512,
    "rms_norm_eps": 1e-05,
    "spatial_merge_size": 2,
    "swiglu_limit": 10.0,
    "temporal_patch_size": 2
  },
  "image_token_id": 154854,
  "video_token_id": 154855,
  "image_start_token_id": 154830,
  "image_end_token_id": 154831,
  "video_start_token_id": 154832,
  "video_end_token_id": 154833,
  "tie_word_embeddings": false,
  "model_type": "glm5_next",
  "transformers_version": "5.16.0",
  "quantization_config": {
    "config_groups": {
      "group_0": {
        "targets": [
          "Linear"
        ],
        "weights": {
          "num_bits": 4,
          "type": "float",
          "group_size": 16,
          "dynamic": false,
          "symmetric": true
        },
        "input_activations": null,
        "output_activations": null
      }
    },
    "quant_algo": "NVFP4",
    "kv_cache_scheme": null,
    "producer": {
      "name": "modelopt",
      "version": "0.45.0"
    },
    "quant_method": "modelopt",
    "ignore": [
      "lm_head",
      "model.language_model.embed_tokens",
      "*.self_attn.in_proj_qkvbfg_a",
      "*.self_attn.q_proj",
      "*.self_attn.k_proj",
      "*.self_attn.v_proj",
      "*.self_attn.b_proj",
      "*.self_attn.f_a_proj",
      "*.self_attn.g_a_proj",
      "*.self_attn.f_b_proj",
      "*.self_attn.g_b_proj",
      "*.self_attn.fused_qkv_a_proj",
      "*.self_attn.q_a_proj",
      "*.self_attn.kv_a_proj_with_mqa",
      "*.self_attn.q_b_proj",
      "*.self_attn.kv_b_proj",
      "*.self_attn.indexer.wk_weights_proj",
      "*.self_attn.indexer.wk",
      "*.self_attn.indexer.weights_proj",
      "*.self_attn.indexer.wq_b",
      "*.self_attn.o_proj",
      "*.mlp.gate",
      "*.mlp.gate_up_proj",
      "*.mlp.down_proj",
      "*.mlp.shared_experts.gate_up_proj",
      "*.mlp.shared_experts.down_proj",
      "*.mlp.shared_experts.gate_proj",
      "*.mlp.shared_experts.up_proj",
      "*.mlp.gate_proj",
      "*.mlp.up_proj",
      "*.eh_proj",
      "model.visual.*"
    ]
  }
}