sentence-transformers How to use mrm8488/gte-large-ft-webinstruct with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("mrm8488/gte-large-ft-webinstruct", trust_remote_code=True)
sentences = [
"How do you solve the equation #-6 = \\frac{y}{5} + 4#?",
"To solve the equation, follow these steps:\n\n1. Subtract 4 from both sides:\n \\[-6 - 4 = \\frac{y}{5} + 4 - 4\\]\n \\[-10 = \\frac{y}{5}\\]\n\n2. Multiply both sides by 5 to isolate y:\n \\[-10 \\cdot 5 = \\frac{y}{5} \\cdot 5\\]\n \\[-50 = y\\]\n\nSo the solution is \\(y = -50\\).",
"An organism refers to a living entity, typically composed of cells, capable of growth, reproduction, and response to stimuli. The definition primarily includes all forms of life, excluding viruses, which are considered non-living by some scientists due to their inability to replicate independently.\n\nOne of the smallest known organisms is Mycoplasma gallicepticum, a parasitic bacterium measuring approximately 200 to 300 nanometers (nm). It infects primates, inhabiting the bladder, waste disposal organs, genital tracts, and respiratory system.\n\nFor comparison, the smallest virus known to humans is the Porcine circovirus type 1 (PCV1), a single-stranded DNA virus. Its genome consists of just 1759 nucleotides, and its capsid diameter measures a mere 17 nm. This virus causes wasting disease in weaned pigs.\n\n[Insert images of Mycoplasma gallicepticum and Porcine circovirus type 1 here, with appropriate captions.]\n\nKeep in mind that the boundary of what constitutes the \"smallest organism\" can change with advances in scientific research and understanding.",
"Slope is given by #\"rise\"/\"run\"#, or the change in the #y# coordinate divided by the change in #x#. Mathematically this is written as \n#(deltay)/(deltax)#\nYou calculate it by taking the second coordinate and subtracting the first, so\n#(deltay)/(deltax) = (y_2 - y_1)/(x_2 - x_1)#\n# = (8 - (-2))/(10 - 10) = 10/0#\nSince division by zero is undefined, this line has an undefined slope. This means that it is a vertical line."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]