Passage Jina -> intfloat/multilingual-e5-large

Jina me donne toujours RuntimeError: The size of tensor a (5) must match the size of tensor b (4) at non-singleton dimension 1
This commit is contained in:
2026-02-06 17:38:27 +01:00
parent 14b8664106
commit 1c2f0728ea
2 changed files with 13 additions and 35 deletions

View File

@@ -43,7 +43,7 @@ print("===")
# Création du modèle d'embeddings
# https://docs.langchain.com/oss/python/integrations/text_embedding/huggingfacehub
# https://huggingface.co/jinaai/jina-clip-v2
embeddings = HuggingFaceEmbeddings(model_name="jinaai/jina-embeddings-v3", model_kwargs={"trust_remote_code": True})
embeddings = HuggingFaceEmbeddings(model_name="intfloat/multilingual-e5-large", model_kwargs={"trust_remote_code": True})
# Stockage des embeddings dans ChromaDB dans un dossier local "chroma_db"
vectorstore = Chroma.from_documents(documents=chunks,embedding=embeddings, persist_directory=base_dir.as_posix()+"/chroma_db/",) # https://docs.langchain.com/oss/python/integrations/vectorstores/chroma