Struct candle_transformers::models::llama::Config
source · pub struct Config {
pub hidden_size: usize,
pub intermediate_size: usize,
pub vocab_size: usize,
pub num_hidden_layers: usize,
pub num_attention_heads: usize,
pub num_key_value_heads: usize,
pub use_flash_attn: bool,
pub rms_norm_eps: f64,
pub rope_theta: f32,
pub bos_token_id: Option<u32>,
pub eos_token_id: Option<u32>,
}
Fields§
§intermediate_size: usize
§vocab_size: usize
§num_attention_heads: usize
§num_key_value_heads: usize
§use_flash_attn: bool
§rms_norm_eps: f64
§rope_theta: f32
§bos_token_id: Option<u32>
§eos_token_id: Option<u32>
Implementations§
source§impl Config
impl Config
pub fn config_7b_v1(use_flash_attn: bool) -> Self
pub fn config_7b_v2(use_flash_attn: bool) -> Self
Trait Implementations§
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