pub struct T5Config {
pub vocab_size: usize,
pub d_model: usize,
pub head_dim: usize,
pub num_heads: usize,
pub layers: usize,
pub mlp_dim: usize,
pub buckets: usize,
pub max_distance: usize,
pub eps: f32,
pub gated: bool,
pub eos_token: u32,
pub pad_token: u32,
}Expand description
The shape of a T5 encoder, as its config.json states it.
Fields§
§vocab_size: usize§d_model: usize§head_dim: usizeWidth of one attention head, which T5 sets independently of d_model.
num_heads: usize§layers: usize§mlp_dim: usize§buckets: usize§max_distance: usize§eps: f32§gated: boolWhether the feed-forward is the gated pair the 1.1 models use, rather than the single ReLU projection of the original.
eos_token: u32The id the vocabulary ends a prompt with, and the one it pads with.
pad_token: u32Implementations§
Trait Implementations§
impl StructuralPartialEq for T5Config
Auto Trait Implementations§
impl Forget for T5Config
impl Freeze for T5Config
impl Move for T5Config
impl RefUnwindSafe for T5Config
impl Send for T5Config
impl Sync for T5Config
impl Unpin for T5Config
impl UnsafeUnpin 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