vllm.transformers_utils.configs.exaone
Exaone model configuration
EXAONE_PRETRAINED_CONFIG_ARCHIVE_MAP
module-attribute
¶
ExaoneConfig
¶
Bases: PretrainedConfig
This is the configuration class to store the configuration of a :class:
~transformers.ExaoneModel
. It is used to instantiate a GPT Lingvo model
according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar
configuration to that of the Exaone
Configuration objects inherit from {class}~transformers.PretrainedConfig
and can be used to control the model outputs. Read the documentation from :
class:~transformers.PretrainedConfig
for more information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vocab_size
|
{obj}`int`, `optional`, defaults to 50257
|
Vocabulary size of the GPT Lingvo model. Defines the number of
different tokens that can be represented by the {obj} |
102400
|
hidden_size
|
{obj}`int`, `optional`, defaults to 2048
|
Dimensionality of the encoder layers and the pooler layer. |
2048
|
num_layers
|
{obj}`int`, `optional`, defaults to 24
|
Number of hidden layers in the Transformer encoder. |
32
|
num_attention_heads
|
`int`, *optional*, defaults to 32
|
Number of attention heads for each attention layer in the Transformer decoder. |
32
|
num_key_value_heads
|
`int`, *optional*
|
This is the number of key_value heads that should be used to
implement Grouped Query Attention. If
|
None
|
rotary_pct
|
`float`, *optional*, defaults to 0.25
|
percentage of hidden dimensions to allocate to rotary embeddings |
0.25
|
intermediate_size
|
{obj}`int`, `optional`, defaults to 8192
|
Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder. |
None
|
defaults
|
to {obj}`"gelu_new"`
|
The non-linear activation function (function or string) in the
encoder and pooler. If string, {obj} |
required |
embed_dropout
|
{obj}`float`, `optional`, defaults to 0.0
|
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler. |
0.0
|
attention_dropout
|
{obj}`float`, `optional`, defaults to 0.0
|
The dropout ratio for the attention probabilities. |
0.0
|
max_position_embeddings
|
{obj}`int`, `optional`, defaults to 2048
|
The maximum sequence length that this model might ever be used with. Typically set this to something large just in case (e.g., 512 or 1024 or 2048). |
2048
|
type_vocab_size
|
{obj}`int`, `optional`, defaults to 2
|
The vocabulary size of the {obj} |
required |
initializer_range
|
{obj}`float`, `optional`, defaults to 0.02
|
The standard deviation of the truncated_normal_initializer for initializing all weight matrices. |
0.02
|
layer_norm_epsilon
|
{obj}`float`, `optional`, defaults to 1e-5
|
The epsilon used by the layer normalization layers. |
1e-06
|
use_cache
|
{obj}`bool`, `optional`, defaults to {obj}`True`
|
Whether or not the model should return the last key/values
attentions (not used by all models).
Only relevant if |
True
|
defaults
|
to {obj}`False`
|
If True, use gradient checkpointing to save memory at the expense of slower backward pass. |
required |
Example
|
required |
Source code in vllm/transformers_utils/configs/exaone.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
|
attribute_map
class-attribute
instance-attribute
¶
keys_to_ignore_at_inference
class-attribute
instance-attribute
¶
rescale_before_lm_head
instance-attribute
¶
__init__
¶
__init__(
vocab_size=102400,
max_position_embeddings=2048,
hidden_size=2048,
num_layers=32,
num_attention_heads=32,
num_key_value_heads=None,
intermediate_size=None,
activation_function="silu",
rotary_pct=0.25,
resid_dropout=0.0,
embed_dropout=0.0,
attention_dropout=0.0,
layer_norm_epsilon=1e-06,
initializer_range=0.02,
use_cache=True,
bos_token_id=0,
eos_token_id=2,
tie_word_embeddings=True,
**kwargs,
)