Skip to main content

Crate gonzalo_embed

Crate gonzalo_embed 

Source
Expand description

Local CPU sentence-embedding Embedder for gonzalo, built on Candle + all-MiniLM-L6-v2 (ADR 0013).

CandleEmbedder::load resolves the model weights (via an EmbedderConfig::model_path override, else a one-time anonymous hf-hub download) and loads the BERT model + tokenizer once on CPU. embed then tokenizes, runs the forward pass, masked-mean-pools the token states, and L2-normalizes to a 384-dim unit vector. The synchronous CPU forward runs inside spawn_blocking so it never blocks the async runtime.

Structsยง

CandleEmbedder
A local CPU sentence embedder (Candle + all-MiniLM). Cheap to clone.
EmbedderConfig
Configuration for CandleEmbedder::load.