Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix embedding by adding fixes from llama.cpp upstream #4399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deadbeef84
Copy link

Embedding appears broken since v0.1.32

See #3777 #4207 for details.

This PR applies fixes based on ggerganov/llama.cpp@1b67731#diff-87355a1a297a9f0fdc86af5e2a59cae153290f58d68822cd10c30fee4f7f7076.

I've tested it and embedding vectors looks correct after applying this patch.

@fredrik-smedberg
Copy link

I can confirm this PR indeed fixes very obvious issues I had when doing embedding and queries with mxbai-embed-large and nomic-embed-text models.

@multiduplikator
Copy link

Desperately waiting for this fix to be integrated into next version. Having to stay on 0.1.31 is kind of a pain ...

@fredrik-smedberg
Copy link

@multiduplikator are you on a Mac? If so, it's very easy to download, compile and run this branch on your computer.

  1. Install Brew if you haven't already (https://brew.sh)

  2. Check out this branch,

git clone https://github.com/ollama/ollama.git
cd ollama
git fetch origin pull/4399/head:pr-4399
git checkout pr-4399
  1. Follow the instructions here https://github.com/ollama/ollama?tab=readme-ov-file#building

  2. Then just run it, like in the examples here, https://github.com/ollama/ollama?tab=readme-ov-file#running-local-builds

monotykamary added a commit to monotykamary/ollama that referenced this pull request May 18, 2024
@multiduplikator
Copy link

@fredrik-smedberg Not on a Mac. I still have time to wait ... would like to avoid getting into custom building. But thanks for the input. Will come in handy when the time comes :)

@0ssamaak0
Copy link

GJ @deadbeef84 🚀🚀
I just found out this is not working as expected after creating a vector db for 50k examples 😅😅 gonna use HF untill this get merged

@0ssamaak0
Copy link

@jmorganca please merge this! Thanks 😁😁

@youkefan18
Copy link

@jmorganca Hi, I can confirm this is important fix for any application running in prod.
The change in embedding results after upgrading ollama ruins all RAG related feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants