pub struct TokenizerJson {
pub added_tokens: Vec<AddedTokenConfig>,
pub normalizer: Option<NormalizerConfig>,
pub pre_tokenizer: Option<PreTokenizerConfig>,
pub model: ModelConfig,
pub post_processor: Option<PostProcessorConfig>,
pub decoder: Option<DecoderConfig>,
pub extra: HashMap<String, Value>,
}Expand description
Parsed tokenizer.json.
The five pipeline steps are deserialized into typed enums. Any other
top-level keys (e.g. version) are captured in extra.
Fields§
§added_tokens: Vec<AddedTokenConfig>§normalizer: Option<NormalizerConfig>§pre_tokenizer: Option<PreTokenizerConfig>§model: ModelConfig§post_processor: Option<PostProcessorConfig>§decoder: Option<DecoderConfig>§extra: HashMap<String, Value>Trait Implementations§
Source§impl Debug for TokenizerJson
impl Debug for TokenizerJson
Source§impl<'de> Deserialize<'de> for TokenizerJson
impl<'de> Deserialize<'de> for TokenizerJson
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 TokenizerJson
impl RefUnwindSafe for TokenizerJson
impl Send for TokenizerJson
impl Sync for TokenizerJson
impl Unpin for TokenizerJson
impl UnsafeUnpin for TokenizerJson
impl UnwindSafe for TokenizerJson
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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