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

add pooling_type for embedding llamacpp #26376

Closed
wants to merge 2 commits into from

Conversation

machengyan
Copy link

  • PR title: "community: add pooling_type to llamacpp embedding"

  • PR message: the existing llamacpp embedding model doesn't work

    • Description: the default pooling_type is none, so the output of embed method is token-wise embedding which is not compatible with langchain core's FAISS.from_documents. so I add this too the model, and call like :
    • embeddings = LlamaCppEmbeddings(model_path="/usr/share/ollama/.ollama/models/blobs/sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe",pooling_type=1)
    • so it works

Copy link

vercel bot commented Sep 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 6:58pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. community Related to langchain-community Ɑ: embeddings Related to text embedding models module labels Sep 12, 2024
@ccurme
Copy link
Collaborator

ccurme commented Oct 31, 2024

Thanks for this. Could you please:

  1. Verify that existing integration tests pass
  2. Format and lint the code following the instructions here.

@efriis
Copy link
Member

efriis commented Dec 14, 2024

closing without response to review :(

if you're interested in addressing the comments and reopening, feel free!

@efriis efriis closed this Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community Ɑ: embeddings Related to text embedding models module size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants