Struct rust_bert::gpt_neo::GptNeoConfig
source · [−]pub struct GptNeoConfig {Show 20 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 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,
}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: Activationattention_dropout: f64attention_layers: Vec<AttentionLayerType>attention_types: Vec<(Vec<AttentionLayerType>, i64)>intermediate_size: Option<i64>bos_token_id: i64eos_token_id: i64vocab_size: i64num_layers: i64num_heads: i64window_size: i64embed_dropout: f64initializer_range: f64layer_norm_epsilon: f64max_position_embeddings: i64output_past: Option<bool>output_attentions: Option<bool>resid_dropout: f64Trait Implementations
sourceimpl Clone for GptNeoConfig
impl Clone for GptNeoConfig
sourcefn clone(&self) -> GptNeoConfig
fn clone(&self) -> GptNeoConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Config for GptNeoConfig
impl Config for GptNeoConfig
sourceimpl Debug for GptNeoConfig
impl Debug for GptNeoConfig
sourceimpl Default for GptNeoConfig
impl Default for GptNeoConfig
sourceimpl<'de> Deserialize<'de> for GptNeoConfig
impl<'de> Deserialize<'de> for GptNeoConfig
sourcefn 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
sourceimpl Serialize for GptNeoConfig
impl Serialize for GptNeoConfig
Auto Trait Implementations
impl RefUnwindSafe for GptNeoConfig
impl Send for GptNeoConfig
impl Sync for GptNeoConfig
impl Unpin for GptNeoConfig
impl UnwindSafe for GptNeoConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more