pub struct LongT5Config {Show 28 fields
pub dropout_rate: f64,
pub d_model: i64,
pub d_ff: i64,
pub d_kv: i64,
pub decoder_start_token_id: Option<i64>,
pub bos_token_id: Option<i64>,
pub eos_token_id: Option<i64>,
pub forced_bos_token_id: Option<i64>,
pub forced_eos_token_id: Option<i64>,
pub initializer_factor: f64,
pub is_encoder_decoder: Option<bool>,
pub layer_norm_epsilon: f64,
pub num_heads: i64,
pub num_layers: i64,
pub num_decoder_layers: Option<i64>,
pub local_radius: i64,
pub global_block_size: i64,
pub output_past: Option<bool>,
pub pad_token_id: Option<i64>,
pub relative_attention_num_buckets: i64,
pub relative_attention_max_distance: Option<i64>,
pub encoder_attention_type: Option<EncoderAttentionType>,
pub vocab_size: i64,
pub feed_forward_proj: Option<FeedForwardProj>,
pub tie_word_embeddings: Option<bool>,
pub task_specific_params: Option<TaskSpecificParams>,
pub output_attentions: Option<bool>,
pub output_hidden_states: Option<bool>,
}
Expand description
§LongT5 model configuration
Defines the LongT5 model architecture (e.g. number of layers, hidden layer size, label mapping…)
Fields§
§dropout_rate: f64
§d_model: i64
§d_ff: i64
§d_kv: i64
§decoder_start_token_id: Option<i64>
§bos_token_id: Option<i64>
§eos_token_id: Option<i64>
§forced_bos_token_id: Option<i64>
§forced_eos_token_id: Option<i64>
§initializer_factor: f64
§is_encoder_decoder: Option<bool>
§layer_norm_epsilon: f64
§num_heads: i64
§num_layers: i64
§num_decoder_layers: Option<i64>
§local_radius: i64
§global_block_size: i64
§output_past: Option<bool>
§pad_token_id: Option<i64>
§relative_attention_num_buckets: i64
§relative_attention_max_distance: Option<i64>
§encoder_attention_type: Option<EncoderAttentionType>
§vocab_size: i64
§feed_forward_proj: Option<FeedForwardProj>
§tie_word_embeddings: Option<bool>
§task_specific_params: Option<TaskSpecificParams>
§output_attentions: Option<bool>
Trait Implementations§
Source§impl Clone for LongT5Config
impl Clone for LongT5Config
Source§fn clone(&self) -> LongT5Config
fn clone(&self) -> LongT5Config
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Config for LongT5Config
impl Config for LongT5Config
Source§impl Debug for LongT5Config
impl Debug for LongT5Config
Source§impl Default for LongT5Config
impl Default for LongT5Config
Source§impl<'de> Deserialize<'de> for LongT5Config
impl<'de> Deserialize<'de> for LongT5Config
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<&LongT5Config> for T5Config
impl From<&LongT5Config> for T5Config
Source§fn from(val: &LongT5Config) -> T5Config
fn from(val: &LongT5Config) -> T5Config
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LongT5Config
impl RefUnwindSafe for LongT5Config
impl Send for LongT5Config
impl Sync for LongT5Config
impl Unpin for LongT5Config
impl UnwindSafe for LongT5Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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