Skip to main content

Crate frankensearch_embed

Crate frankensearch_embed 

Source
Expand description

Embedder implementations for the frankensearch hybrid search library.

Provides three tiers of text embedding:

  • Hash (hash feature, default): FNV-1a hash embedder, zero dependencies, always available.
  • Model2Vec (model2vec feature): potion-128M static embedder, fast tier (~0.57ms).
  • FastEmbed (fastembed feature): MiniLM-L6-v2 ONNX embedder, quality tier (~128ms).

The EmbedderStack auto-detection probes for available models and configures the best fast+quality pair automatically.

Re-exports§

pub use auto_detect::DimReduceEmbedder;
pub use auto_detect::EmbedderStack;
pub use auto_detect::ModelAvailabilityDiagnostic;
pub use auto_detect::ModelStatus;
pub use auto_detect::TwoTierAvailability;
pub use batch_coalescer::BatchCoalescer;
pub use batch_coalescer::CoalescedBatch;
pub use batch_coalescer::CoalescerConfig;
pub use batch_coalescer::CoalescerMetrics;
pub use batch_coalescer::Priority;
pub use cached_embedder::CacheStats;
pub use cached_embedder::CachedEmbedder;
pub use model_cache::ENV_DATA_DIR;
pub use model_cache::ENV_MODEL_DIR;
pub use model_cache::KnownModel;
pub use model_cache::MODEL_CACHE_LAYOUT_VERSION;
pub use model_cache::ModelCacheLayout;
pub use model_cache::ModelDirEntry;
pub use model_cache::ensure_cache_layout;
pub use model_cache::ensure_default_cache;
pub use model_cache::is_model_installed;
pub use model_cache::known_models;
pub use model_cache::model_file_path;
pub use model_cache::resolve_cache_root;
pub use model_manifest::ConsentSource;
pub use model_manifest::DownloadConsent;
pub use model_manifest::MANIFEST_SCHEMA_VERSION;
pub use model_manifest::ModelFile;
pub use model_manifest::ModelLifecycle;
pub use model_manifest::ModelManifest;
pub use model_manifest::ModelManifestCatalog;
pub use model_manifest::ModelState;
pub use model_manifest::ModelTier;
pub use model_manifest::PLACEHOLDER_VERIFY_AFTER_DOWNLOAD;
pub use model_manifest::VerificationMarker;
pub use model_manifest::is_verification_cached;
pub use model_manifest::verify_dir_cached;
pub use model_manifest::verify_file_sha256;
pub use model_manifest::write_verification_marker;
pub use model_registry::BAKEOFF_CUTOFF_DATE;
pub use model_registry::EmbedderRegistry;
pub use model_registry::RegisteredEmbedder;
pub use model_registry::RegisteredReranker;
pub use model_registry::registered_embedders;
pub use model_registry::registered_rerankers;
pub use hash_embedder::HashAlgorithm;
pub use hash_embedder::HashEmbedder;

Modules§

auto_detect
Embedder auto-detection and fallback stack assembly.
batch_coalescer
Embedding batch coalescing with deadline-aware scheduling.
cached_embedder
Caching wrapper for any Embedder implementation.
hash_embedder
FNV-1a hash-based embedder for frankensearch.
model_cache
XDG-compliant model cache directory layout.
model_manifest
Model manifest definitions and verification helpers.
model_registry
Static model registry with runtime availability checks.

Structs§

EmbeddedModelInstallSummary
Summary returned by the no-op lite-build materialization.

Functions§

ensure_default_semantic_models
No-op: lite builds have no embedded models to materialize.