Commit ·
e087901
1
Parent(s): 48d7b98
new weights
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- config.json +6 -1
- configuration_glm4_moe.py +243 -0
- model-00001-of-00048.safetensors +3 -0
- model-00002-of-00048.safetensors +3 -0
- model-00003-of-00048.safetensors +3 -0
- model-00004-of-00048.safetensors +3 -0
- model-00005-of-00048.safetensors +3 -0
- model-00006-of-00048.safetensors +3 -0
- model-00007-of-00048.safetensors +3 -0
- model-00008-of-00048.safetensors +3 -0
- model-00009-of-00048.safetensors +3 -0
- model-00010-of-00048.safetensors +3 -0
- model-00011-of-00048.safetensors +3 -0
- model-00012-of-00048.safetensors +3 -0
- model-00013-of-00048.safetensors +3 -0
- model-00014-of-00048.safetensors +3 -0
- model-00015-of-00048.safetensors +3 -0
- model-00016-of-00048.safetensors +3 -0
- model-00017-of-00048.safetensors +3 -0
- model-00018-of-00048.safetensors +3 -0
- model-00019-of-00048.safetensors +3 -0
- model-00020-of-00048.safetensors +3 -0
- model-00021-of-00048.safetensors +3 -0
- model-00022-of-00048.safetensors +3 -0
- model-00023-of-00048.safetensors +3 -0
- model-00024-of-00048.safetensors +3 -0
- model-00025-of-00048.safetensors +3 -0
- model-00026-of-00048.safetensors +3 -0
- model-00027-of-00048.safetensors +3 -0
- model-00028-of-00048.safetensors +3 -0
- model-00029-of-00048.safetensors +3 -0
- model-00030-of-00048.safetensors +3 -0
- model-00031-of-00048.safetensors +3 -0
- model-00032-of-00048.safetensors +3 -0
- model-00033-of-00048.safetensors +3 -0
- model-00034-of-00048.safetensors +3 -0
- model-00035-of-00048.safetensors +3 -0
- model-00036-of-00048.safetensors +3 -0
- model-00037-of-00048.safetensors +3 -0
- model-00038-of-00048.safetensors +3 -0
- model-00039-of-00048.safetensors +3 -0
- model-00040-of-00048.safetensors +3 -0
- model-00041-of-00048.safetensors +3 -0
- model-00042-of-00048.safetensors +3 -0
- model-00043-of-00048.safetensors +3 -0
- model-00044-of-00048.safetensors +3 -0
- model-00045-of-00048.safetensors +3 -0
- model-00046-of-00048.safetensors +3 -0
- model-00047-of-00048.safetensors +3 -0
- model-00048-of-00048.safetensors +3 -0
config.json
CHANGED
|
@@ -2,6 +2,11 @@
|
|
| 2 |
"architectures": [
|
| 3 |
"Glm4MoeForCausalLM"
|
| 4 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"attention_bias": true,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"pad_token_id": 151329,
|
|
@@ -40,4 +45,4 @@
|
|
| 40 |
"use_cache": true,
|
| 41 |
"use_qk_norm": false,
|
| 42 |
"vocab_size": 151552
|
| 43 |
-
}
|
|
|
|
| 2 |
"architectures": [
|
| 3 |
"Glm4MoeForCausalLM"
|
| 4 |
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoConfig": "configuration_glm4_moe.Glm4MoeConfig",
|
| 7 |
+
"AutoModelForCausalLM": "modeling_glm4_moe.Glm4MoeForCausalLM",
|
| 8 |
+
"AutoModel": "modeling_glm4_moe.Glm4MoeModel"
|
| 9 |
+
},
|
| 10 |
"attention_bias": true,
|
| 11 |
"attention_dropout": 0.0,
|
| 12 |
"pad_token_id": 151329,
|
|
|
|
| 45 |
"use_cache": true,
|
| 46 |
"use_qk_norm": false,
|
| 47 |
"vocab_size": 151552
|
| 48 |
+
}
|
configuration_glm4_moe.py
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨��🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨��🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/glm4_moe/modular_glm4_moe.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_glm4_moe.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# coding=utf-8
|
| 8 |
+
# Copyright 2025 The ZhipuAI Inc. team and HuggingFace Inc. team. All rights reserved.
|
| 9 |
+
#
|
| 10 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 11 |
+
# you may not use this file except in compliance with the License.
|
| 12 |
+
# You may obtain a copy of the License at
|
| 13 |
+
#
|
| 14 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 15 |
+
#
|
| 16 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 17 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 18 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 19 |
+
# See the License for the specific language governing permissions and
|
| 20 |
+
# limitations under the License.
|
| 21 |
+
|
| 22 |
+
from transformers.configuration_utils import PretrainedConfig
|
| 23 |
+
from transformers.modeling_rope_utils import rope_config_validation
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class Glm4MoeConfig(PretrainedConfig):
|
| 27 |
+
r"""
|
| 28 |
+
This is the configuration class to store the configuration of a [`Glm4MoeModel`]. It is used to instantiate a
|
| 29 |
+
Glm4Moe model according to the specified arguments, defining the model architecture. Instantiating a configuration
|
| 30 |
+
with the defaults will yield a similar configuration to that of [THUDM/GLM-4-100B-A10B](https://huggingface.co/THUDM/GLM-4-100B-A10B).
|
| 31 |
+
|
| 32 |
+
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
|
| 33 |
+
documentation from [`PretrainedConfig`] for more information.
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
Args:
|
| 37 |
+
vocab_size (`int`, *optional*, defaults to 151552):
|
| 38 |
+
Vocabulary size of the Glm4Moe model. Defines the number of different tokens that can be represented by the
|
| 39 |
+
`inputs_ids` passed when calling [`Glm4MoeModel`]
|
| 40 |
+
hidden_size (`int`, *optional*, defaults to 4096):
|
| 41 |
+
Dimension of the hidden representations.
|
| 42 |
+
intermediate_size (`int`, *optional*, defaults to 10944):
|
| 43 |
+
Dimension of the MLP representations.
|
| 44 |
+
num_hidden_layers (`int`, *optional*, defaults to 46):
|
| 45 |
+
Number of hidden layers in the Transformer encoder.
|
| 46 |
+
num_attention_heads (`int`, *optional*, defaults to 96):
|
| 47 |
+
Number of attention heads for each attention layer in the Transformer encoder.
|
| 48 |
+
partial_rotary_factor (`float`, *optional*, defaults to 0.5):
|
| 49 |
+
The factor of the partial rotary position.
|
| 50 |
+
num_key_value_heads (`int`, *optional*, defaults to 8):
|
| 51 |
+
This is the number of key_value heads that should be used to implement Grouped Query Attention. If
|
| 52 |
+
`num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
|
| 53 |
+
`num_key_value_heads=1` the model will use Multi Query Attention (MQA) otherwise GQA is used. When
|
| 54 |
+
converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
|
| 55 |
+
by meanpooling all the original heads within that group. For more details, check out [this
|
| 56 |
+
paper](https://huggingface.co/papers/2305.13245). If it is not specified, will default to `32`.
|
| 57 |
+
|
| 58 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
|
| 59 |
+
The non-linear activation function (function or string) in the decoder.
|
| 60 |
+
max_position_embeddings (`int`, *optional*, defaults to 131072):
|
| 61 |
+
The maximum sequence length that this model might ever be used with.
|
| 62 |
+
initializer_range (`float`, *optional*, defaults to 0.02):
|
| 63 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
| 64 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-05):
|
| 65 |
+
The epsilon used by the rms normalization layers.
|
| 66 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
| 67 |
+
Whether or not the model should return the last key/values attentions (not used by all models). Only
|
| 68 |
+
relevant if `config.is_decoder=True`.
|
| 69 |
+
tie_word_embeddings (`bool`, *optional*, defaults to `False`):
|
| 70 |
+
Whether the model's input and output word embeddings should be tied.
|
| 71 |
+
rope_theta (`float`, *optional*, defaults to 10000.0):
|
| 72 |
+
The base period of the RoPE embeddings.
|
| 73 |
+
rope_scaling (`Dict`, *optional*):
|
| 74 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type
|
| 75 |
+
and you expect the model to work on longer `max_position_embeddings`, we recommend you to update this value
|
| 76 |
+
accordingly.
|
| 77 |
+
Expected contents:
|
| 78 |
+
`rope_type` (`str`):
|
| 79 |
+
The sub-variant of RoPE to use. Can be one of ['default', 'linear', 'dynamic', 'yarn', 'longrope',
|
| 80 |
+
'llama3'], with 'default' being the original RoPE implementation.
|
| 81 |
+
`factor` (`float`, *optional*):
|
| 82 |
+
Used with all rope types except 'default'. The scaling factor to apply to the RoPE embeddings. In
|
| 83 |
+
most scaling types, a `factor` of x will enable the model to handle sequences of length x *
|
| 84 |
+
original maximum pre-trained length.
|
| 85 |
+
`original_max_position_embeddings` (`int`, *optional*):
|
| 86 |
+
Used with 'dynamic', 'longrope' and 'llama3'. The original max position embeddings used during
|
| 87 |
+
pretraining.
|
| 88 |
+
`attention_factor` (`float`, *optional*):
|
| 89 |
+
Used with 'yarn' and 'longrope'. The scaling factor to be applied on the attention
|
| 90 |
+
computation. If unspecified, it defaults to value recommended by the implementation, using the
|
| 91 |
+
`factor` field to infer the suggested value.
|
| 92 |
+
`beta_fast` (`float`, *optional*):
|
| 93 |
+
Only used with 'yarn'. Parameter to set the boundary for extrapolation (only) in the linear
|
| 94 |
+
ramp function. If unspecified, it defaults to 32.
|
| 95 |
+
`beta_slow` (`float`, *optional*):
|
| 96 |
+
Only used with 'yarn'. Parameter to set the boundary for interpolation (only) in the linear
|
| 97 |
+
ramp function. If unspecified, it defaults to 1.
|
| 98 |
+
`short_factor` (`list[float]`, *optional*):
|
| 99 |
+
Only used with 'longrope'. The scaling factor to be applied to short contexts (<
|
| 100 |
+
`original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
|
| 101 |
+
size divided by the number of attention heads divided by 2
|
| 102 |
+
`long_factor` (`list[float]`, *optional*):
|
| 103 |
+
Only used with 'longrope'. The scaling factor to be applied to long contexts (<
|
| 104 |
+
`original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
|
| 105 |
+
size divided by the number of attention heads divided by 2
|
| 106 |
+
`low_freq_factor` (`float`, *optional*):
|
| 107 |
+
Only used with 'llama3'. Scaling factor applied to low frequency components of the RoPE
|
| 108 |
+
`high_freq_factor` (`float`, *optional*):
|
| 109 |
+
Only used with 'llama3'. Scaling factor applied to high frequency components of the RoPE
|
| 110 |
+
attention_bias (`bool`, defaults to `False`, *optional*, defaults to `False`):
|
| 111 |
+
Whether to use a bias in the query, key, value and output projection layers during self-attention.
|
| 112 |
+
attention_dropout (`float`, *optional*, defaults to 0.0):
|
| 113 |
+
The dropout ratio for the attention probabilities.
|
| 114 |
+
moe_intermediate_size (`int`, *optional*, defaults to 1408):
|
| 115 |
+
Intermediate size of the routed expert.
|
| 116 |
+
num_experts_per_tok (`int`, *optional*, defaults to 8):
|
| 117 |
+
number of experts per token.
|
| 118 |
+
n_shared_experts (`int`, *optional*, defaults to 1):
|
| 119 |
+
Number of shared experts.
|
| 120 |
+
n_routed_experts (`int`, *optional*, defaults to 128):
|
| 121 |
+
Number of routed experts.
|
| 122 |
+
routed_scaling_factor (`float`, *optional*, defaults to 1.0):
|
| 123 |
+
Scaling factor or routed experts.
|
| 124 |
+
n_group (`int`, *optional*, defaults to 1):
|
| 125 |
+
Number of groups for routed experts.
|
| 126 |
+
topk_group (`int`, *optional*, defaults to 1):
|
| 127 |
+
Number of selected groups for each token(for each token, ensuring the selected experts is only within `topk_group` groups).
|
| 128 |
+
first_k_dense_replace (`int`, *optional*, defaults to 1):
|
| 129 |
+
Number of dense layers in shallow layers(embed->dense->dense->...->dense->moe->moe...->lm_head).
|
| 130 |
+
\--k dense layers--/
|
| 131 |
+
norm_topk_prob (`bool`, *optional*, defaults to `True`):
|
| 132 |
+
Whether to normalize the topk probabilities.
|
| 133 |
+
use_qk_norm (`bool`, *optional*, defaults to `False`):
|
| 134 |
+
Whether to use query-key normalization in the attention
|
| 135 |
+
```python
|
| 136 |
+
>>> from transformers import Glm4MoeModel, Glm4MoeConfig
|
| 137 |
+
|
| 138 |
+
>>> # Initializing a Glm4Moe style configuration
|
| 139 |
+
>>> configuration = Glm4MoeConfig()
|
| 140 |
+
|
| 141 |
+
>>> # Initializing a model from the GLM-4-MOE-100B-A10B style configuration
|
| 142 |
+
>>> model = Glm4MoeModel(configuration)
|
| 143 |
+
|
| 144 |
+
>>> # Accessing the model configuration
|
| 145 |
+
>>> configuration = model.config
|
| 146 |
+
```"""
|
| 147 |
+
|
| 148 |
+
model_type = "glm4_moe"
|
| 149 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 150 |
+
|
| 151 |
+
# Default tensor parallel plan for base model `Glm4Moe`
|
| 152 |
+
base_model_tp_plan = {
|
| 153 |
+
"layers.*.self_attn.q_proj": "colwise",
|
| 154 |
+
"layers.*.self_attn.k_proj": "colwise",
|
| 155 |
+
"layers.*.self_attn.v_proj": "colwise",
|
| 156 |
+
"layers.*.self_attn.o_proj": "rowwise",
|
| 157 |
+
"layers.*.mlp.experts.*.gate_proj": "colwise",
|
| 158 |
+
"layers.*.mlp.experts.*.up_proj": "colwise",
|
| 159 |
+
"layers.*.mlp.experts.*.down_proj": "rowwise",
|
| 160 |
+
"layers.*.mlp.gate_proj": "colwise",
|
| 161 |
+
"layers.*.mlp.up_proj": "colwise",
|
| 162 |
+
"layers.*.mlp.down_proj": "rowwise",
|
| 163 |
+
}
|
| 164 |
+
base_model_pp_plan = {
|
| 165 |
+
"embed_tokens": (["input_ids"], ["inputs_embeds"]),
|
| 166 |
+
"layers": (["hidden_states", "attention_mask"], ["hidden_states"]),
|
| 167 |
+
"norm": (["hidden_states"], ["hidden_states"]),
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
def __init__(
|
| 171 |
+
self,
|
| 172 |
+
vocab_size=151552,
|
| 173 |
+
hidden_size=4096,
|
| 174 |
+
intermediate_size=10944,
|
| 175 |
+
num_hidden_layers=46,
|
| 176 |
+
num_attention_heads=96,
|
| 177 |
+
partial_rotary_factor=0.5,
|
| 178 |
+
num_key_value_heads=8,
|
| 179 |
+
hidden_act="silu",
|
| 180 |
+
max_position_embeddings=131072,
|
| 181 |
+
initializer_range=0.02,
|
| 182 |
+
rms_norm_eps=1e-5,
|
| 183 |
+
use_cache=True,
|
| 184 |
+
tie_word_embeddings=False,
|
| 185 |
+
rope_theta=10000.0,
|
| 186 |
+
rope_scaling=None,
|
| 187 |
+
attention_bias=False,
|
| 188 |
+
attention_dropout=0.0,
|
| 189 |
+
moe_intermediate_size=1408,
|
| 190 |
+
num_experts_per_tok=8,
|
| 191 |
+
n_shared_experts=1,
|
| 192 |
+
n_routed_experts=128,
|
| 193 |
+
routed_scaling_factor=1.0,
|
| 194 |
+
n_group=1,
|
| 195 |
+
topk_group=1,
|
| 196 |
+
first_k_dense_replace=1,
|
| 197 |
+
norm_topk_prob=True,
|
| 198 |
+
use_qk_norm=False,
|
| 199 |
+
**kwargs,
|
| 200 |
+
):
|
| 201 |
+
self.vocab_size = vocab_size
|
| 202 |
+
self.max_position_embeddings = max_position_embeddings
|
| 203 |
+
self.hidden_size = hidden_size
|
| 204 |
+
self.intermediate_size = intermediate_size
|
| 205 |
+
self.num_hidden_layers = num_hidden_layers
|
| 206 |
+
self.num_attention_heads = num_attention_heads
|
| 207 |
+
self.partial_rotary_factor = partial_rotary_factor
|
| 208 |
+
|
| 209 |
+
self.num_key_value_heads = num_key_value_heads
|
| 210 |
+
self.hidden_act = hidden_act
|
| 211 |
+
self.initializer_range = initializer_range
|
| 212 |
+
self.rms_norm_eps = rms_norm_eps
|
| 213 |
+
self.use_cache = use_cache
|
| 214 |
+
self.rope_theta = rope_theta
|
| 215 |
+
self.rope_scaling = rope_scaling
|
| 216 |
+
self.attention_bias = attention_bias
|
| 217 |
+
self.attention_dropout = attention_dropout
|
| 218 |
+
# Validate the correctness of rotary position embeddings parameters
|
| 219 |
+
# BC: if there is a 'type' field, move it to 'rope_type'.
|
| 220 |
+
if self.rope_scaling is not None and "type" in self.rope_scaling:
|
| 221 |
+
self.rope_scaling["rope_type"] = self.rope_scaling["type"]
|
| 222 |
+
rope_config_validation(self)
|
| 223 |
+
|
| 224 |
+
# MoE arguments
|
| 225 |
+
self.moe_intermediate_size = moe_intermediate_size
|
| 226 |
+
self.num_experts_per_tok = num_experts_per_tok
|
| 227 |
+
self.n_group = n_group
|
| 228 |
+
self.topk_group = topk_group
|
| 229 |
+
self.n_shared_experts = n_shared_experts
|
| 230 |
+
self.n_routed_experts = n_routed_experts
|
| 231 |
+
self.routed_scaling_factor = routed_scaling_factor
|
| 232 |
+
self.first_k_dense_replace = first_k_dense_replace
|
| 233 |
+
self.norm_topk_prob = norm_topk_prob
|
| 234 |
+
self.use_qk_norm = use_qk_norm
|
| 235 |
+
|
| 236 |
+
super().__init__(
|
| 237 |
+
tie_word_embeddings=tie_word_embeddings,
|
| 238 |
+
**kwargs,
|
| 239 |
+
)
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
__all__ = ["Glm4MoeConfig"]
|
| 243 |
+
|
model-00001-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0ada32b602a36368834bdb626e6d46856996c182c2a19de8e76fce185dc5f60
|
| 3 |
+
size 2483036488
|
model-00002-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb5056ec2f9e8387135e5f53315f2cfefd0ceb20645c1f5252ab902371294c86
|
| 3 |
+
size 487109984
|
model-00003-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8afbc1342adcd07c5020a6a5ceb37732dfd4b1d0a989bd42995d9de0fc8487b3
|
| 3 |
+
size 4682987928
|
model-00004-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:839c7fbca12e9cb2ee36a14ff019b2371cbcc06b445ba216d7ba8b778ee56174
|
| 3 |
+
size 4682987928
|
model-00005-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a58383778b80452b1f169f50f245064467b5e32c37a633755d961c8375f8bbbf
|
| 3 |
+
size 4682987928
|
model-00006-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d66fde38a7db40704ddf670b60d004a3beafb2550299b6087066f35974dcf5e
|
| 3 |
+
size 4682987928
|
model-00007-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b3ef04b48e9be042a430535ee56b3b2cc4128c8f4a5629906ae60fa12a8dfb9
|
| 3 |
+
size 4682987928
|
model-00008-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b64161a3f752a54a8c6622facb73f5fc2fb478f15fdcfbea56533b7485b583f
|
| 3 |
+
size 4682987928
|
model-00009-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:050cca1c4c0429a9e2bcd8f8c21d389df510d9c1240a9f722bbe5dd704a6be99
|
| 3 |
+
size 4682987928
|
model-00010-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96da357bcf286be1ea6c942dbc63e297570339c2800399f7140a8494ea3de5df
|
| 3 |
+
size 4682987928
|
model-00011-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9093aea877fefaea6087a218cc7ffb154ed88d03cc3f2195af6b084f81fc7c1c
|
| 3 |
+
size 4682987928
|
model-00012-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1760cf4d10ed6929cb888dbf128c10852f53d2e5486ec1c10eb8f37fb7f23ca1
|
| 3 |
+
size 4682987944
|
model-00013-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1045819da1f453f943246137f81b65efc69c6e709ea0f3b03a29dd666fba45d6
|
| 3 |
+
size 4682987944
|
model-00014-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22f1c17f4628d5b015cfdb434d708e25183a0f6d52c747447846556c5c35126e
|
| 3 |
+
size 4682987944
|
model-00015-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a37c9130da041aa51f342cb969fa23ed1c60b66aa153eb29cac8d6abdea7716
|
| 3 |
+
size 4682987944
|
model-00016-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0be610c454213834f3cc8f9e5d0c5313a0a6db44abc995cd4b513014793bafe8
|
| 3 |
+
size 4682987944
|
model-00017-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b513bba5217708614cdc48b237e4d64fc853986b329b309f3a153ff95bef9c35
|
| 3 |
+
size 4682987944
|
model-00018-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4e82d76159e7f5128b5340ead3e9853da927a6fe8c1d942d91fad47dce4e401
|
| 3 |
+
size 4682987944
|
model-00019-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:080269243c47dd984069038c0d9b9523dddd28af118a01a75e7d24e0ae473348
|
| 3 |
+
size 4682987944
|
model-00020-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91fb00fd19d1a0edca3852b78c1da976f5485d07eb85c97555b8d2a83208eefc
|
| 3 |
+
size 4682987944
|
model-00021-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:680b497a3fba4f46ba2e58b3d6e42cc3e24759201dc8508d6796635336f40b9f
|
| 3 |
+
size 4682987944
|
model-00022-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ecf8a45e1bf6090b955e2950e3502c9190fbc10151659f3877d7e82a469d6a06
|
| 3 |
+
size 4682987944
|
model-00023-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1719291693a9a86b7ddfc084d9c5766fe1506d1e8085d18159c528834c768faa
|
| 3 |
+
size 4682987944
|
model-00024-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8073d3fef1e7b5a2cf4957e0aff920934b4c83307bdb364abda5acf388f2543c
|
| 3 |
+
size 4682987944
|
model-00025-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c1463c72b386cf18adc5d3f62741972a631f786f62dfd4c9e1bbda883236850
|
| 3 |
+
size 4682987944
|
model-00026-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b2910fb780f3264214c8412f4e884bf5f7db91271298f5fe9fec8497d94fa7f
|
| 3 |
+
size 4682987944
|
model-00027-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1e3d1f2070e9fd8060e2ccdec34987a0f1db6dd3c1eed3ba88648cdd8a4e719b
|
| 3 |
+
size 4682987944
|
model-00028-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9db84ae7f4c2f508c4f9747a65bb0531fcdf55328cbda889a39dffe2972c90c4
|
| 3 |
+
size 4682987944
|
model-00029-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30478b2ef5afc1a81c03104fb48b599bae0dc9fd2ace5b48deb154fdb7d09187
|
| 3 |
+
size 4682987944
|
model-00030-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53e3df03122659c73c85b773baa50e21c801908a765bcb82f9d2b0cfc3ce6188
|
| 3 |
+
size 4682987944
|
model-00031-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2684b44e2277a2b4196930f8c44d7b2b632d9b0413a5f91881df5a21ce91b98
|
| 3 |
+
size 4682987944
|
model-00032-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:832f086aeea724d81096328c2259f91d85b7dbddcfa7b57b119102dead554a80
|
| 3 |
+
size 4682987944
|
model-00033-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03f861d2aaf6f77b3d7eb4ac47a929b702ab1392d513d83631217a949965fe2f
|
| 3 |
+
size 4682987944
|
model-00034-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd2148823bc4bc25c5822a8601a4e2726c73fdd908516cd166261638f27bda1f
|
| 3 |
+
size 4682987944
|
model-00035-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ed3a44b1b66693114c5d1c3fb3116298dc6e839dc31b8b031f89c608927efe1
|
| 3 |
+
size 4682987944
|
model-00036-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:782b01077392587c286d8d537043f08146b5c909efa5d05f86055d0aef95ac72
|
| 3 |
+
size 4682987944
|
model-00037-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc77e0b723bafe2fbe573431270bcbd979757d1528567fb2f418a978f7c652b2
|
| 3 |
+
size 4682987944
|
model-00038-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:370915c6f37ffcd50a9a3d60bc971af933ae76f273e47b7f479c39a63c8b87d6
|
| 3 |
+
size 4682987944
|
model-00039-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7179e0c3f7762c32833bc83fdf4f9b23b3b813235322a4ef7fcfbd0f1a28cb9c
|
| 3 |
+
size 4682987944
|
model-00040-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0229c09e7451cee400cdf560b1d6a7783282f47417f2d9058dbe19fd82a2c792
|
| 3 |
+
size 4682987944
|
model-00041-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c998079cffa94f11a4a1153788f5df099d1cce8aced25ee5c6365ade6db88f5a
|
| 3 |
+
size 4682987944
|
model-00042-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82e7a7961dba1bd588e435904d77b1e075f050f5df9fadadc69568b48166ff3e
|
| 3 |
+
size 4682987944
|
model-00043-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d3fea0e9ea0fc4799409494cd7b5f36eb8eb179ae915188dc934fd7c3ac1ba5
|
| 3 |
+
size 4682987944
|
model-00044-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38f591265541ac7f49b369804a85b725c3abcf7758ce4bb722932ffa95ea5829
|
| 3 |
+
size 4682987944
|
model-00045-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4351c611e7fb1e461a7f22cd6efa53e61a7750678b2c3ac10d52d34821a234b6
|
| 3 |
+
size 4682987944
|
model-00046-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:808996721c7b746e409e1b350d287bd2c00a2a3560d5da30b279781ec260da65
|
| 3 |
+
size 4682987944
|
model-00047-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00e24e86a5e67d99029884f2d15c7f22d8aec48b76af1b5dd16d41e8997da1b6
|
| 3 |
+
size 4682987944
|
model-00048-of-00048.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9ea28aeeee5682183381c9cbb220ba8136dddd4b02719c51da53b1bfdbd6d23
|
| 3 |
+
size 7233150024
|