pub struct PhiSource { /* private fields */ }Expand description
A PhiSource is the source to fetch a Phi-1.5 model from. The model to use, check out available models: https://huggingface.co/models?other=mixformer-sequential&sort=trending&search=phi The model must have a quantized version available with a safetensors file. (for example lmz/candle-quantized-phi)
Implementations§
source§impl PhiSource
impl PhiSource
sourcepub fn puffin_phi_v2() -> Self
pub fn puffin_phi_v2() -> Self
The puffin model based on phi-1.5.
sourcepub fn dolphin_phi_v2() -> Self
pub fn dolphin_phi_v2() -> Self
The dolphin model based on phi-2.
sourcepub fn with_revision(self, revision: String) -> Self
pub fn with_revision(self, revision: String) -> Self
Set the revision to use for the model.
sourcepub fn with_model_file(self, model_file: String) -> Self
pub fn with_model_file(self, model_file: String) -> Self
Set the model file to use for the model.
sourcepub fn with_tokenizer_file(self, tokenizer_file: String) -> Self
pub fn with_tokenizer_file(self, tokenizer_file: String) -> Self
Set the tokenizer file to use for the model.
sourcepub fn with_phi_config(self, phi_config: Config) -> Self
pub fn with_phi_config(self, phi_config: Config) -> Self
Set the phi config to use for the model.
sourcepub fn with_chat_markers(self, chat_markers: ChatMarkers) -> Self
pub fn with_chat_markers(self, chat_markers: ChatMarkers) -> Self
Set the chat markers to use for the model.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PhiSource
impl Send for PhiSource
impl Sync for PhiSource
impl Unpin for PhiSource
impl UnwindSafe for PhiSource
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