[RMP] T4R fixes: MultiGPU data parallel training for next-item prediction and fixed serving
See original GitHub issueProblem:
We have customers who would like to use multi-GPU Transformers4Rec but are blocked by issues with our existing support for session-based models.
Goal:
- Unblock customer use cases so they can try out T4R to give us feedback
Constraints:
- We don’t yet have Torchscript support (which is out of scope this issue)
Starting Point:
-
Enable
DataParallel
/DistributedDataParallel
training using HF Trainer for next-item prediction- Next item prediction - https://github.com/NVIDIA-Merlin/Transformers4Rec/issues/473 -
DataParallel
works if the model is wrapped manually by the user (i.e.model = torch.nn.DataParallel(model)
for training, but that wrapping should happen automatically by the HF Trainer here - https://github.com/NVIDIA-Merlin/Transformers4Rec/pull/483
- https://github.com/NVIDIA-Merlin/Transformers4Rec/pull/496#pullrequestreview-1131707972
- NVIDIA-Merlin/Transformers4Rec#492
- Next item prediction - https://github.com/NVIDIA-Merlin/Transformers4Rec/issues/473 -
-
Fix the serving sections of the existing T4R notebooks
-
[Task] Add multi-GPU example for Transformer4Rec PyTorch (https://github.com/NVIDIA-Merlin/Transformers4Rec/issues/508)
-
https://github.com/NVIDIA-Merlin/Transformers4Rec/issues/526
Note: The multi-GPU training of the specific use cases of session binary classification / regression is addressed by RMP #708
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
[QST] - Multi-GPU Support w/ Naive model.fit() #423 - GitHub
[RMP] T4R quick fixes: MultiGPU data parallel training, multi-gpu .fit(), and Python based serving for Transformers4Rec NVIDIA-Merlin/Merlin#522.
Read more >Efficient Training on Multiple GPUs - Hugging Face
Switching from a single GPU to multiple requires some form of parallelism as the work needs to be distributed. There are several techniques...
Read more >GPU training (Intermediate) - PyTorch Lightning - Read the Docs
Lightning supports multiple ways of doing distributed training. Data Parallel ( strategy='dp' ) (multiple-gpus, 1 machine).
Read more >Why My Multi-GPU training is slow? | by Chuan Li | Medium
Many deep learning tutorials are not incentivized to showcase the advantage of a multi-GPUs system. · The fix: Use a bigger model, larger...
Read more >Multi GPU Model Training: Monitoring and Optimizing
We can train a model on a single machine having multiple GPUs. With the DataParallel (DP) method, a batch is equally divided among...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@viswa-nvidia @EvenOldridge Me, @rnyak, @sararb and @nzarif met today about the issues related to
DataParallel
. We testedDataParallel
for Next Item Prediction for one of the examples and it is not working, differently from what Sara found some weeks ago in another example. So we have both Next Item Prediction and Binary Classification not working with DataParallel currently. We have associated the issues for both in this RMP ticket description. Should we remove the scope of DataParallel from this RMP and create another RMP ticket focused in DataParallel support (targeted for release 22.09)?I don’t think we should split the issue, let’s just target this for 22.09