pub struct GptNeoConfig {Show 23 fields
pub activation_function: Activation,
pub attention_dropout: f64,
pub attention_layers: Vec<AttentionLayerType>,
pub attention_types: Vec<(Vec<AttentionLayerType>, i64)>,
pub intermediate_size: Option<i64>,
pub bos_token_id: i64,
pub eos_token_id: i64,
pub forced_bos_token_id: Option<i64>,
pub forced_eos_token_id: Option<i64>,
pub vocab_size: i64,
pub num_layers: i64,
pub num_heads: i64,
pub hidden_size: i64,
pub window_size: i64,
pub embed_dropout: f64,
pub initializer_range: f64,
pub layer_norm_epsilon: f64,
pub max_position_embeddings: i64,
pub output_past: Option<bool>,
pub output_attentions: Option<bool>,
pub output_hidden_states: Option<bool>,
pub resid_dropout: f64,
pub decoder_start_token_id: Option<i64>,
}
Expand description
§GPT-Neo model configuration
Defines the GPT-Neo model architecture (e.g. number of layers, hidden layer size, vocab size…).
Fields§
§activation_function: Activation
§attention_dropout: f64
§attention_layers: Vec<AttentionLayerType>
§attention_types: Vec<(Vec<AttentionLayerType>, i64)>
§intermediate_size: Option<i64>
§bos_token_id: i64
§eos_token_id: i64
§forced_bos_token_id: Option<i64>
§forced_eos_token_id: Option<i64>
§vocab_size: i64
§num_layers: i64
§num_heads: i64
§window_size: i64
§embed_dropout: f64
§initializer_range: f64
§layer_norm_epsilon: f64
§max_position_embeddings: i64
§output_past: Option<bool>
§output_attentions: Option<bool>
§resid_dropout: f64
§decoder_start_token_id: Option<i64>
Trait Implementations§
Source§impl Clone for GptNeoConfig
impl Clone for GptNeoConfig
Source§fn clone(&self) -> GptNeoConfig
fn clone(&self) -> GptNeoConfig
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 GptNeoConfig
impl Config for GptNeoConfig
Source§impl Debug for GptNeoConfig
impl Debug for GptNeoConfig
Source§impl Default for GptNeoConfig
impl Default for GptNeoConfig
Source§impl<'de> Deserialize<'de> for GptNeoConfig
impl<'de> Deserialize<'de> for GptNeoConfig
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 GptNeoConfig
impl RefUnwindSafe for GptNeoConfig
impl Send for GptNeoConfig
impl Sync for GptNeoConfig
impl Unpin for GptNeoConfig
impl UnwindSafe for GptNeoConfig
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