Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.  
							See raw diff
- config.json +59 -0
- configuration_deepseek.py +206 -0
- generation_config.json +9 -0
- model-00001-of-000055.safetensors +3 -0
- model-00002-of-000055.safetensors +3 -0
- model-00003-of-000055.safetensors +3 -0
- model-00004-of-000055.safetensors +3 -0
- model-00005-of-000055.safetensors +3 -0
- model-00006-of-000055.safetensors +3 -0
- model-00007-of-000055.safetensors +3 -0
- model-00008-of-000055.safetensors +3 -0
- model-00009-of-000055.safetensors +3 -0
- model-00010-of-000055.safetensors +3 -0
- model-00011-of-000055.safetensors +3 -0
- model-00012-of-000055.safetensors +3 -0
- model-00013-of-000055.safetensors +3 -0
- model-00014-of-000055.safetensors +3 -0
- model-00015-of-000055.safetensors +3 -0
- model-00016-of-000055.safetensors +3 -0
- model-00017-of-000055.safetensors +3 -0
- model-00018-of-000055.safetensors +3 -0
- model-00019-of-000055.safetensors +3 -0
- model-00020-of-000055.safetensors +3 -0
- model-00021-of-000055.safetensors +3 -0
- model-00022-of-000055.safetensors +3 -0
- model-00023-of-000055.safetensors +3 -0
- model-00024-of-000055.safetensors +3 -0
- model-00025-of-000055.safetensors +3 -0
- model-00026-of-000055.safetensors +3 -0
- model-00027-of-000055.safetensors +3 -0
- model-00028-of-000055.safetensors +3 -0
- model-00029-of-000055.safetensors +3 -0
- model-00030-of-000055.safetensors +3 -0
- model-00031-of-000055.safetensors +3 -0
- model-00032-of-000055.safetensors +3 -0
- model-00033-of-000055.safetensors +3 -0
- model-00034-of-000055.safetensors +3 -0
- model-00035-of-000055.safetensors +3 -0
- model-00036-of-000055.safetensors +3 -0
- model-00037-of-000055.safetensors +3 -0
- model-00038-of-000055.safetensors +3 -0
- model-00039-of-000055.safetensors +3 -0
- model-00040-of-000055.safetensors +3 -0
- model-00041-of-000055.safetensors +3 -0
- model-00042-of-000055.safetensors +3 -0
- model-00043-of-000055.safetensors +3 -0
- model-00044-of-000055.safetensors +3 -0
- model-00045-of-000055.safetensors +3 -0
- model-00046-of-000055.safetensors +3 -0
- model-00047-of-000055.safetensors +3 -0
    	
        config.json
    ADDED
    
    | @@ -0,0 +1,59 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "architectures": [
         | 
| 3 | 
            +
                "DeepseekForCausalLM"
         | 
| 4 | 
            +
              ],
         | 
| 5 | 
            +
              "attention_bias": false,
         | 
| 6 | 
            +
              "attention_dropout": 0.0,
         | 
| 7 | 
            +
              "auto_map": {
         | 
| 8 | 
            +
                "AutoConfig": "configuration_deepseek.DeepseekConfig",
         | 
| 9 | 
            +
                "AutoModel": "modeling_deepseek.DeepseekModel",
         | 
| 10 | 
            +
                "AutoModelForCausalLM": "modeling_deepseek.DeepseekForCausalLM"
         | 
| 11 | 
            +
              },
         | 
| 12 | 
            +
              "aux_loss_alpha": 0.001,
         | 
| 13 | 
            +
              "bos_token_id": 100000,
         | 
| 14 | 
            +
              "eos_token_id": 100001,
         | 
| 15 | 
            +
              "first_k_dense_replace": 1,
         | 
| 16 | 
            +
              "hidden_act": "silu",
         | 
| 17 | 
            +
              "hidden_size": 5120,
         | 
| 18 | 
            +
              "initializer_range": 0.02,
         | 
| 19 | 
            +
              "intermediate_size": 12288,
         | 
| 20 | 
            +
              "kv_lora_rank": 512,
         | 
| 21 | 
            +
              "max_position_embeddings": 163840,
         | 
| 22 | 
            +
              "model_type": "deepseek",
         | 
| 23 | 
            +
              "moe_intermediate_size": 1536,
         | 
| 24 | 
            +
              "moe_layer_freq": 1,
         | 
| 25 | 
            +
              "n_group": 8,
         | 
| 26 | 
            +
              "n_routed_experts": 160,
         | 
| 27 | 
            +
              "n_shared_experts": 2,
         | 
| 28 | 
            +
              "norm_topk_prob": false,
         | 
| 29 | 
            +
              "num_attention_heads": 128,
         | 
| 30 | 
            +
              "num_experts_per_tok": 6,
         | 
| 31 | 
            +
              "num_hidden_layers": 60,
         | 
| 32 | 
            +
              "num_key_value_heads": 128,
         | 
| 33 | 
            +
              "pretraining_tp": 1,
         | 
| 34 | 
            +
              "q_lora_rank": 1536,
         | 
| 35 | 
            +
              "qk_nope_head_dim": 128,
         | 
| 36 | 
            +
              "qk_rope_head_dim": 64,
         | 
| 37 | 
            +
              "rms_norm_eps": 1e-06,
         | 
| 38 | 
            +
              "rope_scaling": {
         | 
| 39 | 
            +
                "beta_fast": 32,
         | 
| 40 | 
            +
                "beta_slow": 1,
         | 
| 41 | 
            +
                "factor": 40,
         | 
| 42 | 
            +
                "mscale": 0.707,
         | 
| 43 | 
            +
                "mscale_all_dim": 0.707,
         | 
| 44 | 
            +
                "original_max_position_embeddings": 4096,
         | 
| 45 | 
            +
                "type": "yarn"
         | 
| 46 | 
            +
              },
         | 
| 47 | 
            +
              "rope_theta": 10000,
         | 
| 48 | 
            +
              "routed_scaling_factor": 16.0,
         | 
| 49 | 
            +
              "scoring_func": "softmax",
         | 
| 50 | 
            +
              "seq_aux": true,
         | 
| 51 | 
            +
              "tie_word_embeddings": false,
         | 
| 52 | 
            +
              "topk_group": 3,
         | 
| 53 | 
            +
              "topk_method": "group_limited_greedy",
         | 
| 54 | 
            +
              "torch_dtype": "bfloat16",
         | 
| 55 | 
            +
              "transformers_version": "4.39.3",
         | 
| 56 | 
            +
              "use_cache": true,
         | 
| 57 | 
            +
              "v_head_dim": 128,
         | 
| 58 | 
            +
              "vocab_size": 102400
         | 
| 59 | 
            +
            }
         | 
    	
        configuration_deepseek.py
    ADDED
    
    | @@ -0,0 +1,206 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            from transformers.configuration_utils import PretrainedConfig
         | 
| 2 | 
            +
            from transformers.utils import logging
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            logger = logging.get_logger(__name__)
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            DEEPSEEK_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
         | 
| 7 | 
            +
            class DeepseekConfig(PretrainedConfig):
         | 
| 8 | 
            +
                r"""
         | 
| 9 | 
            +
                This is the configuration class to store the configuration of a [`DeepseekModel`]. It is used to instantiate an DeepSeek
         | 
| 10 | 
            +
                model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
         | 
| 11 | 
            +
                defaults will yield a similar configuration to that of the DeepSeek-7B.
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
         | 
| 14 | 
            +
                documentation from [`PretrainedConfig`] for more information.
         | 
| 15 | 
            +
             | 
| 16 | 
            +
             | 
| 17 | 
            +
                Args:
         | 
| 18 | 
            +
                    vocab_size (`int`, *optional*, defaults to 102400):
         | 
| 19 | 
            +
                        Vocabulary size of the Deep model. Defines the number of different tokens that can be represented by the
         | 
| 20 | 
            +
                        `inputs_ids` passed when calling [`DeepseekModel`]
         | 
| 21 | 
            +
                    hidden_size (`int`, *optional*, defaults to 4096):
         | 
| 22 | 
            +
                        Dimension of the hidden representations.
         | 
| 23 | 
            +
                    intermediate_size (`int`, *optional*, defaults to 11008):
         | 
| 24 | 
            +
                        Dimension of the MLP representations.
         | 
| 25 | 
            +
                    moe_intermediate_size (`int`, *optional*, defaults to 1407):
         | 
| 26 | 
            +
                        Dimension of the MoE representations.
         | 
| 27 | 
            +
                    num_hidden_layers (`int`, *optional*, defaults to 32):
         | 
| 28 | 
            +
                        Number of hidden layers in the Transformer decoder.
         | 
| 29 | 
            +
                    num_attention_heads (`int`, *optional*, defaults to 32):
         | 
| 30 | 
            +
                        Number of attention heads for each attention layer in the Transformer decoder.
         | 
| 31 | 
            +
                    n_shared_experts (`int`, *optional*, defaults to None):
         | 
| 32 | 
            +
                        Number of shared experts, None means dense model.
         | 
| 33 | 
            +
                    n_routed_experts (`int`, *optional*, defaults to None):
         | 
| 34 | 
            +
                        Number of routed experts, None means dense model.
         | 
| 35 | 
            +
                    routed_scaling_factor (`float`, *optional*, defaults to 1.0):
         | 
| 36 | 
            +
                        Scaling factor or routed experts.
         | 
| 37 | 
            +
                    topk_method (`str`, *optional*, defaults to `gready`):
         | 
| 38 | 
            +
                        Topk method used in routed gate.
         | 
| 39 | 
            +
                    n_group (`int`, *optional*, defaults to None):
         | 
| 40 | 
            +
                        Number of groups for routed experts.
         | 
| 41 | 
            +
                    topk_group (`int`, *optional*, defaults to None):
         | 
| 42 | 
            +
                        Number of selected groups for each token(for each token, ensuring the selected experts is only within `topk_group` groups).
         | 
| 43 | 
            +
                    num_experts_per_tok (`int`, *optional*, defaults to None):
         | 
| 44 | 
            +
                        Number of selected experts, None means dense model.
         | 
| 45 | 
            +
                    moe_layer_freq (`int`, *optional*, defaults to 1):
         | 
| 46 | 
            +
                        The frequency of the MoE layer: one expert layer for every `moe_layer_freq - 1` dense layers.
         | 
| 47 | 
            +
                    first_k_dense_replace (`int`, *optional*, defaults to 0):
         | 
| 48 | 
            +
                        Number of dense layers in shallow layers(embed->dense->dense->...->dense->moe->moe...->lm_head).
         | 
| 49 | 
            +
                                                                        \--k dense layers--/
         | 
| 50 | 
            +
                    norm_topk_prob (`bool`, *optional*, defaults to False):
         | 
| 51 | 
            +
                        Whether to normalize the weights of the routed experts.
         | 
| 52 | 
            +
                    scoring_func (`str`, *optional*, defaults to 'softmax'):
         | 
| 53 | 
            +
                        Method of computing expert weights.
         | 
| 54 | 
            +
                    aux_loss_alpha (`float`, *optional*, defaults to 0.001):
         | 
| 55 | 
            +
                        Auxiliary loss weight coefficient.
         | 
| 56 | 
            +
                    seq_aux = (`bool`, *optional*, defaults to True):
         | 
| 57 | 
            +
                        Whether to compute the auxiliary loss for each individual sample.
         | 
| 58 | 
            +
                    num_key_value_heads (`int`, *optional*):
         | 
| 59 | 
            +
                        This is the number of key_value heads that should be used to implement Grouped Query Attention. If
         | 
| 60 | 
            +
                        `num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if
         | 
| 61 | 
            +
                        `num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When
         | 
| 62 | 
            +
                        converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed
         | 
| 63 | 
            +
                        by meanpooling all the original heads within that group. For more details checkout [this
         | 
| 64 | 
            +
                        paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to
         | 
| 65 | 
            +
                        `num_attention_heads`.
         | 
| 66 | 
            +
                    hidden_act (`str` or `function`, *optional*, defaults to `"silu"`):
         | 
| 67 | 
            +
                        The non-linear activation function (function or string) in the decoder.
         | 
| 68 | 
            +
                    max_position_embeddings (`int`, *optional*, defaults to 2048):
         | 
| 69 | 
            +
                        The maximum sequence length that this model might ever be used with.
         | 
| 70 | 
            +
                    initializer_range (`float`, *optional*, defaults to 0.02):
         | 
| 71 | 
            +
                        The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
         | 
| 72 | 
            +
                    rms_norm_eps (`float`, *optional*, defaults to 1e-06):
         | 
| 73 | 
            +
                        The epsilon used by the rms normalization layers.
         | 
| 74 | 
            +
                    use_cache (`bool`, *optional*, defaults to `True`):
         | 
| 75 | 
            +
                        Whether or not the model should return the last key/values attentions (not used by all models). Only
         | 
| 76 | 
            +
                        relevant if `config.is_decoder=True`.
         | 
| 77 | 
            +
                    pad_token_id (`int`, *optional*):
         | 
| 78 | 
            +
                        Padding token id.
         | 
| 79 | 
            +
                    bos_token_id (`int`, *optional*, defaults to 1):
         | 
| 80 | 
            +
                        Beginning of stream token id.
         | 
| 81 | 
            +
                    eos_token_id (`int`, *optional*, defaults to 2):
         | 
| 82 | 
            +
                        End of stream token id.
         | 
| 83 | 
            +
                    pretraining_tp (`int`, *optional*, defaults to 1):
         | 
| 84 | 
            +
                        Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this
         | 
| 85 | 
            +
                        document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is
         | 
| 86 | 
            +
                        necessary to ensure exact reproducibility of the pretraining results. Please refer to [this
         | 
| 87 | 
            +
                        issue](https://github.com/pytorch/pytorch/issues/76232).
         | 
| 88 | 
            +
                    tie_word_embeddings (`bool`, *optional*, defaults to `False`):
         | 
| 89 | 
            +
                        Whether to tie weight embeddings
         | 
| 90 | 
            +
                    rope_theta (`float`, *optional*, defaults to 10000.0):
         | 
| 91 | 
            +
                        The base period of the RoPE embeddings.
         | 
| 92 | 
            +
                    rope_scaling (`Dict`, *optional*):
         | 
| 93 | 
            +
                        Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
         | 
| 94 | 
            +
                        strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
         | 
| 95 | 
            +
                        `{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update
         | 
| 96 | 
            +
                        `max_position_embeddings` to the expected new maximum.
         | 
| 97 | 
            +
                    attention_bias (`bool`, defaults to `False`, *optional*, defaults to `False`):
         | 
| 98 | 
            +
                        Whether to use a bias in the query, key, value and output projection layers during self-attention.
         | 
| 99 | 
            +
                    attention_dropout (`float`, *optional*, defaults to 0.0):
         | 
| 100 | 
            +
                        The dropout ratio for the attention probabilities.
         | 
| 101 | 
            +
             | 
| 102 | 
            +
                ```python
         | 
| 103 | 
            +
                >>> from transformers import DeepseekModel, DeepseekConfig
         | 
| 104 | 
            +
             | 
| 105 | 
            +
                >>> # Initializing a Deepseek deepseek-7b style configuration
         | 
| 106 | 
            +
                >>> configuration = DeepseekConfig()
         | 
| 107 | 
            +
             | 
| 108 | 
            +
                >>> # Accessing the model configuration
         | 
| 109 | 
            +
                >>> configuration = model.config
         | 
| 110 | 
            +
                ```"""
         | 
| 111 | 
            +
             | 
| 112 | 
            +
                model_type = "deepseek"
         | 
| 113 | 
            +
                keys_to_ignore_at_inference = ["past_key_values"]
         | 
| 114 | 
            +
             | 
| 115 | 
            +
                def __init__(
         | 
| 116 | 
            +
                    self,
         | 
| 117 | 
            +
                    vocab_size=102400,
         | 
| 118 | 
            +
                    hidden_size=4096,
         | 
| 119 | 
            +
                    intermediate_size=11008,
         | 
| 120 | 
            +
                    moe_intermediate_size = 1407,
         | 
| 121 | 
            +
                    num_hidden_layers=30,
         | 
| 122 | 
            +
                    num_attention_heads=32,
         | 
| 123 | 
            +
                    num_key_value_heads=32,
         | 
| 124 | 
            +
                    n_shared_experts = None,
         | 
| 125 | 
            +
                    n_routed_experts = None,
         | 
| 126 | 
            +
                    ep_size = 1,
         | 
| 127 | 
            +
                    routed_scaling_factor = 1.0,
         | 
| 128 | 
            +
                    kv_lora_rank = 512,
         | 
| 129 | 
            +
                    q_lora_rank = 1536,
         | 
| 130 | 
            +
                    qk_rope_head_dim = 64,
         | 
| 131 | 
            +
                    v_head_dim = 128,
         | 
| 132 | 
            +
                    qk_nope_head_dim = 128,
         | 
| 133 | 
            +
                    topk_method = 'gready',
         | 
| 134 | 
            +
                    n_group = None,
         | 
| 135 | 
            +
                    topk_group = None,
         | 
| 136 | 
            +
                    num_experts_per_tok = None,
         | 
| 137 | 
            +
                    moe_layer_freq = 1,
         | 
| 138 | 
            +
                    first_k_dense_replace = 0,
         | 
| 139 | 
            +
                    norm_topk_prob = False,
         | 
| 140 | 
            +
                    scoring_func = 'softmax',
         | 
| 141 | 
            +
                    aux_loss_alpha = 0.001,
         | 
| 142 | 
            +
                    seq_aux = True,
         | 
| 143 | 
            +
                    hidden_act="silu",
         | 
| 144 | 
            +
                    max_position_embeddings=2048,
         | 
| 145 | 
            +
                    initializer_range=0.02,
         | 
| 146 | 
            +
                    rms_norm_eps=1e-6,
         | 
| 147 | 
            +
                    use_cache=True,
         | 
| 148 | 
            +
                    pad_token_id=None,
         | 
| 149 | 
            +
                    bos_token_id=100000,
         | 
| 150 | 
            +
                    eos_token_id=100001,
         | 
| 151 | 
            +
                    pretraining_tp=1,
         | 
| 152 | 
            +
                    tie_word_embeddings=False,
         | 
| 153 | 
            +
                    rope_theta=10000.0,
         | 
| 154 | 
            +
                    rope_scaling=None,
         | 
| 155 | 
            +
                    attention_bias=False,
         | 
| 156 | 
            +
                    attention_dropout=0.0,
         | 
| 157 | 
            +
                    **kwargs,
         | 
| 158 | 
            +
                ):
         | 
| 159 | 
            +
                    self.vocab_size = vocab_size
         | 
| 160 | 
            +
                    self.max_position_embeddings = max_position_embeddings
         | 
| 161 | 
            +
                    self.hidden_size = hidden_size
         | 
| 162 | 
            +
                    self.intermediate_size = intermediate_size
         | 
| 163 | 
            +
                    self.moe_intermediate_size = moe_intermediate_size
         | 
| 164 | 
            +
                    self.num_hidden_layers = num_hidden_layers
         | 
| 165 | 
            +
                    self.num_attention_heads = num_attention_heads
         | 
| 166 | 
            +
                    self.n_shared_experts = n_shared_experts
         | 
| 167 | 
            +
                    self.n_routed_experts = n_routed_experts
         | 
| 168 | 
            +
                    self.ep_size = ep_size
         | 
| 169 | 
            +
                    self.routed_scaling_factor = routed_scaling_factor
         | 
| 170 | 
            +
                    self.kv_lora_rank = kv_lora_rank
         | 
| 171 | 
            +
                    self.q_lora_rank = q_lora_rank
         | 
| 172 | 
            +
                    self.qk_rope_head_dim = qk_rope_head_dim
         | 
| 173 | 
            +
                    self.v_head_dim = v_head_dim
         | 
| 174 | 
            +
                    self.qk_nope_head_dim = qk_nope_head_dim
         | 
| 175 | 
            +
                    self.topk_method = topk_method
         | 
| 176 | 
            +
                    self.n_group = n_group
         | 
| 177 | 
            +
                    self.topk_group = topk_group
         | 
| 178 | 
            +
                    self.num_experts_per_tok = num_experts_per_tok
         | 
| 179 | 
            +
                    self.moe_layer_freq = moe_layer_freq
         | 
| 180 | 
            +
                    self.first_k_dense_replace = first_k_dense_replace
         | 
| 181 | 
            +
                    self.norm_topk_prob = norm_topk_prob
         | 
| 182 | 
            +
                    self.scoring_func = scoring_func
         | 
| 183 | 
            +
                    self.aux_loss_alpha = aux_loss_alpha
         | 
| 184 | 
            +
                    self.seq_aux = seq_aux
         | 
| 185 | 
            +
                    # for backward compatibility
         | 
| 186 | 
            +
                    if num_key_value_heads is None:
         | 
| 187 | 
            +
                        num_key_value_heads = num_attention_heads
         | 
| 188 | 
            +
             | 
| 189 | 
            +
                    self.num_key_value_heads = num_key_value_heads
         | 
| 190 | 
            +
                    self.hidden_act = hidden_act
         | 
| 191 | 
            +
                    self.initializer_range = initializer_range
         | 
| 192 | 
            +
                    self.rms_norm_eps = rms_norm_eps
         | 
| 193 | 
            +
                    self.pretraining_tp = pretraining_tp
         | 
| 194 | 
            +
                    self.use_cache = use_cache
         | 
| 195 | 
            +
                    self.rope_theta = rope_theta
         | 
| 196 | 
            +
                    self.rope_scaling = rope_scaling
         | 
| 197 | 
            +
                    self.attention_bias = attention_bias
         | 
| 198 | 
            +
                    self.attention_dropout = attention_dropout
         | 
| 199 | 
            +
             | 
| 200 | 
            +
                    super().__init__(
         | 
| 201 | 
            +
                        pad_token_id=pad_token_id,
         | 
| 202 | 
            +
                        bos_token_id=bos_token_id,
         | 
| 203 | 
            +
                        eos_token_id=eos_token_id,
         | 
| 204 | 
            +
                        tie_word_embeddings=tie_word_embeddings,
         | 
| 205 | 
            +
                        **kwargs,
         | 
| 206 | 
            +
                    )
         | 
    	
        generation_config.json
    ADDED
    
    | @@ -0,0 +1,9 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "_from_model_config": true,
         | 
| 3 | 
            +
              "bos_token_id": 100000,
         | 
| 4 | 
            +
              "eos_token_id": 100001,
         | 
| 5 | 
            +
              "do_sample": true,
         | 
| 6 | 
            +
              "temperature": 0.3,
         | 
| 7 | 
            +
              "top_p": 0.95,
         | 
| 8 | 
            +
              "transformers_version": "4.39.3"
         | 
| 9 | 
            +
            }
         | 
    	
        model-00001-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:5314c26dbbd06884bc3f9007ec444ee1c8ffa6d09666743dea44510e9f5263d7
         | 
| 3 | 
            +
            size 8594017192
         | 
    	
        model-00002-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:d00165998ae8e57fe6c206fbbe1f904c38f2a6d29ba58271417effcc110c0db1
         | 
| 3 | 
            +
            size 8604902384
         | 
    	
        model-00003-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:c6b949f728b0e06cb90e41caa346eb0bf8410d30047fb0a58ae242027e07646d
         | 
| 3 | 
            +
            size 8604902384
         | 
    	
        model-00004-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:307a89a55ae13751eaf284d6baa1069b770f0b1cf31504c117155955f22ecb88
         | 
| 3 | 
            +
            size 8604902384
         | 
    	
        model-00005-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:c2ea2eda31e2958ede242f2b96e63041ec4c175763f4b21456208b5f15cee0c4
         | 
| 3 | 
            +
            size 8590441800
         | 
    	
        model-00006-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:fd13157910927a66408c00470d095373f0e41ab9d93b775f0aca17da6942300b
         | 
| 3 | 
            +
            size 8604902320
         | 
    	
        model-00007-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:bf1584a31875340653d2b401ebf2ed2181b7ddb5cd8a1185123a311ccd37738e
         | 
| 3 | 
            +
            size 8604902344
         | 
    	
        model-00008-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:861e6fb06e083540fabff7387c8561b05242b87c314966c3afd43d7f62640948
         | 
| 3 | 
            +
            size 8604902344
         | 
    	
        model-00009-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:71563829a433bdc3377464fae9cf46f18933a18f9a4eedd270d7a26511ddce49
         | 
| 3 | 
            +
            size 8604902544
         | 
    	
        model-00010-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:0ec4a98487776bbca4505aed9b552fe3cd84efd09eb0e6388168c459466af7ed
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00011-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:46baac5a84d58e8915875ad4c93a0d352187bd803ea129f8ac558d1bcf44f831
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00012-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:846fe99467bb01d5b427fd236aa4751857ebde399745becb16033b2b3fceed35
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00013-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:055e502dffc8dc05e3935f2703ac21d33dfcf095e037de07f491b48612478a34
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00014-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:a7484344f8ae46f964a865a516320ea5dbe5864403d2cb497c2791823f864d6a
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00015-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:df8782675a3d9616e8afdff9df1a2b14e1b5f8167136a0a894d4d74ab6ed4f81
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00016-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:4ca0d9f9bb08e4f674d69031511195233ec6ed45e3530cd8bd8a493f3bf2b01b
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00017-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:f0da315f46206e76f8e11d24883091ba148fabd5c599cfbf5a5281488c87d4c0
         | 
| 3 | 
            +
            size 8590442320
         | 
    	
        model-00018-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:579ade2dce32f85cab7d7c57b665b4af1a52b2df120520cfb9c95b042e5db399
         | 
| 3 | 
            +
            size 8604902856
         | 
    	
        model-00019-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:3e2723b1752fc4f76594803c181f69ab2713d2a426412139cd8fe18b7134b4f7
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00020-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:c37a15c4558ace7e9f9ece427388dcd37f78f03d939139dcedf9139ad30a69f1
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00021-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:50543f021ca99f32ec6b8861ec9de8ef643e34db602cf99446fde004f053feda
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00022-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:8fda43a9bf5fa595b20025e9d121fc60def5ea9b7d0b8c974708107d1595aef8
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00023-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:9c2d09c017d71b604308376eb7419d14fb0bf8c4efc767e9dc1b621e56d04d2e
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00024-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:2e013a38a3726a650c90133c3ab2dab49464722456d347645f3174a41beb9c63
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00025-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:344d1b64c3f840c9f764c5918ba2b3e35f393a07fd875725a5ab957c7f7bf897
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00026-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:1f199bd563b912c294114bca8bc8a394176bf8f04b099bcb4862a773ab1713af
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00027-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:85d48913ce4750b84abf25f8fec36f378abff2cb2d8f4d6f44a1745c2046236e
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00028-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:35fc490839512b3766bc10c7b2df71c8467977a7799945f7d895d6dc522a0de8
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00029-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:ced6740536f763872840a5fea01a0533c20c29e6ac2055d27d969a574d5a8a7a
         | 
| 3 | 
            +
            size 8590442328
         | 
    	
        model-00030-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:61aa216d0983f0afcd529264fce8a657d34ca39cf836c6c73d4ab2c3149b0b45
         | 
| 3 | 
            +
            size 8604902856
         | 
    	
        model-00031-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:43ff28f5dcca515a464a2b7f84818284885c0badeaf5d5badbdfb9f16908cbed
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00032-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:a676b4fe5cbf60430b0a295b10fb4bd896d8578440f5e7652bfafba09dc7b89d
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00033-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:517b2a363019942ee7c8a0de14547619180c83663290770e5b20fed88eb7ae9f
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00034-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:27077023a02166994ae9c7a4101f75dd90396c317b3d8a89e3c7a58c117cc66d
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00035-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:a88bac75d7c6fe543750500e6b41227cc3a0ee06399a961fcfe0eba068056dd5
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00036-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:97f3fc5fd5e1ccaf3ccb808031c76d084e2d7ce5b23526d2a74c0be50e3fc3be
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00037-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:2b71b86733f0a7971b0d76ee126734160ba69be651324488641e40119db1e007
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00038-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:9a6cd93c33cd36946f78d31bdde1f0e70c08fc9a433c3d52a7ac19a0c3031708
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00039-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:1cdbba7951b1be016778ba6fe0093d6b6d2d2dc3c4cd803f1adefad67a530f93
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00040-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:34df161df65f09d4fca587d071c01b385a837e31a07e3ede24bef3eb4afec281
         | 
| 3 | 
            +
            size 8604902920
         | 
    	
        model-00041-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:e6b62683d507c130f5fc72b713ef01c6c5df4380b662a7d5401de2f37520293f
         | 
| 3 | 
            +
            size 8590442336
         | 
    	
        model-00042-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:d0a163490c0863da3e0135ef2d7ef4194a12e0a98edece424d344f2e1fb60d41
         | 
| 3 | 
            +
            size 8604902848
         | 
    	
        model-00043-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:314a221c74d256635114161eb600e7d50700bf7791fcc8ca1118257ae0aac696
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00044-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:2f49b57a7d0dac8ae7b94e210c5c01eb7aaf665a49469e8e08395cfc3464ae43
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00045-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:1b879e881461afa9f0de10cd0330414a448dc6729b90eee1f9e51198ea0d6dfb
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00046-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:b049c90c79a7b27669595ca489a2abda0233d1152b735633ad135332d9e2e3b0
         | 
| 3 | 
            +
            size 8604902880
         | 
    	
        model-00047-of-000055.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:5649139ad4cc2fb3b6cc32f919d716efa37d7221b9eec15537eb72eb2693350f
         | 
| 3 | 
            +
            size 8604902880
         | 
