Install
pito-embed is a Rust library. It isn’t on crates.io: both crates come from the GitHub repository and pin the same tag. It needs Rust 1.97 or newer, and the build downloads ONNX Runtime’s prebuilt libraries through the ort crate.
Debian and Ubuntu; other distributions need the same three packages.
sudo apt-get install -y build-essential pkg-config libssl-devXcode’s command line tools:
xcode-select --installWindows
Section titled “Windows”Use WSL and follow the Linux steps inside it.
Add it to your project
Section titled “Add it to your project”[dependencies]embed = { git = "https://github.com/gmrdad82/pito-embed.git", tag = "v1.0.1" }probe = { git = "https://github.com/gmrdad82/pito-embed.git", tag = "v1.0.1" }The default vulkan feature runs the model on the GPU on Linux. For a CPU-only build, turn it off:
embed = { git = "https://github.com/gmrdad82/pito-embed.git", tag = "v1.0.1", default-features = false }Quick start
Section titled “Quick start”Clone the repository and run the search example. It downloads the model once (219 MB, sha256 checked), loads it on your GPU and ranks eight lines against your query:
git clone https://github.com/gmrdad82/pito-embed && cd pito-embedcargo run --release --example search -- a hidden areadownloaded config.json, sha256 checked…downloaded onnx/model_q4.onnx_data, sha256 checkedloaded EmbeddingGemma-300m on Vulkan in 1725 msembedded 8 lines and the query in 93 ms, 768 dimensions each
query: a hidden area 0.567 found a secret room behind the waterfall 0.295 we finally beat the final boss on hard 0.289 the soundtrack in this level is incredibleThe download lines show only on the first run. On a machine without a GPU the first line names the processor instead of Vulkan. Then read Search by meaning to do the same in your own code.