Introduction

The GTR-T5-Base is a model from the Sentence-Transformers library, designed to map sentences and paragraphs into a 768-dimensional dense vector space. It is specifically tailored for semantic search tasks. This model is a PyTorch conversion of the original TensorFlow model, gtr-base-1, and is designed to produce identical results across benchmarks, despite slight differences in embeddings.

Architecture

This model utilizes only the encoder component from the T5-base model, with weights stored in FP16 to optimize performance. The architecture focuses on facilitating sentence similarity and feature extraction tasks effectively.

Training

The GTR-T5-Base model was trained for semantic search tasks, exemplifying strong performance in generating embeddings for sentence similarity. For more detailed insights into its training and capabilities, the publication "Large Dual Encoders Are Generalizable Retrievers" can be consulted.

Guide: Running Locally

  1. Install Requirements: Ensure the sentence-transformers library is installed with version 2.2.0 or newer:

    pip install -U sentence-transformers
    
  2. Load the Model:

    from sentence_transformers import SentenceTransformer
    sentences = ["This is an example sentence", "Each sentence is converted"]
    model = SentenceTransformer('sentence-transformers/gtr-t5-base')
    embeddings = model.encode(sentences)
    print(embeddings)
    
  3. Suggested Environment: For enhanced performance, especially for large-scale tasks, utilizing cloud GPUs such as those provided by AWS, Google Cloud, or Azure is recommended.

License

This model is licensed under the Apache 2.0 license, allowing for extensive use and modification while ensuring compliance with the license terms.

More Related APIs in Sentence Similarity