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
# candding

candding is an embedding library for Rust that implements every model architecture on [candle](https://github.com/huggingface/candle)'s `candle-core` and `candle-nn`, with no ONNX runtime and no `candle-transformers`. It returns dense vectors, sparse rows, multi-vector matrices and rerank scores, and every catalog model is tested against its reference implementation, with a status per device and dtype.

```bash
cargo add candding
```

```rust
use candding::TextEmbedding;

fn main() -> candding::Result<()> {
  let model = TextEmbedding::builder("BAAI/bge-small-en-v1.5").build()?;
  let passages = model.passage_embed(&["Embeddings map text to vectors."], None)?;
  let queries = model.query_embed(&["what do embeddings do"], None)?;
  let score: f32 = queries[0].iter().zip(&passages[0]).map(|(q, p)| q * p).sum();
  println!("dim {} score {score:.4}", model.dim());
  Ok(())
}
```

## What ships

| Output | Entry point | Models |
|---|---|---|
| Dense vectors | `TextEmbedding` | 35, in nine families: BERT, Qwen3, Gemma3, XLM-RoBERTa, MPNet, JinaBERT, NomicBERT, ModernBERT and GTE |
| Sparse `(index, weight)` rows | `SparseTextEmbedding`, `Bm25TextEmbedding` | 6: `prithivida/Splade_PP_en_v1`, `naver/splade-code-06B`, `BAAI/bge-m3`, miniCOIL, BM42 and BM25 |
| Multi-vector matrices for late interaction | `MultiVectorTextEmbedding` | 4: `BAAI/bge-m3`, `colbert-ir/colbertv2.0`, `answerdotai/answerai-colbert-small-v1` and `jinaai/jina-colbert-v2` |
| One score per query and document | `TextCrossEncoder` | 8: `cross-encoder/ms-marco-MiniLM-L6-v2`, `BAAI/bge-reranker-base` and `-v2-m3`, `jinaai/jina-reranker-v1-tiny-en` and `-v2-base-multilingual`, and `Qwen/Qwen3-Reranker` at 0.6B, 4B and 8B |

The [model catalog](https://candding.rust-dd.com/docs/models) lists every model with its licence and its status per device and dtype.

## Python

```bash
pip install candding
```

```python
from candding import TextEmbedding

model = TextEmbedding("BAAI/bge-small-en-v1.5")
passages = model.passage_embed(["Embeddings map text to vectors."])
queries = model.query_embed(["what do embeddings do"])
print(model.dim, queries @ passages.T)
```

The bindings keep the Rust method names and return NumPy arrays. The wheels for Linux x86-64 and aarch64 and for macOS on Apple Silicon, with Metal, need no Rust toolchain; the [Python guide](https://candding.rust-dd.com/docs/python) has the API and the source build for CUDA.

## Requirements

| Requirement | Needed for |
|---|---|
| Linux or macOS | every build; Windows is not tested |
| Rust 1.94 or newer | every build |
| A C compiler | the default `download` feature, whose TLS stack builds `aws-lc-sys` from C; with `default-features = false` the builders read only the Hugging Face cache and local directories |

## Documentation

[candding.rust-dd.com](https://candding.rust-dd.com): [getting started](https://candding.rust-dd.com/docs/getting-started), [Python](https://candding.rust-dd.com/docs/python), [model catalog](https://candding.rust-dd.com/docs/models), [API](https://candding.rust-dd.com/docs/api), [CLI](https://candding.rust-dd.com/docs/cli) and [roadmap](https://candding.rust-dd.com/docs/roadmap).

## License

candding is licensed under either [Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT), at your option.

[NOTICE](NOTICE) carries the attribution for the model implementations derived from Hugging Face text-embeddings-inference.