pub struct T5Config {
pub vocab_size: usize,
pub d_model: usize,
pub d_kv: usize,
pub d_ff: usize,
pub num_encoder_layers: usize,
pub num_decoder_layers: usize,
pub num_heads: usize,
pub dropout: f32,
pub relative_attention: bool,
}Expand description
T5 configuration
Fields§
§vocab_size: usizeVocabulary size
d_model: usizeModel dimension
d_kv: usizeKey/value dimension
d_ff: usizeFeed-forward dimension
num_encoder_layers: usizeNumber of encoder layers
num_decoder_layers: usizeNumber of decoder layers
num_heads: usizeNumber of attention heads
dropout: f32Dropout rate
relative_attention: boolUse relative attention bias
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for T5Config
impl RefUnwindSafe for T5Config
impl Send for T5Config
impl Sync for T5Config
impl Unpin for T5Config
impl UnwindSafe for T5Config
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> 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