pub struct Lfm2Config {Show 39 fields
pub architectures: Vec<String>,
pub block_auto_adjust_ff_dim: bool,
pub block_dim: usize,
pub block_ff_dim: usize,
pub block_ffn_dim_multiplier: f64,
pub block_mlp_init_scale: f64,
pub block_multiple_of: usize,
pub block_norm_eps: f64,
pub block_out_init_scale: f64,
pub block_use_swiglu: bool,
pub block_use_xavier_init: bool,
pub bos_token_id: Option<u32>,
pub conv_l_cache: usize,
pub conv_bias: bool,
pub conv_dim: usize,
pub conv_dim_out: Option<usize>,
pub conv_use_xavier_init: bool,
pub eos_token_id: u32,
pub full_attn_idxs: Option<Vec<usize>>,
pub layer_types: Option<Vec<String>>,
pub hidden_size: usize,
pub initializer_range: f64,
pub intermediate_size: Option<usize>,
pub max_position_embeddings: usize,
pub model_type: String,
pub norm_eps: f64,
pub num_attention_heads: usize,
pub num_heads: usize,
pub num_hidden_layers: usize,
pub num_key_value_heads: usize,
pub pad_token_id: Option<u32>,
pub rope_theta: Option<f32>,
pub rope_parameters: Option<RopeParameters>,
pub torch_dtype: Option<String>,
pub dtype: Option<String>,
pub use_cache: bool,
pub use_pos_enc: bool,
pub vocab_size: usize,
pub tie_embedding: Option<bool>,
}Fields§
§architectures: Vec<String>§block_auto_adjust_ff_dim: bool§block_dim: usize§block_ff_dim: usize§block_ffn_dim_multiplier: f64§block_mlp_init_scale: f64§block_multiple_of: usize§block_norm_eps: f64§block_out_init_scale: f64§block_use_swiglu: bool§block_use_xavier_init: bool§bos_token_id: Option<u32>§conv_l_cache: usize§conv_bias: bool§conv_dim: usize§conv_dim_out: Option<usize>§conv_use_xavier_init: bool§eos_token_id: u32§full_attn_idxs: Option<Vec<usize>>§layer_types: Option<Vec<String>>§initializer_range: f64§intermediate_size: Option<usize>§max_position_embeddings: usize§model_type: String§norm_eps: f64§num_attention_heads: usize§num_heads: usize§num_key_value_heads: usize§pad_token_id: Option<u32>§rope_theta: Option<f32>§rope_parameters: Option<RopeParameters>§torch_dtype: Option<String>§dtype: Option<String>§use_cache: bool§use_pos_enc: bool§vocab_size: usize§tie_embedding: Option<bool>Implementations§
Source§impl Lfm2Config
impl Lfm2Config
pub fn full_attn_idx2layer_type(&mut self)
pub fn get_layer_types(&self) -> Result<Vec<String>>
Trait Implementations§
Source§impl Clone for Lfm2Config
impl Clone for Lfm2Config
Source§impl Debug for Lfm2Config
impl Debug for Lfm2Config
Source§impl<'de> Deserialize<'de> for Lfm2Config
impl<'de> Deserialize<'de> for Lfm2Config
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>,
Source§impl PartialEq for Lfm2Config
impl PartialEq for Lfm2Config
impl StructuralPartialEq for Lfm2Config
Auto Trait Implementations§
impl Freeze for Lfm2Config
impl RefUnwindSafe for Lfm2Config
impl Send for Lfm2Config
impl Sync for Lfm2Config
impl Unpin for Lfm2Config
impl UnsafeUnpin for Lfm2Config
impl UnwindSafe for Lfm2Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
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> ⓘ
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> ⓘ
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);