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
1
2
3
4
5
6
7
8
9
10
11
//! `Qdrant/bm25` has no device, no dtype and no checkpoint to fetch, so `build()` cannot fail.

use candding::Bm25TextEmbedding;

fn main() {
  let model = Bm25TextEmbedding::builder().build();
  let passage = model.passage_embed(&["The quick brown fox jumps over the lazy dog."]);
  let query = model.query_embed(&["a quick fox"]);
  println!("indices in the passage row: {}", passage[0].len());
  println!("query . passage = {:.4}", query[0].dot(&passage[0]));
}