pub struct DebertaV2Config {Show 35 fields
pub vocab_size: i64,
pub hidden_size: i64,
pub num_hidden_layers: i64,
pub hidden_act: Activation,
pub attention_probs_dropout_prob: f64,
pub hidden_dropout_prob: f64,
pub initializer_range: f64,
pub intermediate_size: i64,
pub max_position_embeddings: i64,
pub position_buckets: Option<i64>,
pub num_attention_heads: i64,
pub type_vocab_size: i64,
pub position_biased_input: Option<bool>,
pub pos_att_type: Option<PositionAttentionTypes>,
pub norm_rel_ebd: Option<NormRelEmbedTypes>,
pub share_att_key: Option<bool>,
pub conv_kernel_size: Option<i64>,
pub conv_groups: Option<i64>,
pub conv_act: Option<Activation>,
pub pooler_dropout: Option<f64>,
pub pooler_hidden_act: Option<Activation>,
pub pooler_hidden_size: Option<i64>,
pub layer_norm_eps: Option<f64>,
pub pad_token_id: Option<i64>,
pub relative_attention: Option<bool>,
pub max_relative_positions: Option<i64>,
pub embedding_size: Option<i64>,
pub talking_head: Option<bool>,
pub output_hidden_states: Option<bool>,
pub output_attentions: Option<bool>,
pub classifier_activation: Option<bool>,
pub classifier_dropout: Option<f64>,
pub is_decoder: Option<bool>,
pub id2label: Option<HashMap<i64, String>>,
pub label2id: Option<HashMap<String, i64>>,
}Expand description
§DeBERTa (v2) model configuration
Defines the DeBERTa (v2) model architecture (e.g. number of layers, hidden layer size, label mapping…)
Fields§
§vocab_size: i64§attention_probs_dropout_prob: f64§initializer_range: f64§intermediate_size: i64§max_position_embeddings: i64§position_buckets: Option<i64>§num_attention_heads: i64§type_vocab_size: i64§position_biased_input: Option<bool>§pos_att_type: Option<PositionAttentionTypes>§norm_rel_ebd: Option<NormRelEmbedTypes>§conv_kernel_size: Option<i64>§conv_groups: Option<i64>§conv_act: Option<Activation>§pooler_dropout: Option<f64>§layer_norm_eps: Option<f64>§pad_token_id: Option<i64>§relative_attention: Option<bool>§max_relative_positions: Option<i64>§embedding_size: Option<i64>§talking_head: Option<bool>§output_attentions: Option<bool>§classifier_activation: Option<bool>§classifier_dropout: Option<f64>§is_decoder: Option<bool>§id2label: Option<HashMap<i64, String>>§label2id: Option<HashMap<String, i64>>Trait Implementations§
Source§impl Config for DebertaV2Config
impl Config for DebertaV2Config
Source§impl Debug for DebertaV2Config
impl Debug for DebertaV2Config
Source§impl Default for DebertaV2Config
impl Default for DebertaV2Config
Source§impl<'de> Deserialize<'de> for DebertaV2Config
impl<'de> Deserialize<'de> for DebertaV2Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&DebertaV2Config> for DebertaConfig
impl From<&DebertaV2Config> for DebertaConfig
Source§fn from(v2_config: &DebertaV2Config) -> Self
fn from(v2_config: &DebertaV2Config) -> Self
Converts to this type from the input type.
Source§impl From<DebertaV2Config> for DebertaConfig
impl From<DebertaV2Config> for DebertaConfig
Source§fn from(v2_config: DebertaV2Config) -> Self
fn from(v2_config: DebertaV2Config) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DebertaV2Config
impl RefUnwindSafe for DebertaV2Config
impl Send for DebertaV2Config
impl Sync for DebertaV2Config
impl Unpin for DebertaV2Config
impl UnwindSafe for DebertaV2Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more