helpmefindaname/transformer-smaller-training-vocab
Temporary remove unused tokens during training to save ram and speed.
This tool helps machine learning engineers or researchers who are fine-tuning large language models to save memory and speed up training. It takes your pre-trained transformer model and training dataset, and temporarily reduces the model's vocabulary to only include tokens present in your data. This results in faster training and lower GPU memory usage, while still allowing you to save the full model afterward.
Used by 1 other package. No commits in the last 6 months. Available on PyPI.
Use this if you are training a transformer model and notice that many tokens in the model's full vocabulary are not actually used in your specific training data, causing unnecessary memory consumption and slower training.
Not ideal if you are using 'slow' tokenizers other than XLMRobertaTokenizer, RobertaTokenizer, or BertTokenizer, as support is limited for these.
Stars
23
Forks
4
Language
Python
License
MIT
Category
Last pushed
Jun 15, 2025
Commits (30d)
0
Dependencies
2
Reverse dependents
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/transformers/helpmefindaname/transformer-smaller-training-vocab"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
lucidrains/x-transformers
A concise but complete full-attention transformer with a set of promising experimental features...
kanishkamisra/minicons
Utility for behavioral and representational analyses of Language Models
lucidrains/simple-hierarchical-transformer
Experiments around a simple idea for inducing multiple hierarchical predictive model within a GPT
lucidrains/dreamer4
Implementation of Danijar's latest iteration for his Dreamer line of work
Nicolepcx/Transformers-in-Action
This is the corresponding code for the book Transformers in Action