Instructions to use mlnomad/all-MiniLM-L6-v2-yat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mlnomad/all-MiniLM-L6-v2-yat with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlnomad/all-MiniLM-L6-v2-yat", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
all-MiniLM-L6-v2-yat
all-MiniLM-L6-v2 with every feed-forward (FFN) block replaced by a sigmoid-gated
Yat-kernel MLP, obtained by a two-phase, mostly data-free distillation:
Phase 1 fits each block on random-token activations (no corpus); Phase 2 is a
~48s real-activation fine-tune. The swap preserves MTEB STS within ~0.3% of the base model.
from sentence_transformers import SentenceTransformer
m = SentenceTransformer("mlnomad/all-MiniLM-L6-v2-yat", trust_remote_code=True)
m.encode(["hello world"])
The Yat FFN computes (alpha * (x.W+b)^2/(||x-W||^2+eps) * sigmoid(gate(x))) @ A + c,
a kernel-native replacement for the GELU MLP. Can be further fine-tuned to recover any residual gap.
- Downloads last month
- 20
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for mlnomad/all-MiniLM-L6-v2-yat
Base model
nreimers/MiniLM-L6-H384-uncased Quantized
sentence-transformers/all-MiniLM-L6-v2