Struct candle_transformers::models::t5::Config
source · pub struct Config {Show 20 fields
pub vocab_size: usize,
pub d_model: usize,
pub d_kv: usize,
pub d_ff: usize,
pub num_layers: usize,
pub num_decoder_layers: Option<usize>,
pub num_heads: usize,
pub relative_attention_num_buckets: usize,
pub relative_attention_max_distance: usize,
pub dropout_rate: f64,
pub layer_norm_epsilon: f64,
pub initializer_factor: f64,
pub feed_forward_proj: ActivationWithOptionalGating,
pub tie_word_embeddings: bool,
pub is_decoder: bool,
pub is_encoder_decoder: bool,
pub use_cache: bool,
pub pad_token_id: usize,
pub eos_token_id: usize,
pub decoder_start_token_id: Option<usize>,
}
Fields§
§vocab_size: usize
§d_model: usize
§d_kv: usize
§d_ff: usize
§num_layers: usize
§num_decoder_layers: Option<usize>
§num_heads: usize
§relative_attention_num_buckets: usize
§relative_attention_max_distance: usize
§dropout_rate: f64
§layer_norm_epsilon: f64
§initializer_factor: f64
§feed_forward_proj: ActivationWithOptionalGating
§tie_word_embeddings: bool
§is_decoder: bool
§is_encoder_decoder: bool
§use_cache: bool
§pad_token_id: usize
§eos_token_id: usize
§decoder_start_token_id: Option<usize>
Implementations§
source§impl Config
impl Config
pub fn musicgen_small() -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
source§impl PartialEq for Config
impl PartialEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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