Run this model with HF Jobs

Run sentence-transformers/all-mpnet-base-v2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/sentence-transformers/all-mpnet-base-v2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/sentence-transformers/all-mpnet-base-v2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

How to compare sentences?

#9
by yalastik - opened

Is there a more advanced way to compare vectorised sentences than just with cosine/euclidean? It seems like there are transformer options which do that and it can only be done by fine-tuning and changing the target?

Did you figure this out?

Sadly, no

Sentence Transformers org

With this model, comparing vectors can only be done using cosine similarity/dot score/euclidean distance. If you want to use the attention mechanism from transformer models, then you might be interested in cross-encoder models: https://huggingface.co/cross-encoder, https://huggingface.co/BAAI/bge-reranker-base, https://huggingface.co/mixedbread-ai/mxbai-rerank-base-v1

  • Tom Aarsen

Sign up or log in to comment