pub struct EngineConfigBuilder { /* private fields */ }Expand description
Builder for EngineConfig.
Implementations§
Source§impl EngineConfigBuilder
impl EngineConfigBuilder
Sourcepub fn model(self, repo_id: impl Into<String>) -> Self
pub fn model(self, repo_id: impl Into<String>) -> Self
Sets the model from a HuggingFace repository ID.
Sourcepub fn model_source(self, source: ModelSource) -> Self
pub fn model_source(self, source: ModelSource) -> Self
Sets the model source directly.
Sourcepub fn device(self, device: DeviceType) -> Self
pub fn device(self, device: DeviceType) -> Self
Sets the device.
Sourcepub fn memory(self, config: MemoryConfig) -> Self
pub fn memory(self, config: MemoryConfig) -> Self
Sets the memory configuration.
Sourcepub fn quantization(self, quant: QuantizationType) -> Self
pub fn quantization(self, quant: QuantizationType) -> Self
Sets the quantization.
Sourcepub fn max_batch_size(self, size: u32) -> Self
pub fn max_batch_size(self, size: u32) -> Self
Sets the maximum batch size.
Sourcepub fn max_seq_len(self, len: u32) -> Self
pub fn max_seq_len(self, len: u32) -> Self
Sets the maximum sequence length.
Sourcepub fn speculative(self, config: SpeculativeConfig) -> Self
pub fn speculative(self, config: SpeculativeConfig) -> Self
Enables speculative decoding.
Trait Implementations§
Source§impl Debug for EngineConfigBuilder
impl Debug for EngineConfigBuilder
Source§impl Default for EngineConfigBuilder
impl Default for EngineConfigBuilder
Source§fn default() -> EngineConfigBuilder
fn default() -> EngineConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EngineConfigBuilder
impl RefUnwindSafe for EngineConfigBuilder
impl Send for EngineConfigBuilder
impl Sync for EngineConfigBuilder
impl Unpin for EngineConfigBuilder
impl UnsafeUnpin for EngineConfigBuilder
impl UnwindSafe for EngineConfigBuilder
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> ErasedDestructor for Twhere
T: 'static,
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