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

feat: remove pympler dependency and add better way to calculate size of tokenizer cache #3580

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

jacopo-chevallard
Copy link
Collaborator

We now compute the size of the tokenizer cache using the disk file size of the different tokenizer files

Copy link

linear bot commented Jan 30, 2025

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 30, 2025
@jacopo-chevallard jacopo-chevallard changed the title feature: remove pympler dependency and add better way to calculate size of tokenizer cache feat: remove pympler dependency and add better way to calculate size of tokenizer cache Jan 30, 2025
if not hasattr(self.tokenizer, "vocab_files_names") or not hasattr(
self.tokenizer, "init_kwargs"
):
return 5 * 1024 * 1024
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

core/quivr_core/llm/llm_endpoint.py Outdated Show resolved Hide resolved
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 30, 2025
@AmineDiro AmineDiro merged commit 2fbd5d4 into main Jan 30, 2025
6 checks passed
@AmineDiro AmineDiro deleted the feature/core-354-remove-pympler-dependency branch January 30, 2025 12:23
StanGirard added a commit that referenced this pull request Jan 30, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.0.31](core-0.0.30...core-0.0.31)
(2025-01-30)


### Features

* cache tokenizers
([#3558](#3558))
([699dc2e](699dc2e))
* limit tokenizers cache size
([#3577](#3577))
([e2a3bcb](e2a3bcb))
* remove pympler dependency and add better way to calculate size of
tokenizer cache ([#3580](#3580))
([2fbd5d4](2fbd5d4))
* remove tokenizer load
([#3576](#3576))
([05e212a](05e212a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants