-
|
R2RException: {'message': "Error getting embeddings: litellm.UnsupportedParamsError: Setting {'dimensions': 1024} is not supported by cohere. To drop it from the call, set |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
You should set dimension equal to 'nan' in your config. I'll try to make this more clear in the docs, anywhere that you would suggest it be added? See the LM Studio implementation section here for an example: |
Beta Was this translation helpful? Give feedback.
-
|
Dimension mismatch errors with Cohere/HuggingFace embeddings — here's the fix: The problem:
Solution 1: Match dimensions in config # r2r.toml
[embedding]
model = "cohere/embed-english-v3.0"
dimension = 1024 # Must match model output!Solution 2: Recreate vector collection # If you changed models, recreate the collection
r2r db reset
r2r ingest --files your_docs/Solution 3: Use model with matching dims # Check your model's output dimension
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("your-model")
print(model.get_sentence_embedding_dimension())Common dimension mismatches:
We handle multi-model setups at RevolutionAI. What model are you trying to use? |
Beta Was this translation helpful? Give feedback.
You should set dimension equal to 'nan' in your config. I'll try to make this more clear in the docs, anywhere that you would suggest it be added?
See the LM Studio implementation section here for an example:
https://r2r-docs.sciphi.ai/self-hosting/local-rag#local-configuration-details-1