The instructor-embeddings library is another option, especially when running on a machine with a cuda-capable GPU. They are a good local alternative to OpenAI (see the Massive Text Embedding Benchmark rankings). The embedding function requires the InstructorEmbedding package. To install it, runDocumentation Index
Fetch the complete documentation index at: https://docs.trychroma.com/llms.txt
Use this file to discover all available pages before exploring further.
pip install InstructorEmbedding.
There are three models available. The default is hkunlp/instructor-base, and for better performance you can use hkunlp/instructor-large or hkunlp/instructor-xl. You can also specify whether to use cpu (default) or cuda. For example: