Feature Extraction
sentence-transformers
PyTorch
Safetensors
Transformers
English
bert
Phrase Representation
String Matching
Fuzzy Join
Entity Retrieval
text-embeddings-inference
Instructions to use Lihuchen/pearl_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Lihuchen/pearl_small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Lihuchen/pearl_small") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use Lihuchen/pearl_small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Lihuchen/pearl_small")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Lihuchen/pearl_small") model = AutoModel.from_pretrained("Lihuchen/pearl_small") - Notebooks
- Google Colab
- Kaggle
Integrate with Sentence Transformers
#2
by tomaarsen HF Staff - opened
Hello!
Pull Request overview
- Integrate with Sentence Transformers
Preface
First of all, congratulations on this release! Outperforming the E5 models is not an easy task!
Details
This PR adds some configuration files for Sentence Transformers. This allows users to adopt this model without having to take care of the tokenization, mean pooling, normalization & cosine similarity themselves. Sentence Transformers is also well integrated with third parties, so this should hopefully make your model easier to adopt!
Do let me know if you have any questions.
Also, you're obviously always free to update the README to your likings!
- Tom Aarsen
tomaarsen changed pull request status to open
thank you, Tom! It is very useful.
Lihuchen changed pull request status to merged
So super useful. Thank you Tom!!