average_word_embeddings_glove.6 B.300d
sentence-transformersIntroduction
The average_word_embeddings_glove.6B.300d
is a model from the Sentence Transformers library that maps sentences and paragraphs into a 300-dimensional dense vector space. It is useful for tasks such as clustering or semantic search.
Architecture
The model is structured using the SentenceTransformer framework, comprising two primary components:
- WordEmbeddings: Utilizes an embedding layer with dimensions of 400,001 by 300.
- Pooling: Configured to compute the mean of tokens, with a word embedding dimension of 300.
Training
This model was trained by the Sentence Transformers team and is based on the GloVe embedding method. It is designed to generate sentence embeddings suitable for semantic tasks. The model's performance can be evaluated using the Sentence Embeddings Benchmark.
Guide: Running Locally
To use this model locally, follow these steps:
-
Install the Sentence Transformers library:
pip install -U sentence-transformers
-
Load and use the model:
from sentence_transformers import SentenceTransformer sentences = ["This is an example sentence", "Each sentence is converted"] model = SentenceTransformer('sentence-transformers/average_word_embeddings_glove.6B.300d') embeddings = model.encode(sentences) print(embeddings)
For enhanced performance, consider using cloud-based GPU services like AWS EC2, Google Cloud Platform, or Azure.
License
The model is licensed under the Apache 2.0 License, allowing for broad use and modification.