pub struct ModelData {
pub vocab: Vec<TokenInfo>,
pub special_tokens: Option<Vec<SpecialTokenInfo>>,
pub config: TekkenConfig,
pub audio: Option<AudioConfig>,
}Expand description
Complete model data loaded from a tokenizer configuration file.
This struct represents the entire configuration and data needed to initialize
a Tekken tokenizer, typically loaded from a JSON file like tekken.json.
§Fields
vocab- All vocabulary tokens with their metadataspecial_tokens- Optional special token definitionsconfig- Core tokenizer configurationaudio- Optional audio processing configuration
Fields§
§vocab: Vec<TokenInfo>All vocabulary tokens with their metadata.
special_tokens: Option<Vec<SpecialTokenInfo>>Optional special token definitions (uses defaults if None).
config: TekkenConfigCore tokenizer configuration parameters.
audio: Option<AudioConfig>Optional audio processing configuration for multimodal support.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelData
impl<'de> Deserialize<'de> for ModelData
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
Auto Trait Implementations§
impl Freeze for ModelData
impl RefUnwindSafe for ModelData
impl Send for ModelData
impl Sync for ModelData
impl Unpin for ModelData
impl UnsafeUnpin for ModelData
impl UnwindSafe for ModelData
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