Metadata-Version: 2.4
Name: candle-embed
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: numpy>=1.24
License-File: LICENSE
Summary: Lightweight pure-Rust BERT sentence embeddings for Python via Candle (abi3 wheels, no onnxruntime)
Home-Page: https://github.com/mmacpherson/candle-embed
Author: Mike Macpherson
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/mmacpherson/candle-embed
Project-URL: Repository, https://github.com/mmacpherson/candle-embed

# candle-embed

Lightweight pure-Rust BERT sentence embeddings for Python via Hugging Face
[Candle](https://github.com/huggingface/candle) and `tokenizers`, shipped as a
single `cp311-abi3` wheel (Python 3.11+) with **no `onnxruntime` and no PyTorch**.

```python
from candle_embed import TextEmbedding

model = TextEmbedding("BAAI/bge-small-en-v1.5")
vecs = list(model.embed(["Represent this sentence for searching relevant passages: payment"]))
```

## Features
- Drop-in `TextEmbedding(model_name).embed(...)` API compatible with `fastembed`
- Automatic `1_Pooling/config.json` (`cls` vs masked `mean`) and `sentence_bert_config.json` (`max_seq_length`) detection
- Pure Rust CPU inference (`candle-core` + `candle-transformers` + `tokenizers` with `fancy-regex`) — zero C/OpenSSL/ONNX Runtime dependencies
- Single `cp311-abi3` wheel supporting Python 3.11–3.15+

