-
Notifications
You must be signed in to change notification settings - Fork 38
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
Huge memory consumsation of isWithinTokenLimit #35
Comments
same here, what seems even more weird, is that it made me run out of memory by just importing it, not even using it |
@niieani Node 18/typescript/babel 7.0.0 in a firebase cloud function, with gpt 3.5 and 4o(but that shouldn't really matter since a simple import already cause a spike in memory usage) |
btw I was able to +/- ignore this issue by doing a conditional require so I don't always waste memory when I don't need to call it |
🎉 This issue has been resolved in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
New version (2.3.0) should have more than 4x smaller memory footprint (data for GPT-3.5-turbo tokenizer):
|
I am experiencing 200MB increase after implementing
gpt-tokenizer
the only function that I am using from this library isisWithinTokenLimit
. Here is an image of my memory consumtion before and after deployment.Here is how I am using is
The text was updated successfully, but these errors were encountered: