NVIDIA-NeMo / NVIDIA-NeMo/Export-Deploy
Refactor tokenizer handling in nemo.export module
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 42
- Forks
- 18
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
The logic for for instantiating tokenizers in TensorRTLLM class in nemo.export.tensorrt_llm has become complex:
There is NeMo 1 and NeMo 2 checkpoint support
There are two paths: using full NeMo setup (with io.load_context) or local implementations/copies in sentencepiece_tokenizer.py and tiktoken_tokenizer.py
There are different types of tokenizers: HF, binary tokenizer.model, Tiktoken
The task is to simplify this logic (one idea is to extend all the classes above with save_pretrained method and unify constructors if possible).
There is also no way of testing a Tiktoken-based model as there is no such checkpoint in CI system. We should add it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in nemo.export.tensorrt_llm and trace how TensorRTLLM instantiates NeMo 1, NeMo 2, Hugging Face, binary, and Tiktoken tokenizers. Read sentencepiece_tokenizer.py and tiktoken_tokenizer.py, then inspect the CI checkpoint setup. Done means the tokenizer paths are simpler and CI exercises a Tiktoken-based model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100