-
-
Notifications
You must be signed in to change notification settings - Fork 378
Knowledgebase embeddings #2158
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
base: main
Are you sure you want to change the base?
Knowledgebase embeddings #2158
Conversation
|
I still need to write the tests, but I am sharing the PR already to get feedbacks on the implementation. Little note: You will see that in the load methods you can select another llm or embedding client than the one that was used to generate the KnowledgeBase. I added this purely to add flexibility and improve developer experience, but it was not necessary nor asked in the issue. |
|
TODO
|
davidberenstein1957
left a comment
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.
Hi @GTimothee, this already looks nice. I left some comments to improve some things..
| Hugging Face token for authentication. If None, will use local token. | ||
| private : bool | ||
| Whether to make the repo private or public. | ||
| """ |
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 we also pass kwargs for the push to hub/upload file etc?
| kb = cls( | ||
| data=data, | ||
| columns=config.get("columns"), | ||
| llm_client=llm_client, | ||
| embedding_model=embedding_model, | ||
| chunk_size=config.get("chunk_size", 2048), | ||
| seed=config.get("seed"), | ||
| min_topic_size=config.get("min_topic_size"), | ||
| ) |
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.
Doesn't this already create the embeddings during initialisation?
Co-authored-by: David Berenstein <[email protected]>
Co-authored-by: David Berenstein <[email protected]>
Description
Related Issue
#2145
Type of Change
It is an improvement as it avoids embeddings to be recomputed.
It is a new feature because we can now save/load to/from disk and hugginface hub.
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.pdm.lockrunningpdm update-lock(only applicable whenpyproject.tomlhas beenmodified)