pub struct AMPLIFYConfig {Show 17 fields
pub hidden_size: usize,
pub num_hidden_layers: usize,
pub num_attention_heads: usize,
pub intermediate_size: usize,
pub dropout_prob: f64,
pub embedding_init_range: f64,
pub decoder_init_range: f64,
pub rms_norm: bool,
pub norm_eps: f64,
pub hidden_act: Activation,
pub layer_norm_after_embedding: bool,
pub layer_norm_before_last_layer: bool,
pub vocab_size: usize,
pub ffn_bias: bool,
pub att_bias: bool,
pub pad_token_id: usize,
pub max_length: usize,
}
Expand description
Configuration Struct for AMPLIFY
Currently only holds the weight params for those models found on GH: the 120M and 350M models.
Fields§
§num_attention_heads: usize
§intermediate_size: usize
§dropout_prob: f64
§embedding_init_range: f64
§decoder_init_range: f64
§rms_norm: bool
§norm_eps: f64
§layer_norm_after_embedding: bool
§layer_norm_before_last_layer: bool
§vocab_size: usize
§ffn_bias: bool
§att_bias: bool
§pad_token_id: usize
§max_length: usize
Implementations§
Trait Implementations§
source§impl Clone for AMPLIFYConfig
impl Clone for AMPLIFYConfig
source§fn clone(&self) -> AMPLIFYConfig
fn clone(&self) -> AMPLIFYConfig
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 Debug for AMPLIFYConfig
impl Debug for AMPLIFYConfig
source§impl Default for AMPLIFYConfig
impl Default for AMPLIFYConfig
source§impl<'de> Deserialize<'de> for AMPLIFYConfig
impl<'de> Deserialize<'de> for AMPLIFYConfig
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
Auto Trait Implementations§
impl Freeze for AMPLIFYConfig
impl RefUnwindSafe for AMPLIFYConfig
impl Send for AMPLIFYConfig
impl Sync for AMPLIFYConfig
impl Unpin for AMPLIFYConfig
impl UnwindSafe for AMPLIFYConfig
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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