Documentation
Documentation
Install Kjarni and run embeddings, classification, search, chat and speech to text from Python, C#, C++, Go, Rust, the browser or the command line.
Kjarni is a transformer inference library: it runs models inside your program, with the same output as PyTorch and no Python or server. It is one native engine written in Rust, with bindings for Python, C#, Go and C/C++, a WebAssembly package for the browser, and a command line tool. On Linux the native library links only against glibc.
Quickstart
pip install kjarni
from kjarni import Embedder
e = Embedder("minilm-l6-v2")
print(e.similarity("doctor", "physician"))
# 0.8598
The model downloads on first use and is cached, so everything after that works offline. The other languages make the same call and get the same number: see Install for each package, Guides for worked examples, and the API reference for every type and function.