kotaemon icon indicating copy to clipboard operation
kotaemon copied to clipboard

[BUG] - <Embedding dimension mismatch error during file upload with local LLM and Ollama embeddings>

Open Lee-Ju-Yeong opened this issue 1 year ago • 0 comments

Description

I encountered an error while uploading a file using the local LLM and setting embeddings with Ollama. Even though the embedding dimensions were set to 1536 in the Resources tab under Embedding settings, the embeddings generated were still 768, which caused a dimension mismatch error. Below is the error trace.

Reproduction steps

1.Set up a local LLM.
2.Configure embeddings with Ollama.
3.In the Resources tab, set dimensions to 1536 in the Embedding settings.
4.Upload a file for indexing.
5.Observe the error regarding embedding dimension mismatch.

Screenshots

image image

Logs

User-id: 1, can see public conversations: True
Fast indexing mode: False
Reader mode: default
Reader in use: <kotaemon.loaders.html_loader.HtmlReader object at 0x307eec940>
Got 0 page thumbnails
Adding documents to doc store
Getting embeddings for 20 nodes
Adding embeddings to vector store
Embedding dimension 768 does not match collection dimensionality 1536
Traceback (most recent call last):
  File "/Users/zooyong/Documents/Kotaemon/libs/ktem/ktem/index/file/pipelines.py", line 851, in stream
    file_id, docs = yield from pipeline.stream(
  ...
  File "/opt/miniconda3/envs/kotaemon/lib/python3.10/site-packages/chromadb/api/segment.py", line 880, in _validate_dimension
    raise InvalidDimensionException(
chromadb.errors.InvalidDimensionException: Embedding dimension 768 does not match collection dimensionality 1536

Browsers

No response

OS

No response

Additional information

No response

Lee-Ju-Yeong avatar Sep 30 '24 00:09 Lee-Ju-Yeong