-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
improve llamacpp embeddings #12972
improve llamacpp embeddings #12972
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@baskaryan |
@hwchase17 fixed the PR |
@@ -57,6 +57,9 @@ class LlamaCppEmbeddings(BaseModel, Embeddings): | |||
verbose: bool = Field(True, alias="verbose") | |||
"""Print verbose output to stderr.""" | |||
|
|||
device: Optional[str] = Field(None, alias="device") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be added for the LlamaCpp LLM as well?
Description:
Improve llamacpp embedding class by adding the
device
parameter so it can be passed to the model and used withgpu
,cpu
or Apple metal (mps
).Improve performance by making use of the bulk client api to compute embeddings in batches.
Dependencies: none
Tag maintainer:
@hwchase17