pub struct EmbeddingModelConfig {
pub weights_path: String,
pub tokenizer_path: Option<String>,
pub dimension: u32,
pub max_seq_len: u32,
pub backend: InferenceBackend,
pub model_name: String,
pub model_version: String,
}Expand description
Configuration for loading a real embedding model from disk.
This is the configuration type callers populate to construct a real
EmbeddingModel implementation via a future BackendLoader. The
MockEmbeddingModel ignores this; it is used only when testing the
pipeline without model files.
Once a candle or onnx-runtime integration crate is added (M12
full implementation), it will consume this config and return a
Box<dyn EmbeddingModel>.
Fields§
§weights_path: StringPath to the model weights file (ONNX .onnx or safetensors).
tokenizer_path: Option<String>Tokenizer config path (tokenizer.json for HuggingFace tokenizers).
dimension: u32Expected embedding dimension.
max_seq_len: u32Maximum input token length (truncation limit).
backend: InferenceBackendCompute backend selection.
model_name: StringModel name for registry (e.g. “nomic-embed-text-v1.5”).
model_version: StringModel version string.
Implementations§
Source§impl EmbeddingModelConfig
impl EmbeddingModelConfig
Sourcepub fn weights_exist(&self) -> bool
pub fn weights_exist(&self) -> bool
Check that the model weights file exists on disk.
Trait Implementations§
Source§impl Clone for EmbeddingModelConfig
impl Clone for EmbeddingModelConfig
Source§fn clone(&self) -> EmbeddingModelConfig
fn clone(&self) -> EmbeddingModelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more