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

2,606 6 months ago

6 months ago

f24c6025c645 · 14GB

model
llama
·
7.24B
·
F16

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}'