An embedding model created by Salesforce Research that you can use for semantic search. Currently the best open source embedding model on MTEB.

7B

2,124 Pulls Updated 4 months ago

4 months ago

58052f318af8 · 7.7GB

model
llama
·
7.24B
·
Q8_0

Readme

Check out the model on huggingface: Salesforce/SFR-Embedding-Mistral

To download the model:

ollama run avr/sfr-embedding-mistral:<TAG>

To interact with the model:

curl http://localhost:11434/api/embeddings -d '{ "model": "avr/sfr-embedding-mistral:<TAG>", "prompt": "Your prompt here"}'

In Python:

ollama.embeddings(model='avr/sfr-embedding-mistral:<TAG>', prompt='Your prompt here')

When running queries on your documents, make sure to use this template to embed the query:

def get_detailed_instruct(task_description: str, query: str) -> str:
    return f'Instruct: {task_description}\nQuery: {query}'