Text Generation
Transformers
Safetensors
gpt_neox
Generated from Trainer
custom_code
text-generation-inference
Instructions to use AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2
- SGLang
How to use AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2 with Docker Model Runner:
docker model run hf.co/AG-06/1_4_GPTNeoX-160m-minipile-2048-fa2
Anuj Gupta commited on
Model save
Browse files- README.md +58 -3
- config.json +37 -0
- config_custom.py +191 -0
- generation_config.json +9 -0
- model.safetensors +3 -0
- special_tokens_map.json +24 -0
- tokenizer.json +0 -0
- tokenizer_config.json +215 -0
- training_args.bin +3 -0
README.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- generated_from_trainer
|
| 5 |
+
model-index:
|
| 6 |
+
- name: 1_4_GPTNeoX-160m-minipile-2048-fa2
|
| 7 |
+
results: []
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 11 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 12 |
+
|
| 13 |
+
# 1_4_GPTNeoX-160m-minipile-2048-fa2
|
| 14 |
+
|
| 15 |
+
This model was trained from scratch on an unknown dataset.
|
| 16 |
+
It achieves the following results on the evaluation set:
|
| 17 |
+
- Loss: 3.0148
|
| 18 |
+
|
| 19 |
+
## Model description
|
| 20 |
+
|
| 21 |
+
More information needed
|
| 22 |
+
|
| 23 |
+
## Intended uses & limitations
|
| 24 |
+
|
| 25 |
+
More information needed
|
| 26 |
+
|
| 27 |
+
## Training and evaluation data
|
| 28 |
+
|
| 29 |
+
More information needed
|
| 30 |
+
|
| 31 |
+
## Training procedure
|
| 32 |
+
|
| 33 |
+
### Training hyperparameters
|
| 34 |
+
|
| 35 |
+
The following hyperparameters were used during training:
|
| 36 |
+
- learning_rate: 0.0002
|
| 37 |
+
- train_batch_size: 8
|
| 38 |
+
- eval_batch_size: 8
|
| 39 |
+
- seed: 42
|
| 40 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 41 |
+
- lr_scheduler_type: cosine
|
| 42 |
+
- lr_scheduler_warmup_ratio: 0.1
|
| 43 |
+
- training_steps: 1000
|
| 44 |
+
|
| 45 |
+
### Training results
|
| 46 |
+
|
| 47 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 48 |
+
|:-------------:|:-----:|:----:|:---------------:|
|
| 49 |
+
| 2.976 | 1.0 | 500 | 3.0129 |
|
| 50 |
+
| 2.8634 | 2.0 | 1000 | 3.0148 |
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
### Framework versions
|
| 54 |
+
|
| 55 |
+
- Transformers 4.57.1
|
| 56 |
+
- Pytorch 2.5.1+cu121
|
| 57 |
+
- Datasets 3.0.1
|
| 58 |
+
- Tokenizers 0.22.1
|
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"GPTNeoXForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "config_custom.GPTNeoXConfig",
|
| 9 |
+
"AutoModel": "modeling_custom.GPTNeoXModel",
|
| 10 |
+
"AutoModelForCausalLM": "modeling_custom.GPTNeoXForCausalLM"
|
| 11 |
+
},
|
| 12 |
+
"bos_token_id": 0,
|
| 13 |
+
"classifier_dropout": 0.1,
|
| 14 |
+
"dtype": "bfloat16",
|
| 15 |
+
"eos_token_id": 0,
|
| 16 |
+
"hidden_act": "gelu",
|
| 17 |
+
"hidden_dropout": 0.0,
|
| 18 |
+
"hidden_size": 768,
|
| 19 |
+
"initializer_range": 0.02,
|
| 20 |
+
"intermediate_size": 3072,
|
| 21 |
+
"layer_norm_eps": 1e-05,
|
| 22 |
+
"max_position_embeddings": 2048,
|
| 23 |
+
"model_type": "gpt_neox",
|
| 24 |
+
"num_attention_heads": 12,
|
| 25 |
+
"num_hidden_layers": 12,
|
| 26 |
+
"pad_token_id": 0,
|
| 27 |
+
"partial_rotary_factor": 0.25,
|
| 28 |
+
"rope_scaling": null,
|
| 29 |
+
"rope_theta": 10000,
|
| 30 |
+
"rotary_emb_base": 10000,
|
| 31 |
+
"rotary_pct": 0.25,
|
| 32 |
+
"tie_word_embeddings": false,
|
| 33 |
+
"transformers_version": "4.57.1",
|
| 34 |
+
"use_cache": true,
|
| 35 |
+
"use_parallel_residual": true,
|
| 36 |
+
"vocab_size": 50304
|
| 37 |
+
}
|
config_custom.py
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# coding=utf-8
|
| 2 |
+
# Copyright 2022 EleutherAI and The HuggingFace Inc. team. All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
"""GPTNeoX model configuration"""
|
| 16 |
+
|
| 17 |
+
from transformers.configuration_utils import PretrainedConfig
|
| 18 |
+
from transformers.modeling_rope_utils import rope_config_validation
|
| 19 |
+
from transformers.utils import logging
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
logger = logging.get_logger(__name__)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class GPTNeoXConfig(PretrainedConfig):
|
| 26 |
+
r"""
|
| 27 |
+
This is the configuration class to store the configuration of a [`GPTNeoXModel`]. It is used to instantiate an
|
| 28 |
+
GPTNeoX model according to the specified arguments, defining the model architecture. Instantiating a configuration
|
| 29 |
+
with the defaults will yield a similar configuration to that of the GPTNeoX
|
| 30 |
+
[EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) architecture.
|
| 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 50432):
|
| 38 |
+
Vocabulary size of the GPTNeoX model. Defines the number of different tokens that can be represented by the
|
| 39 |
+
`inputs_ids` passed when calling [`GPTNeoXModel`].
|
| 40 |
+
hidden_size (`int`, *optional*, defaults to 6144):
|
| 41 |
+
Dimension of the encoder layers and the pooler layer.
|
| 42 |
+
num_hidden_layers (`int`, *optional*, defaults to 44):
|
| 43 |
+
Number of hidden layers in the Transformer encoder.
|
| 44 |
+
num_attention_heads (`int`, *optional*, defaults to 64):
|
| 45 |
+
Number of attention heads for each attention layer in the Transformer encoder.
|
| 46 |
+
intermediate_size (`int`, *optional*, defaults to 24576):
|
| 47 |
+
Dimension of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
|
| 48 |
+
hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
|
| 49 |
+
The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
|
| 50 |
+
`"relu"`, `"selu"` and `"gelu_new"` are supported.
|
| 51 |
+
rotary_pct (`float`, *optional*, defaults to 0.25):
|
| 52 |
+
percentage of hidden dimensions to allocate to rotary embeddings
|
| 53 |
+
rotary_emb_base (`int`, *optional*, defaults to 10000)
|
| 54 |
+
base for computing rotary embeddings frequency
|
| 55 |
+
attention_dropout (`float`, *optional*, defaults to 0.0):
|
| 56 |
+
The dropout ratio probability of the attention score.
|
| 57 |
+
hidden_dropout (`float`, *optional*, defaults to 0.0):
|
| 58 |
+
The dropout ratio of (1) the word embeddings, (2) the post-attention hidden states, and (3) the post-mlp
|
| 59 |
+
hidden states.
|
| 60 |
+
classifier_dropout (`float`, *optional*, defaults to 0.1):
|
| 61 |
+
Argument used when doing token classification, used in the model [`GPTNeoXForTokenClassification`].
|
| 62 |
+
|
| 63 |
+
The dropout ratio for the hidden layer.
|
| 64 |
+
max_position_embeddings (`int`, *optional*, defaults to 2048):
|
| 65 |
+
The maximum sequence length that this model might ever be used with. Typically set this to something large
|
| 66 |
+
just in case (e.g., 512 or 1024 or 2048).
|
| 67 |
+
initializer_range (`float`, *optional*, defaults to 1e-5):
|
| 68 |
+
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
|
| 69 |
+
layer_norm_eps (`float`, *optional*, defaults to 1e-12):
|
| 70 |
+
The epsilon used by the layer normalization layers.
|
| 71 |
+
use_cache (`bool`, *optional*, defaults to `True`):
|
| 72 |
+
Whether or not the model should return the last key/values attentions (not used by all models). Only
|
| 73 |
+
relevant if `config.is_decoder=True`.
|
| 74 |
+
use_parallel_residual (`bool`, *optional*, defaults to `True`):
|
| 75 |
+
Whether to use a "parallel" formulation in each Transformer layer, which can provide a slight training
|
| 76 |
+
speedup at large scales (e.g. 20B).
|
| 77 |
+
rope_scaling (`Dict`, *optional*):
|
| 78 |
+
Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type
|
| 79 |
+
and you expect the model to work on longer `max_position_embeddings`, we recommend you to update this value
|
| 80 |
+
accordingly.
|
| 81 |
+
Expected contents:
|
| 82 |
+
`rope_type` (`str`):
|
| 83 |
+
The sub-variant of RoPE to use. Can be one of ['default', 'linear', 'dynamic', 'yarn', 'longrope',
|
| 84 |
+
'llama3'], with 'default' being the original RoPE implementation.
|
| 85 |
+
`factor` (`float`, *optional*):
|
| 86 |
+
Used with all rope types except 'default'. The scaling factor to apply to the RoPE embeddings. In
|
| 87 |
+
most scaling types, a `factor` of x will enable the model to handle sequences of length x *
|
| 88 |
+
original maximum pre-trained length.
|
| 89 |
+
`original_max_position_embeddings` (`int`, *optional*):
|
| 90 |
+
Used with 'dynamic', 'longrope' and 'llama3'. The original max position embeddings used during
|
| 91 |
+
pretraining.
|
| 92 |
+
`attention_factor` (`float`, *optional*):
|
| 93 |
+
Used with 'yarn' and 'longrope'. The scaling factor to be applied on the attention
|
| 94 |
+
computation. If unspecified, it defaults to value recommended by the implementation, using the
|
| 95 |
+
`factor` field to infer the suggested value.
|
| 96 |
+
`beta_fast` (`float`, *optional*):
|
| 97 |
+
Only used with 'yarn'. Parameter to set the boundary for extrapolation (only) in the linear
|
| 98 |
+
ramp function. If unspecified, it defaults to 32.
|
| 99 |
+
`beta_slow` (`float`, *optional*):
|
| 100 |
+
Only used with 'yarn'. Parameter to set the boundary for interpolation (only) in the linear
|
| 101 |
+
ramp function. If unspecified, it defaults to 1.
|
| 102 |
+
`short_factor` (`List[float]`, *optional*):
|
| 103 |
+
Only used with 'longrope'. The scaling factor to be applied to short 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 |
+
`long_factor` (`List[float]`, *optional*):
|
| 107 |
+
Only used with 'longrope'. The scaling factor to be applied to long contexts (<
|
| 108 |
+
`original_max_position_embeddings`). Must be a list of numbers with the same length as the hidden
|
| 109 |
+
size divided by the number of attention heads divided by 2
|
| 110 |
+
`low_freq_factor` (`float`, *optional*):
|
| 111 |
+
Only used with 'llama3'. Scaling factor applied to low frequency components of the RoPE
|
| 112 |
+
`high_freq_factor` (`float`, *optional*):
|
| 113 |
+
Only used with 'llama3'. Scaling factor applied to high frequency components of the RoPE
|
| 114 |
+
attention_bias (`bool`, *optional*, defaults to `True`):
|
| 115 |
+
Whether to use a bias in the query, key, value and output projection layers during self-attention.
|
| 116 |
+
|
| 117 |
+
Example:
|
| 118 |
+
|
| 119 |
+
```python
|
| 120 |
+
>>> from transformers import GPTNeoXConfig, GPTNeoXModel
|
| 121 |
+
|
| 122 |
+
>>> # Initializing a GPTNeoX gpt-neox-20b style configuration
|
| 123 |
+
>>> configuration = GPTNeoXConfig()
|
| 124 |
+
|
| 125 |
+
>>> # Initializing a model (with random weights) from the gpt-neox-20b style configuration
|
| 126 |
+
>>> model = GPTNeoXModel(configuration) # doctest: +SKIP
|
| 127 |
+
|
| 128 |
+
>>> # Accessing the model configuration
|
| 129 |
+
>>> configuration = model.config # doctest: +SKIP
|
| 130 |
+
```"""
|
| 131 |
+
|
| 132 |
+
model_type = "gpt_neox"
|
| 133 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 134 |
+
|
| 135 |
+
def __init__(
|
| 136 |
+
self,
|
| 137 |
+
vocab_size=50432,
|
| 138 |
+
hidden_size=6144,
|
| 139 |
+
num_hidden_layers=44,
|
| 140 |
+
num_attention_heads=64,
|
| 141 |
+
intermediate_size=24576,
|
| 142 |
+
hidden_act="gelu",
|
| 143 |
+
rotary_pct=0.25,
|
| 144 |
+
rotary_emb_base=10000,
|
| 145 |
+
attention_dropout=0.0,
|
| 146 |
+
hidden_dropout=0.0,
|
| 147 |
+
classifier_dropout=0.1,
|
| 148 |
+
max_position_embeddings=2048,
|
| 149 |
+
initializer_range=0.02,
|
| 150 |
+
layer_norm_eps=1e-5,
|
| 151 |
+
use_cache=True,
|
| 152 |
+
bos_token_id=0,
|
| 153 |
+
eos_token_id=2,
|
| 154 |
+
tie_word_embeddings=False,
|
| 155 |
+
use_parallel_residual=True,
|
| 156 |
+
rope_scaling=None,
|
| 157 |
+
attention_bias=True,
|
| 158 |
+
**kwargs,
|
| 159 |
+
):
|
| 160 |
+
super().__init__(bos_token_id=bos_token_id, eos_token_id=eos_token_id, **kwargs)
|
| 161 |
+
self.vocab_size = vocab_size
|
| 162 |
+
self.max_position_embeddings = max_position_embeddings
|
| 163 |
+
self.hidden_size = hidden_size
|
| 164 |
+
self.num_hidden_layers = num_hidden_layers
|
| 165 |
+
self.num_attention_heads = num_attention_heads
|
| 166 |
+
self.intermediate_size = intermediate_size
|
| 167 |
+
self.hidden_act = hidden_act
|
| 168 |
+
self.rotary_pct = rotary_pct
|
| 169 |
+
self.partial_rotary_factor = rotary_pct
|
| 170 |
+
self.rotary_emb_base = rotary_emb_base
|
| 171 |
+
self.rope_theta = rotary_emb_base
|
| 172 |
+
self.attention_dropout = attention_dropout
|
| 173 |
+
self.hidden_dropout = hidden_dropout
|
| 174 |
+
self.classifier_dropout = classifier_dropout
|
| 175 |
+
self.initializer_range = initializer_range
|
| 176 |
+
self.layer_norm_eps = layer_norm_eps
|
| 177 |
+
self.use_cache = use_cache
|
| 178 |
+
self.tie_word_embeddings = tie_word_embeddings
|
| 179 |
+
self.use_parallel_residual = use_parallel_residual
|
| 180 |
+
self.rope_scaling = rope_scaling
|
| 181 |
+
self.attention_bias = attention_bias
|
| 182 |
+
# Validate the correctness of rotary position embeddings parameters
|
| 183 |
+
# BC: if there is a 'type' field, move it to 'rope_type'.
|
| 184 |
+
if self.rope_scaling is not None and "type" in self.rope_scaling:
|
| 185 |
+
self.rope_scaling["rope_type"] = self.rope_scaling["type"]
|
| 186 |
+
rope_config_validation(self)
|
| 187 |
+
|
| 188 |
+
if self.hidden_size % self.num_attention_heads != 0:
|
| 189 |
+
raise ValueError(
|
| 190 |
+
"The hidden size is not divisble by the number of attention heads! Make sure to update them!"
|
| 191 |
+
)
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
0
|
| 6 |
+
],
|
| 7 |
+
"pad_token_id": 0,
|
| 8 |
+
"transformers_version": "4.57.1"
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f35f9b5618e1806a55767f218d797617d6944ecb6a77316723153d610d4f83ff
|
| 3 |
+
size 324662984
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|endoftext|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|endoftext|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": "<|endoftext|>",
|
| 17 |
+
"unk_token": {
|
| 18 |
+
"content": "<|endoftext|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
}
|
| 24 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": false,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"0": {
|
| 7 |
+
"content": "<|endoftext|>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"1": {
|
| 15 |
+
"content": "<|padding|>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": true
|
| 21 |
+
},
|
| 22 |
+
"50254": {
|
| 23 |
+
"content": " ",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": true,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": false
|
| 29 |
+
},
|
| 30 |
+
"50255": {
|
| 31 |
+
"content": " ",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": true,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": false
|
| 37 |
+
},
|
| 38 |
+
"50256": {
|
| 39 |
+
"content": " ",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": true,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": false
|
| 45 |
+
},
|
| 46 |
+
"50257": {
|
| 47 |
+
"content": " ",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": true,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": false
|
| 53 |
+
},
|
| 54 |
+
"50258": {
|
| 55 |
+
"content": " ",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": true,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": false
|
| 61 |
+
},
|
| 62 |
+
"50259": {
|
| 63 |
+
"content": " ",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": true,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": false
|
| 69 |
+
},
|
| 70 |
+
"50260": {
|
| 71 |
+
"content": " ",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": true,
|
| 74 |
+
"rstrip": false,
|
| 75 |
+
"single_word": false,
|
| 76 |
+
"special": false
|
| 77 |
+
},
|
| 78 |
+
"50261": {
|
| 79 |
+
"content": " ",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": true,
|
| 82 |
+
"rstrip": false,
|
| 83 |
+
"single_word": false,
|
| 84 |
+
"special": false
|
| 85 |
+
},
|
| 86 |
+
"50262": {
|
| 87 |
+
"content": " ",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": true,
|
| 90 |
+
"rstrip": false,
|
| 91 |
+
"single_word": false,
|
| 92 |
+
"special": false
|
| 93 |
+
},
|
| 94 |
+
"50263": {
|
| 95 |
+
"content": " ",
|
| 96 |
+
"lstrip": false,
|
| 97 |
+
"normalized": true,
|
| 98 |
+
"rstrip": false,
|
| 99 |
+
"single_word": false,
|
| 100 |
+
"special": false
|
| 101 |
+
},
|
| 102 |
+
"50264": {
|
| 103 |
+
"content": " ",
|
| 104 |
+
"lstrip": false,
|
| 105 |
+
"normalized": true,
|
| 106 |
+
"rstrip": false,
|
| 107 |
+
"single_word": false,
|
| 108 |
+
"special": false
|
| 109 |
+
},
|
| 110 |
+
"50265": {
|
| 111 |
+
"content": " ",
|
| 112 |
+
"lstrip": false,
|
| 113 |
+
"normalized": true,
|
| 114 |
+
"rstrip": false,
|
| 115 |
+
"single_word": false,
|
| 116 |
+
"special": false
|
| 117 |
+
},
|
| 118 |
+
"50266": {
|
| 119 |
+
"content": " ",
|
| 120 |
+
"lstrip": false,
|
| 121 |
+
"normalized": true,
|
| 122 |
+
"rstrip": false,
|
| 123 |
+
"single_word": false,
|
| 124 |
+
"special": false
|
| 125 |
+
},
|
| 126 |
+
"50267": {
|
| 127 |
+
"content": " ",
|
| 128 |
+
"lstrip": false,
|
| 129 |
+
"normalized": true,
|
| 130 |
+
"rstrip": false,
|
| 131 |
+
"single_word": false,
|
| 132 |
+
"special": false
|
| 133 |
+
},
|
| 134 |
+
"50268": {
|
| 135 |
+
"content": " ",
|
| 136 |
+
"lstrip": false,
|
| 137 |
+
"normalized": true,
|
| 138 |
+
"rstrip": false,
|
| 139 |
+
"single_word": false,
|
| 140 |
+
"special": false
|
| 141 |
+
},
|
| 142 |
+
"50269": {
|
| 143 |
+
"content": " ",
|
| 144 |
+
"lstrip": false,
|
| 145 |
+
"normalized": true,
|
| 146 |
+
"rstrip": false,
|
| 147 |
+
"single_word": false,
|
| 148 |
+
"special": false
|
| 149 |
+
},
|
| 150 |
+
"50270": {
|
| 151 |
+
"content": " ",
|
| 152 |
+
"lstrip": false,
|
| 153 |
+
"normalized": true,
|
| 154 |
+
"rstrip": false,
|
| 155 |
+
"single_word": false,
|
| 156 |
+
"special": false
|
| 157 |
+
},
|
| 158 |
+
"50271": {
|
| 159 |
+
"content": " ",
|
| 160 |
+
"lstrip": false,
|
| 161 |
+
"normalized": true,
|
| 162 |
+
"rstrip": false,
|
| 163 |
+
"single_word": false,
|
| 164 |
+
"special": false
|
| 165 |
+
},
|
| 166 |
+
"50272": {
|
| 167 |
+
"content": " ",
|
| 168 |
+
"lstrip": false,
|
| 169 |
+
"normalized": true,
|
| 170 |
+
"rstrip": false,
|
| 171 |
+
"single_word": false,
|
| 172 |
+
"special": false
|
| 173 |
+
},
|
| 174 |
+
"50273": {
|
| 175 |
+
"content": " ",
|
| 176 |
+
"lstrip": false,
|
| 177 |
+
"normalized": true,
|
| 178 |
+
"rstrip": false,
|
| 179 |
+
"single_word": false,
|
| 180 |
+
"special": false
|
| 181 |
+
},
|
| 182 |
+
"50274": {
|
| 183 |
+
"content": " ",
|
| 184 |
+
"lstrip": false,
|
| 185 |
+
"normalized": true,
|
| 186 |
+
"rstrip": false,
|
| 187 |
+
"single_word": false,
|
| 188 |
+
"special": false
|
| 189 |
+
},
|
| 190 |
+
"50275": {
|
| 191 |
+
"content": " ",
|
| 192 |
+
"lstrip": false,
|
| 193 |
+
"normalized": true,
|
| 194 |
+
"rstrip": false,
|
| 195 |
+
"single_word": false,
|
| 196 |
+
"special": false
|
| 197 |
+
},
|
| 198 |
+
"50276": {
|
| 199 |
+
"content": " ",
|
| 200 |
+
"lstrip": false,
|
| 201 |
+
"normalized": true,
|
| 202 |
+
"rstrip": false,
|
| 203 |
+
"single_word": false,
|
| 204 |
+
"special": false
|
| 205 |
+
}
|
| 206 |
+
},
|
| 207 |
+
"bos_token": "<|endoftext|>",
|
| 208 |
+
"clean_up_tokenization_spaces": true,
|
| 209 |
+
"eos_token": "<|endoftext|>",
|
| 210 |
+
"extra_special_tokens": {},
|
| 211 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 212 |
+
"pad_token": "<|endoftext|>",
|
| 213 |
+
"tokenizer_class": "GPTNeoXTokenizer",
|
| 214 |
+
"unk_token": "<|endoftext|>"
|
| 215 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2eb27ebdd6693cd9f205cb83ac6336c34f2bf7c8fb211aeb76854a03a059b17
|
| 3 |
+
size 5560
|