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
//! Pick the device, dtype, max length and batch size explicitly.

use candding::DType;
use candding::TextEmbedding;
use candding::device;

fn main() -> candding::Result<()> {
  let model = TextEmbedding::builder("sentence-transformers/all-MiniLM-L6-v2")
    .device(device::cpu())
    .dtype(DType::F32)
    .max_length(256)
    .batch_size(16)
    .build()?;
  let rows = model.embed(&["hello world"], None)?;
  println!(
    "device {} dim {} max_length {} first {:.4}",
    device::describe(model.device()),
    model.dim(),
    model.max_length(),
    rows[0][0]
  );
  Ok(())
}