tensorflow / tensorflow/recommenders
Saving Large ScaNN Retrieval Model - memory bottleneck
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
I have a large retrieval model that uses the ScaNN method for indexing the recommendations.
I'm saving the model out for the retrieval speed increase.
I'm starting to run models with +5M records, and I can't save the model to disk without my system memory crashing.
I've looked into pruning the model and saving the weights. Will this work with the ScaNN index?
Can anyone suggest how to get around the memory bottleneck when saving a large ScaNN retrieval model?
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
The issue mentions a large TensorFlow Recommenders model using ScaNN and more than 5 million records, but names no files, tests, or entry points. Start by reproducing the save operation with a similarly sized model and measuring memory during serialization. Done would require an agreed, reproducible fix or documented workaround for saving without exhausting system memory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100