pub struct DebertaConfig {Show 30 fields
pub hidden_act: Activation,
pub attention_probs_dropout_prob: f64,
pub hidden_dropout_prob: f64,
pub hidden_size: i64,
pub initializer_range: f64,
pub intermediate_size: i64,
pub max_position_embeddings: i64,
pub num_attention_heads: i64,
pub num_hidden_layers: i64,
pub type_vocab_size: i64,
pub vocab_size: i64,
pub position_biased_input: Option<bool>,
pub pos_att_type: Option<PositionAttentionTypes>,
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_dropout: Option<f64>,
pub is_decoder: Option<bool>,
pub id2label: Option<HashMap<i64, String>>,
pub label2id: Option<HashMap<String, i64>>,
pub share_att_key: Option<bool>,
pub position_buckets: Option<i64>,
}
Expand description
§DeBERTa model configuration
Defines the DeBERTa model architecture (e.g. number of layers, hidden layer size, label mapping…)
Fields§
§attention_probs_dropout_prob: f64
§initializer_range: f64
§intermediate_size: i64
§max_position_embeddings: i64
§num_attention_heads: i64
§type_vocab_size: i64
§vocab_size: i64
§position_biased_input: Option<bool>
§pos_att_type: Option<PositionAttentionTypes>
§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_dropout: Option<f64>
§is_decoder: Option<bool>
§id2label: Option<HashMap<i64, String>>
§label2id: Option<HashMap<String, i64>>
§position_buckets: Option<i64>
Trait Implementations§
Source§impl Config for DebertaConfig
impl Config for DebertaConfig
Source§impl Debug for DebertaConfig
impl Debug for DebertaConfig
Source§impl Default for DebertaConfig
impl Default for DebertaConfig
Source§impl<'de> Deserialize<'de> for DebertaConfig
impl<'de> Deserialize<'de> for DebertaConfig
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 DebertaConfig
impl RefUnwindSafe for DebertaConfig
impl Send for DebertaConfig
impl Sync for DebertaConfig
impl Unpin for DebertaConfig
impl UnwindSafe for DebertaConfig
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