pub struct Gpt2Config {
pub n_layer: usize,
pub n_head: usize,
pub n_embd: usize,
pub n_ctx: usize,
pub vocab_size: usize,
pub layer_norm_epsilon: f32,
pub eos_token_id: Option<u32>,
}Fields§
§n_layer: usize§n_head: usize§n_embd: usize§n_ctx: usize§vocab_size: usize§layer_norm_epsilon: f32§eos_token_id: Option<u32>Implementations§
Trait Implementations§
Source§impl Clone for Gpt2Config
impl Clone for Gpt2Config
Source§fn clone(&self) -> Gpt2Config
fn clone(&self) -> Gpt2Config
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Gpt2Config
impl RefUnwindSafe for Gpt2Config
impl Send for Gpt2Config
impl Sync for Gpt2Config
impl Unpin for Gpt2Config
impl UnsafeUnpin for Gpt2Config
impl UnwindSafe for Gpt2Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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