Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:475
loss:CosineSimilarityLoss
text-embeddings-inference
Instructions to use AShi846/all-MiniLM-L6-v2_rag_ft_e-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use AShi846/all-MiniLM-L6-v2_rag_ft_e-3 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("AShi846/all-MiniLM-L6-v2_rag_ft_e-3") sentences = [ "Explain how precise exceptions are implemented in\n dynamically-scheduled out-of-order processors.", "$ \text{Var}[\\wv^\top \\xx] = \frac1N \\sum_{n=1}^N (\\wv^\top \\xx_n)^2$ %\n", "Only $x_3$ has a positive coefficient in $z$, we will pivot $x_3$. We have $\\nearrow x_3 \\longrightarrow \\ x_3 \\leq \\; \\infty \\ (1),\\ x_3 \\leq 3\\ (2),\\ x_3 \\leq 2\\ (3)$, Thus we use third equality to pivot $x_3$. Hence $x_3=\\frac{1}{2}(4+3x_2-s_3)$. And we get \\begin{align*} \\hspace{1cm} x_1 &= 1 + \\frac{1}{2}(4+3x_2-s_3) - s_1 \\\\ s_2 &= 3 -\\frac{1}{2}(4+3x_2-s_3) + s_1 \\\\ x_3&=\\frac{1}{2}(4+3x_2-s_3) \\\\ \\cline{1-2} z &= 4 - x_2 + (4+3x_2-s_3) - 4s_1 \\end{align*} That is \\begin{align*} \\hspace{1cm} x_1 &= 3 + \\frac{3x_2}{2} -\\frac{s_3}{2} - s_1 \\\\ s_2 &= 1 - \\frac{3x_2}{2} +\\frac{s_3}{2} + s_1 \\\\ x_3&= 2+ \\frac{3x_2}{2} -\\frac{s_3}{2} \\\\ \\cline{1-2} z &= 8 + 2x_2 + -s_3 - 4s_1 \\\\ x_1& :=3\\text{ }x_2:=0\\text{ }x_3:=2\\text{ }s_1:=0\\text{ }s_2:=1\\text{ }s_3:=0 \\end{align*}", "This does not break compatibility, as the method is private so nobody else could call it." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Ctrl+K