pub struct DylibTokenizer { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Drop for DylibTokenizer
impl Drop for DylibTokenizer
impl Send for DylibTokenizer
impl Sync for DylibTokenizer
Source§impl Tokenizer for DylibTokenizer
impl Tokenizer for DylibTokenizer
fn encode(&self, text: &str) -> Vec<u32>
fn token_bytes(&self, token: u32) -> Vec<u8> ⓘ
fn vocab_size(&self) -> u32
fn special_tokens(&self) -> Vec<(String, u32)>
fn bos_token(&self) -> Option<u32>
fn eos_token(&self) -> u32
fn chat_template_jinja(&self) -> String
fn chat_template_named(&self, name: &str) -> Option<String>
fn encode_plain(&self, _text: &str) -> Option<Vec<u32>>
fn encode_pieces(&self, _pieces: &[(&str, bool)]) -> Option<Vec<u32>>
Auto Trait Implementations§
impl Freeze for DylibTokenizer
impl RefUnwindSafe for DylibTokenizer
impl Unpin for DylibTokenizer
impl UnsafeUnpin for DylibTokenizer
impl UnwindSafe for DylibTokenizer
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> 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