deepjavalibrary / deepjavalibrary/djl
High heap memory usage observed with DJL's HuggingFaceTokenizer implementation
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 759
- Avg merge
- 19h 26m
- Merged PRs (30d)
- 17
Description
## Current Behavior
- High heap memory consumption detected when using DJL's [HuggingFaceTokenizer](https://github.com/deepjavalibrary/djl/blob/master/extensions/tokenizers/src/main/java/ai/djl/huggingface/tokenizers/HuggingFaceTokenizer.java)'s tokenize method.
- Issue persists despite using the tokenizer as a singleton object.
## Impact
- Increased heap memory utilization affecting application performance.
- Potential memory management concerns in production environment.
## Questions
- Is the tokenize operation inherently memory intensive?
- Are there existing plans or recommendations to optimize memory usage?
TT: P198626352
Contributor guide
Research direction
Start with extensions/tokenizers/src/main/java/ai/djl/huggingface/tokenizers/HuggingFaceTokenizer.java, focusing on the tokenize method named in the report. Reproduce the high heap usage and profile the operation, comparing singleton and repeated use. Done means identifying the memory source and documenting or implementing a confirmed optimization or recommendation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, java
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100