Downloads · 30 days
46
100% of all-time downloads
LNTTushar/trynmini-v2-static-7m
trynmini-v2-static-7m is a sentence similarity model from LNTTushar. Use it when you need a score for how close two texts are. It is set up for numpy. The card lists the license as apache-2.0.
⚠️ Superseded by LNTTushar/trynmini-v2-static-7m-v2 A stronger rebuild of this exact architecture scores 0.700 / 0.710 / 0.715 (STSB-dev, dim 64/128/256) vs 0.636 / 0.653 / 0.666 here. For new projects, use the v2 mod…
Downloads · 30 days
46
100% of all-time downloads
All-time downloads
46
Public
Repo size
8.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors7.8 MB · 83%
From the Hugging Face model README
⚠️ Superseded by LNTTushar/trynmini-v2-static-7m-v2
A stronger rebuild of this exact architecture scores 0.700 / 0.710 / 0.715 (STSB-dev, dim 64/128/256) vs 0.636 / 0.653 / 0.666 here. For new projects, use the v2 model — same tiny footprint and API, better vectors. This page is kept for provenance.
A static sentence embedding model: no transformer at inference. Encoding is
tokenize → table lookup → SIF/Zipf-weighted mean pool → residual → L2-norm, so it runs
on CPU with only numpy + tokenizers and ships as a single ~7.8 MB file. Supports
Matryoshka truncation to 64 / 128 / 256 dims.
| Dim | Spearman |
|---|---|
| 64 | 0.6358 |
| 128 | 0.6526 |
| 256 | 0.6661 |
This build used an earlier, weaker distillation pipeline than the v2 rebuild (which adds a properly trained BGE-distilled table plus an MNRL + Matryoshka residual). If you need the better scores, see trynmini-v2-static-7m-v2.
pip install -U huggingface_hub numpy tokenizers safetensors
import sys; from huggingface_hub import snapshot_download
d = snapshot_download("LNTTushar/trynmini-v2-static-7m"); sys.path.insert(0, d)
from modeling_trynmini import TrynMiniV2
m = TrynMiniV2.from_pretrained(d)
emb = m.encode(["a man plays guitar", "someone plays a guitar"], dim=256)
print("cosine similarity:", float(emb[0] @ emb[1]))
numpy, tokenizers, safetensors — no PyTorch, no GPUApache-2.0.