pub struct MistralRsBuilder { /* private fields */ }
Expand description
The MistralRsBuilder takes the pipeline and a scheduler method and constructs an Engine and a MistralRs instance. The Engine runs on a separate thread, and the MistralRs instance stays on the calling thread.
Implementations§
source§impl MistralRsBuilder
impl MistralRsBuilder
pub fn new( pipeline: Arc<Mutex<dyn Pipeline>>, method: SchedulerConfig, ) -> MistralRsBuilder
pub fn with_log(self, log: String) -> MistralRsBuilder
pub fn with_opt_log(self, log: Option<String>) -> MistralRsBuilder
pub fn with_truncate_sequence(self, truncate_sequence: bool) -> MistralRsBuilder
pub fn with_no_kv_cache(self, no_kv_cache: bool) -> MistralRsBuilder
pub fn with_no_prefix_cache(self, no_prefix_cache: bool) -> MistralRsBuilder
pub fn with_prefix_cache_n(self, prefix_cache_n: usize) -> MistralRsBuilder
pub fn with_disable_eos_stop(self, disable_eos_stop: bool) -> MistralRsBuilder
pub fn with_gemm_full_precision_f16( self, gemm_full_precision: bool, ) -> MistralRsBuilder
pub fn with_throughput_logging(self) -> MistralRsBuilder
pub fn build(self) -> Arc<MistralRs>
Auto Trait Implementations§
impl Freeze for MistralRsBuilder
impl !RefUnwindSafe for MistralRsBuilder
impl Send for MistralRsBuilder
impl Sync for MistralRsBuilder
impl Unpin for MistralRsBuilder
impl !UnwindSafe for MistralRsBuilder
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> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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