sentence t5 large
sentence-transformersIntroduction
The Sentence-T5-Large model is a part of the Sentence-Transformers library. It maps sentences and paragraphs into a 768-dimensional dense vector space, primarily designed for sentence similarity tasks. The model is based on the T5-large architecture and has been converted from TensorFlow to PyTorch.
Architecture
This model utilizes only the encoder part of the T5-large model. The weights are stored in FP16 format. Despite slight differences in embeddings between the TensorFlow and PyTorch versions, they produce identical results on benchmarks.
Training
The model was originally trained as a TensorFlow model (st5-large-1) and later converted to PyTorch. It's optimized for generating sentence embeddings that can be used in various similarity tasks. For more details on the training methodology, refer to the publication "Sentence-T5: Scalable sentence encoders from pre-trained text-to-text models."
Guide: Running Locally
To run the model locally, follow these steps:
-
Install Sentence-Transformers:
pip install -U sentence-transformers
Ensure that you have version 2.2.0 or newer.
-
Load and Use the Model:
from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/sentence-t5-large') embeddings = model.encode(sentences) print(embeddings)
-
Hardware Recommendations: For optimal performance, consider using cloud-based GPUs such as those available from AWS, Google Cloud, or Azure.
License
The Sentence-T5-Large model is licensed under the Apache-2.0 License. This allows you to freely use, modify, and distribute the model, provided that you comply with the terms of the license.