How can we batch together different sentences of various lengths and make sure we get the same result when going through the model as a batch or as individual sentences.
This video is part of the Hugging Face course: http://huggingface.co/course
Open in colab to run the code samples:
https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/videos/batch_inputs_pt.ipynb
TensorFlow version: https://youtu.be/ROxrFOEbsQE
Related videos:
- The pipeline function: https://youtu.be/tiZFewofSLM
- The tokenization pipeline: https://youtu.be/Yffk5aydLzg
Have a question? Checkout the forums: https://discuss.huggingface.co/c/course/20
Subscribe to our newsletter: https://huggingface.curated.co/