pub struct FastembedUserDefinedOpts {
pub onnx_file: Vec<u8>,
pub tokenizer_file: Vec<u8>,
pub tokenizer_config_file: Option<Vec<u8>>,
pub special_tokens_map_file: Option<Vec<u8>>,
pub config_file: Option<Vec<u8>>,
pub dim: usize,
pub pooling: PoolingMode,
pub execution: ExecutionPreference,
pub max_length: usize,
}Expand description
Options for FastembedEmbedder::from_user_defined. All byte buffers are
moved into the constructor — they aren’t retained inside the embedder once
the ONNX session has been built (the session owns its parsed graph).
Storage-side dim invariant: see the constructor’s rustdoc — dim must
match the ONNX model’s output AND should match Lunaris’s storage schema
(default 768) unless storage is reindexed.
Fields§
§onnx_file: Vec<u8>Raw bytes of the ONNX graph (e.g., model.onnx).
tokenizer_file: Vec<u8>Raw bytes of the HF-format tokenizer.json.
tokenizer_config_file: Option<Vec<u8>>Optional tokenizer_config.json bytes. Empty if None.
special_tokens_map_file: Option<Vec<u8>>Optional special_tokens_map.json bytes.
config_file: Option<Vec<u8>>Optional model config.json bytes (architecture metadata).
dim: usizeOutput dimensionality declared by the operator. MUST match what the ONNX graph actually emits; a mismatch surfaces as a vector-index rejection at the first ingest call.
pooling: PoolingModePooling strategy applied to token-level embeddings to produce the
sentence vector. Mirrors fastembed’s Pooling enum.
execution: ExecutionPreferenceORT execution provider preference (same enum as the default path).
max_length: usizeToken context window. Defaults to 2048 to match EmbeddingGemma300M.
Trait Implementations§
Source§impl Clone for FastembedUserDefinedOpts
impl Clone for FastembedUserDefinedOpts
Source§fn clone(&self) -> FastembedUserDefinedOpts
fn clone(&self) -> FastembedUserDefinedOpts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FastembedUserDefinedOpts
impl Debug for FastembedUserDefinedOpts
Auto Trait Implementations§
impl Freeze for FastembedUserDefinedOpts
impl RefUnwindSafe for FastembedUserDefinedOpts
impl Send for FastembedUserDefinedOpts
impl Sync for FastembedUserDefinedOpts
impl Unpin for FastembedUserDefinedOpts
impl UnsafeUnpin for FastembedUserDefinedOpts
impl UnwindSafe for FastembedUserDefinedOpts
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
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>
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>
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