Questions tagged [pad-truncate]

1 questions
2
votes
2 answers

Dynamic batching and padding batches for NLP in deep learning libraries

This is the usual way we train modern deep learning models for NLP, e.g. with Huggingface libraries where we have a fix length for the input no. of tokens/subwoords unit. https://huggingface.co/docs/transformers/pad_truncation In the follow example,…
alvas
  • 2,340
  • 6
  • 25
  • 38