Class: Transformers::Mpnet::MPNetConfig
- Inherits:
-
PretrainedConfig
- Object
- PretrainedConfig
- Transformers::Mpnet::MPNetConfig
- Defined in:
- lib/transformers/models/mpnet/configuration_mpnet.rb
Instance Attribute Summary collapse
-
#attention_probs_dropout_prob ⇒ Object
readonly
Returns the value of attribute attention_probs_dropout_prob.
-
#bos_token_id ⇒ Object
readonly
Returns the value of attribute bos_token_id.
-
#eos_token_id ⇒ Object
readonly
Returns the value of attribute eos_token_id.
-
#hidden_act ⇒ Object
readonly
Returns the value of attribute hidden_act.
-
#hidden_dropout_prob ⇒ Object
readonly
Returns the value of attribute hidden_dropout_prob.
-
#hidden_size ⇒ Object
readonly
Returns the value of attribute hidden_size.
-
#initializer_range ⇒ Object
readonly
Returns the value of attribute initializer_range.
-
#intermediate_size ⇒ Object
readonly
Returns the value of attribute intermediate_size.
-
#layer_norm_eps ⇒ Object
readonly
Returns the value of attribute layer_norm_eps.
-
#max_position_embeddings ⇒ Object
readonly
Returns the value of attribute max_position_embeddings.
-
#num_attention_heads ⇒ Object
readonly
Returns the value of attribute num_attention_heads.
-
#num_hidden_layers ⇒ Object
readonly
Returns the value of attribute num_hidden_layers.
-
#pad_token_id ⇒ Object
readonly
Returns the value of attribute pad_token_id.
-
#relative_attention_num_buckets ⇒ Object
readonly
Returns the value of attribute relative_attention_num_buckets.
-
#vocab_size ⇒ Object
readonly
Returns the value of attribute vocab_size.
Attributes inherited from PretrainedConfig
#_commit_hash, #add_cross_attention, #architectures, #chunk_size_feed_forward, #id2label, #is_decoder, #is_encoder_decoder, #output_attentions, #output_hidden_states, #problem_type, #pruned_heads, #tie_encoder_decoder, #tie_word_embeddings, #tokenizer_class
Instance Method Summary collapse
Methods inherited from PretrainedConfig
#_attn_implementation, #_dict, from_dict, from_pretrained, get_config_dict, #getattr, #hasattr, #method_missing, #name_or_path, #name_or_path=, #num_labels, #num_labels=, #respond_to_missing?, #to_dict, #to_diff_dict, #to_json_string, #to_s, #use_return_dict
Methods included from ClassAttribute
Constructor Details
#initialize(vocab_size: 30527, hidden_size: 768, num_hidden_layers: 12, num_attention_heads: 12, intermediate_size: 3072, hidden_act: "gelu", hidden_dropout_prob: 0.1, attention_probs_dropout_prob: 0.1, max_position_embeddings: 512, initializer_range: 0.02, layer_norm_eps: 1e-12, relative_attention_num_buckets: 32, pad_token_id: 1, bos_token_id: 0, eos_token_id: 2, **kwargs) ⇒ MPNetConfig
Returns a new instance of MPNetConfig.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 26 def initialize( vocab_size: 30527, hidden_size: 768, num_hidden_layers: 12, num_attention_heads: 12, intermediate_size: 3072, hidden_act: "gelu", hidden_dropout_prob: 0.1, attention_probs_dropout_prob: 0.1, max_position_embeddings: 512, initializer_range: 0.02, layer_norm_eps: 1e-12, relative_attention_num_buckets: 32, pad_token_id: 1, bos_token_id: 0, eos_token_id: 2, **kwargs ) super(pad_token_id: pad_token_id, bos_token_id: bos_token_id, eos_token_id: eos_token_id, **kwargs) @vocab_size = vocab_size @hidden_size = hidden_size @num_hidden_layers = num_hidden_layers @num_attention_heads = num_attention_heads @hidden_act = hidden_act @intermediate_size = intermediate_size @hidden_dropout_prob = hidden_dropout_prob @attention_probs_dropout_prob = attention_probs_dropout_prob @max_position_embeddings = @initializer_range = initializer_range @layer_norm_eps = layer_norm_eps @relative_attention_num_buckets = relative_attention_num_buckets end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Transformers::PretrainedConfig
Instance Attribute Details
#attention_probs_dropout_prob ⇒ Object (readonly)
Returns the value of attribute attention_probs_dropout_prob.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def attention_probs_dropout_prob @attention_probs_dropout_prob end |
#bos_token_id ⇒ Object (readonly)
Returns the value of attribute bos_token_id.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def bos_token_id @bos_token_id end |
#eos_token_id ⇒ Object (readonly)
Returns the value of attribute eos_token_id.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def eos_token_id @eos_token_id end |
#hidden_act ⇒ Object (readonly)
Returns the value of attribute hidden_act.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def hidden_act @hidden_act end |
#hidden_dropout_prob ⇒ Object (readonly)
Returns the value of attribute hidden_dropout_prob.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def hidden_dropout_prob @hidden_dropout_prob end |
#hidden_size ⇒ Object (readonly)
Returns the value of attribute hidden_size.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def hidden_size @hidden_size end |
#initializer_range ⇒ Object (readonly)
Returns the value of attribute initializer_range.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def initializer_range @initializer_range end |
#intermediate_size ⇒ Object (readonly)
Returns the value of attribute intermediate_size.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def intermediate_size @intermediate_size end |
#layer_norm_eps ⇒ Object (readonly)
Returns the value of attribute layer_norm_eps.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def layer_norm_eps @layer_norm_eps end |
#max_position_embeddings ⇒ Object (readonly)
Returns the value of attribute max_position_embeddings.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def @max_position_embeddings end |
#num_attention_heads ⇒ Object (readonly)
Returns the value of attribute num_attention_heads.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def num_attention_heads @num_attention_heads end |
#num_hidden_layers ⇒ Object (readonly)
Returns the value of attribute num_hidden_layers.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def num_hidden_layers @num_hidden_layers end |
#pad_token_id ⇒ Object (readonly)
Returns the value of attribute pad_token_id.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def pad_token_id @pad_token_id end |
#relative_attention_num_buckets ⇒ Object (readonly)
Returns the value of attribute relative_attention_num_buckets.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def relative_attention_num_buckets @relative_attention_num_buckets end |
#vocab_size ⇒ Object (readonly)
Returns the value of attribute vocab_size.
21 22 23 |
# File 'lib/transformers/models/mpnet/configuration_mpnet.rb', line 21 def vocab_size @vocab_size end |