Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:475
loss:CosineSimilarityLoss
text-embeddings-inference
Instructions to use AShi846/fine-tuned-embedding-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use AShi846/fine-tuned-embedding-model with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("AShi846/fine-tuned-embedding-model") sentences = [ "We will analyze the $K$-means algorithm and show that it always converge. Let us consider the $K$-means objective function: $$ \\mathcal{L}(\\mathbf{z}, \\boldsymbol{\\mu})=\\sum_{n=1}^{N} \\sum_{k=1}^{K} z_{n k}\\left\\|\\mathbf{x}_{n}-\\boldsymbol{\\mu}_{k}\\right\\|_{2}^{2} $$ where $z_{n k} \\in\\{0,1\\}$ with $\\sum_{k=1}^{K} z_{n k}=1$ and $\\boldsymbol{\\mu}_{k} \\in \\mathbb{R}^{D}$ for $k=1, \\ldots, K$ and $n=1, \\ldots, N$. How would you choose $\\left\\{\\boldsymbol{\\mu}_{k}\\right\\}_{k=1}^{K}$ to minimize $\\mathcal{L}(\\mathbf{z}, \\boldsymbol{\\mu})$ for given $\\left\\{z_{n k}\\right\\}_{n, k=1}^{N, K}$ ? Compute the closed-form formula for the $\\boldsymbol{\\mu}_{k}$. To which step of the $K$-means algorithm does it correspond?", "1. Dynamically scheduled processors have universally more\n physical registers than the typical 32 architectural ones and\n they are used for removing WARs and WAW (name\n dependencies). In VLIW processors, the same renaming must be\n done by the compiler and all registers must be architecturally\n visible.\n 2. Also, various techniques essential to improve the\n performance of VLIW processors consume more registers (e.g.,\n loop unrolling or loop fusion). ", "O( (f+1)n^2 )b in the binary case, or O( (f+1)n^3 )b in the non-binary case", "The idea is wrong. Even if the interface remains the same since we are dealing with character strings, a decorator does not make sense because the class returning JSON cannot be used without this decorator; the logic for extracting the weather prediction naturally belongs to the weather client in question. It is therefore better to create a class containing both the download of the JSON and the extraction of the weather forecast." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!