pixafind-minilm-tuned
A fine-tune of all-MiniLM-L6-v2 for document retrieval over everyday personal files: tax forms, benefits letters, insurance and financial paperwork. It powers the semantic tier of PixaFind, a local, privacy-first file search app.
Results
Scored on a held-out fixture of 229 human-written paraphrase queries against a 425-file pool of real public documents (IRS, SSA, Medicare, CFPB, NIST, Census). Exact McNemar test, vectors truncated to 256d as served in production.
| Model | hit@1 | hit@5 | hit@20 |
|---|---|---|---|
| potion-base-8M (static) | 47 | 86 | 131 |
| all-MiniLM-L6-v2 (stock) | 63 | 130 | 177 |
| this model | 75 | 148 | 189 |
Top-5 accuracy against the stock base model goes from 57% to 65% (p = 0.0014, 24 wins vs 6 losses). Out-of-domain retrieval on a developer-markdown corpus stayed neutral, so the gain does not come at the cost of other content types.
Training
GPL-style synthetic queries: an LLM wrote 2 practice questions per passage for 3,681 passages chunked from 239 public US government documents. After filtering (fixture leakage, duplicates, copied 4-grams), 6,075 pairs trained MultipleNegativesRankingLoss for 3 epochs at batch 128 on a Kaggle T4. Training took 1.6 minutes.
Plain MNRL won the recipe bake-off. Hard-negative mining and GISTEmbedLoss tied with it, margin-MSE distillation collapsed, and a static model2vec distillation lost the contextual gains entirely.
No user data was involved at any point. Every training document is public.
Files
model.safetensorsplus sentence-transformers config: PyTorch pathonnx/model.onnx: fp32 ONNX export, byte-exact retrieval parity with PyTorch on the fixtureonnx/model_quint8_avx2.onnx: dynamic uint8 quantization, 23 MB, statistically tied with fp32 on retrieval (same CPU speed, the win is disk)
Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Ishannaik/pixafind-minilm-tuned")
emb = model.encode(["how do I appeal a medicare decision"], normalize_embeddings=True)
PixaFind serves the first 256 dimensions of the 384d output, re-normalized.