You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'default'/'local'/'minilm' -> ef.embedder_adapters.sentence_transformers_embedder('all-MiniLM-L6-v2'), set USE_TF=0 before import (avoids TF/numpy ABI crash), wrapped in ef.CachedEmbedder over a dol cache at ~/.cache/ir/embeddings/<model>/ keyed by (model, ef.content_hash).
'light'/'hashing' -> ef.HashingEmbedder (numpy-only) for fast tests.
callable / Embedder -> ef.as_embedder.
Graceful fallback to hashing with a warning if sentence-transformers unavailable.
Embedder must carry an input_type distinction (query vs document) — ef already supports this.
Default = all-MiniLM-L6-v2 (384-d) via ef.embedder_adapters.sentence_transformers_embedder(..., normalize=True).
USE_TF=0 is set on import ir.embed — without it, transformers auto-imports TensorFlow, which crashes on this stack's numpy ABI (numpy.core.umath failed to import). Import ir before anything that imports transformers.
Wrapped in ef.CachedEmbedder over a dol numpy store at ~/.cache/ir/embeddings/<model_id> — each model gets its own dir, so the cache key is effectively (model, content_hash) with no cross-model collisions.
"light"/"hashing" → ef.HashingEmbedder (numpy only) for fast tests; graceful fallback to it (with a warning) if sentence-transformers is missing.
First call loads the model (~18s) then is warm; the disk cache makes re-indexing near-instant. A persistent embedding server is a later optimization if cold CLI latency matters.
Activity
thorwhalen commentedon Jun 5, 2026
Decisions (done in PR #14):
all-MiniLM-L6-v2(384-d) viaef.embedder_adapters.sentence_transformers_embedder(..., normalize=True).USE_TF=0is set onimport ir.embed— without it,transformersauto-imports TensorFlow, which crashes on this stack's numpy ABI (numpy.core.umath failed to import). Importirbefore anything that importstransformers.ef.CachedEmbedderover adolnumpy store at~/.cache/ir/embeddings/<model_id>— each model gets its own dir, so the cache key is effectively(model, content_hash)with no cross-model collisions."light"/"hashing"→ef.HashingEmbedder(numpy only) for fast tests; graceful fallback to it (with a warning) if sentence-transformers is missing.