pub enum BuiltinTemplate {
ChatMl,
Plain,
}Expand description
Hand-written renderers, kept only for checkpoints that ship no
tokenizer.chat_template at all.
These are the six variants the sniffing implementation used. They are
no longer selected by sniffing — a checkpoint either has a template
(and it is evaluated) or it does not (and BuiltinTemplate::ChatMl
or BuiltinTemplate::Plain applies, matching llama.cpp --jinja).
Variants§
ChatMl
<|im_start|>{role}\n{content}<|im_end|>\n, ending with
<|im_start|>assistant\n. llama.cpp’s CHATML_TEMPLATE_SRC
default for a real checkpoint with no template of its own.
Plain
{role}: {content} lines, no special tokens — for byte/synthetic
tokenizers where no real vocabulary exists to carry markers.
Trait Implementations§
Source§impl Clone for BuiltinTemplate
impl Clone for BuiltinTemplate
Source§fn clone(&self) -> BuiltinTemplate
fn clone(&self) -> BuiltinTemplate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BuiltinTemplate
Source§impl Debug for BuiltinTemplate
impl Debug for BuiltinTemplate
impl Eq for BuiltinTemplate
Source§impl PartialEq for BuiltinTemplate
impl PartialEq for BuiltinTemplate
impl StructuralPartialEq for BuiltinTemplate
Auto Trait Implementations§
impl Freeze for BuiltinTemplate
impl RefUnwindSafe for BuiltinTemplate
impl Send for BuiltinTemplate
impl Sync for BuiltinTemplate
impl Unpin for BuiltinTemplate
impl UnsafeUnpin for BuiltinTemplate
impl UnwindSafe for BuiltinTemplate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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