pub struct TrainingConfig {Show 13 fields
pub vocabulary_id: VocabularyId,
pub vocabulary_version: Version,
pub vocab_size: u32,
pub min_frequency: u64,
pub pretokenizer: Pretokenizer,
pub reserved_tokens: Vec<String>,
pub max_token_length: Option<usize>,
pub train_window: usize,
pub dictionary: Vec<String>,
pub max_corpus_units: Option<u64>,
pub seed: u64,
pub description: Option<String>,
pub license: Option<String>,
}Expand description
Everything a training run needs. Identical configuration and corpus must produce an identical vocabulary (FR-003 deterministic mode is the only mode in v0.1).
Fields§
§vocabulary_id: VocabularyId§vocabulary_version: Version§vocab_size: u32Target total number of tokens, including base and reserved tokens.
min_frequency: u64A candidate must occur at least this often to become a token.
pretokenizer: Pretokenizer§reserved_tokens: Vec<String>Special tokens appended after learned tokens. Never produced by encode.
max_token_length: Option<usize>Upper bound on a learned token’s length in units (bytes or symbols).
train_window: usizeWindow length used to split unsegmented input while counting.
dictionary: Vec<String>Fixed entries for the dictionary algorithm.
max_corpus_units: Option<u64>Job limit: refuse a corpus larger than this many units.
seed: u64Recorded for provenance. No v0.1 algorithm consumes randomness.
description: Option<String>§license: Option<String>Implementations§
Trait Implementations§
Source§impl Clone for TrainingConfig
impl Clone for TrainingConfig
Source§impl Debug for TrainingConfig
impl Debug for TrainingConfig
Source§impl<'de> Deserialize<'de> for TrainingConfig
impl<'de> Deserialize<'de> for TrainingConfig
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 TrainingConfig
impl PartialEq for TrainingConfig
Source§impl Serialize for TrainingConfig
impl Serialize for TrainingConfig
impl StructuralPartialEq for TrainingConfig
Auto Trait Implementations§
impl Forget for TrainingConfig
impl Freeze for TrainingConfig
impl Move for TrainingConfig
impl RefUnwindSafe for TrainingConfig
impl Send for TrainingConfig
impl Sync for TrainingConfig
impl Unpin for TrainingConfig
impl UnsafeUnpin for TrainingConfig
impl UnwindSafe for TrainingConfig
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