pub struct OnnxProviderConfig {
pub model_path: PathBuf,
pub tokenizer_path: PathBuf,
pub dimension: u32,
pub pooling: Pooling,
pub normalize: bool,
pub max_tokens: usize,
pub intra_op_threads: Option<usize>,
}Expand description
What a deployment declares about its model.
Fields§
§model_path: PathBuf§tokenizer_path: PathBuf§dimension: u32Vector width the model emits. Checked against the model’s own output on the first batch, not taken on trust.
pooling: Pooling§normalize: boolL2-normalize the pooled vector. On for cosine similarity, which is what the gear’s index serves.
max_tokens: usizeLongest token sequence handed to the model; longer inputs are truncated.
intra_op_threads: Option<usize>ONNX Runtime intra-op threads. None leaves the runtime’s default.
Implementations§
Trait Implementations§
Source§impl Clone for OnnxProviderConfig
impl Clone for OnnxProviderConfig
Auto Trait Implementations§
impl Freeze for OnnxProviderConfig
impl RefUnwindSafe for OnnxProviderConfig
impl Send for OnnxProviderConfig
impl Sync for OnnxProviderConfig
impl Unpin for OnnxProviderConfig
impl UnsafeUnpin for OnnxProviderConfig
impl UnwindSafe for OnnxProviderConfig
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> 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