Sentence Similarity
sentence-transformers
Safetensors
English
roberta
datadreamer
datadreamer-0.35.0
Synthetic
feature-extraction
text-embeddings-inference
Instructions to use StyleDistance/styledistance with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use StyleDistance/styledistance with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("StyleDistance/styledistance") sentences = [ "Did you hear about the Wales wing? He'll h8 2 withdraw due 2 injuries from future competitions.", "We're raising funds 2 improve our school's storage facilities and add new playground equipment!", "Did you hear about the Wales wing? He'll hate to withdraw due to injuries from future competitions." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Inference
- Notebooks
- Google Colab
- Kaggle
Add link to paper
#1
by nielsr HF Staff - opened
2 unmodified lines34567894 unmodified lines1415161718192021222324252627282930313233343536373839404142434445464748495051525354552 unmodified linesdatasets:- SynthSTEL/styledistance_training_triplets- StyleDistance/synthstellibrary_name: sentence-transformerspipeline_tag: sentence-similaritytags:- datadreamer4 unmodified lines- sentence-similaritywidget:- example_title: Example 1source_sentence: >-Did you hear about the Wales wing? He'll h8 2 withdraw due 2 injuries fromfuture competitions.sentences:- >-We're raising funds 2 improve our school's storage facilities and add newplayground equipment!- >-Did you hear about the Wales wing? He'll hate to withdraw due to injuriesfrom future competitions.- example_title: Example 2source_sentence: >-You planned the DesignMeets Decades of Design event; you executed itperfectly.sentences:- We'll find it hard to prove the thief didn't face a real threat!- >-You orchestrated the DesignMeets Decades of Design gathering; you actualizedit flawlessly.- example_title: Example 3source_sentence: >-Did the William Barr maintain a commitment to allow Robert Mueller to finishthe inquiry?sentences:- >-Will the artist be compiling a music album, or will there be a differentfocus in the future?- >-Did William Barr maintain commitment to allow Robert Mueller to finishinquiry?license: mitlanguage:- en---# Model CardStyleDistance is a **style embedding model** that aims to embed texts with similar writing styles closely and different styles far apart, regardless of content. You may find this model useful for stylistic analysis of text, clustering, authorship identfication and verification tasks, and automatic style transfer evaluation.## Training Data and Variants of StyleDistance2 unmodified lines34567891011124 unmodified lines1718192021222324252627282930313233343536373839404142434445464748492 unmodified linesdatasets:- SynthSTEL/styledistance_training_triplets- StyleDistance/synthstellanguage:- enlibrary_name: sentence-transformerslicense: mitpipeline_tag: sentence-similaritytags:- datadreamer4 unmodified lines- sentence-similaritywidget:- example_title: Example 1source_sentence: Did you hear about the Wales wing? He'll h8 2 withdraw due 2 injuriesfrom future competitions.sentences:- We're raising funds 2 improve our school's storage facilities and add new playgroundequipment!- Did you hear about the Wales wing? He'll hate to withdraw due to injuries fromfuture competitions.- example_title: Example 2source_sentence: You planned the DesignMeets Decades of Design event; you executedit perfectly.sentences:- We'll find it hard to prove the thief didn't face a real threat!- You orchestrated the DesignMeets Decades of Design gathering; you actualized itflawlessly.- example_title: Example 3source_sentence: Did the William Barr maintain a commitment to allow Robert Muellerto finish the inquiry?\sentences:- Will the artist be compiling a music album, or will there be a different focusin the future?- Did William Barr maintain commitment to allow Robert Mueller to finish inquiry?---# Model CardThis repository contains the model introduced in [StyleDistance: Stronger Content-Independent Style Embeddings with Synthetic Parallel Examples](https://huggingface.co/papers/2410.12757).StyleDistance is a **style embedding model** that aims to embed texts with similar writing styles closely and different styles far apart, regardless of content. You may find this model useful for stylistic analysis of text, clustering, authorship identfication and verification tasks, and automatic style transfer evaluation.## Training Data and Variants of StyleDistance
README.md+21-27