pub(crate) struct CodecArgs {Show 45 fields
pub(crate) preset: Preset,
pub(crate) vocab_size: Option<usize>,
pub(crate) n_layer: Option<usize>,
pub(crate) d_model: Option<usize>,
pub(crate) n_head: Option<usize>,
pub(crate) d_inner: Option<usize>,
pub(crate) ctx_len: Option<usize>,
pub(crate) dropout: Option<f32>,
pub(crate) tie_embeddings: Option<bool>,
pub(crate) position_type: Option<CliPositionType>,
pub(crate) no_qk_norm: bool,
pub(crate) norm_style: Option<CliNormStyle>,
pub(crate) batch_size: Option<usize>,
pub(crate) block_len: Option<usize>,
pub(crate) online_loss: Option<CliOnlineLoss>,
pub(crate) project_only_targets: Option<bool>,
pub(crate) lr: Option<f64>,
pub(crate) min_lr_ratio: Option<f64>,
pub(crate) warmup: Option<usize>,
pub(crate) clip: Option<f64>,
pub(crate) adam_eps: Option<f64>,
pub(crate) beta1: Option<f64>,
pub(crate) beta2: Option<f64>,
pub(crate) retrain_period: Option<usize>,
pub(crate) retrain_len: Option<usize>,
pub(crate) retrain_epochs: Option<usize>,
pub(crate) retrain_early_epochs: Option<usize>,
pub(crate) retrain_early_until: Option<usize>,
pub(crate) retrain_lr: Option<String>,
pub(crate) retrain_update_len: Option<usize>,
pub(crate) retrain_batch_size: Option<usize>,
pub(crate) seed: Option<u64>,
pub(crate) dtype: Option<CliDType>,
pub(crate) force_bf16: bool,
pub(crate) device: Option<CliDevice>,
pub(crate) max_tokens: Option<usize>,
pub(crate) raw_bytes: Option<u64>,
pub(crate) vocab_bytes: Option<u64>,
pub(crate) vocab_file: Option<PathBuf>,
pub(crate) initial_prior: Option<PathBuf>,
pub(crate) log_interval: Option<usize>,
pub(crate) checkpoint_dir: Option<PathBuf>,
pub(crate) checkpoint_every_blocks: Option<usize>,
pub(crate) stop_after_blocks: Option<usize>,
pub(crate) run_dir: Option<PathBuf>,
}Fields§
§preset: PresetConfiguration preset (tiny for fast local runs, v2 for full enwik9 settings).
vocab_size: Option<usize>§n_layer: Option<usize>§d_model: Option<usize>§n_head: Option<usize>§d_inner: Option<usize>§ctx_len: Option<usize>§dropout: Option<f32>§tie_embeddings: Option<bool>§position_type: Option<CliPositionType>§no_qk_norm: bool§norm_style: Option<CliNormStyle>§batch_size: Option<usize>§block_len: Option<usize>§online_loss: Option<CliOnlineLoss>§project_only_targets: Option<bool>§lr: Option<f64>§min_lr_ratio: Option<f64>§warmup: Option<usize>§clip: Option<f64>§adam_eps: Option<f64>§beta1: Option<f64>§beta2: Option<f64>§retrain_period: Option<usize>§retrain_len: Option<usize>§retrain_epochs: Option<usize>§retrain_early_epochs: Option<usize>§retrain_early_until: Option<usize>§retrain_lr: Option<String>§retrain_update_len: Option<usize>§retrain_batch_size: Option<usize>§seed: Option<u64>§dtype: Option<CliDType>§force_bf16: bool§device: Option<CliDevice>§max_tokens: Option<usize>§raw_bytes: Option<u64>§vocab_bytes: Option<u64>§vocab_file: Option<PathBuf>§initial_prior: Option<PathBuf>§log_interval: Option<usize>§checkpoint_dir: Option<PathBuf>§checkpoint_every_blocks: Option<usize>§stop_after_blocks: Option<usize>§run_dir: Option<PathBuf>Implementations§
Source§impl CodecArgs
impl CodecArgs
pub(crate) fn build_config( &self, inferred_vocab_size: Option<usize>, ) -> Result<CodecConfig>
Trait Implementations§
Source§impl Args for CodecArgs
impl Args for CodecArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for CodecArgs
impl FromArgMatches for CodecArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for CodecArgs
impl RefUnwindSafe for CodecArgs
impl Send for CodecArgs
impl Sync for CodecArgs
impl Unpin for CodecArgs
impl UnsafeUnpin for CodecArgs
impl UnwindSafe for CodecArgs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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