candding 0.1.0

Pure candle embeddings for Rust with no ONNX: dense, sparse, multi-vector and rerank models today, image models on the roadmap
Documentation
//! Public embedding APIs.

use std::sync::Mutex;

mod batching;
mod bm25;
mod builder;
mod fit;
mod multi_vector;
mod postprocess;
mod rerank;
mod sparse;
#[cfg(test)]
mod synthetic;
mod text;

pub use bm25::Bm25TextEmbedding;
pub use bm25::Bm25TextEmbeddingBuilder;
pub use builder::TextEmbeddingBuilder;
pub use multi_vector::MultiVectorTextEmbedding;
pub use multi_vector::MultiVectorTextEmbeddingBuilder;
pub use rerank::TextCrossEncoder;
pub use rerank::TextCrossEncoderBuilder;
pub use sparse::SparseTextEmbedding;
pub use sparse::SparseTextEmbeddingBuilder;
pub use text::TextEmbedding;

/// Serializes every Metal forward in the process: `device::auto` hands every pipeline the same ordinal-0
/// `MetalDevice` and buffer pool, and parallel forwards corrupt each other's output.
static METAL_FORWARD_LOCK: Mutex<()> = Mutex::new(());