elixir-nx / bumblebee

Pre-trained Neural Network models in Axon (+ 🤗 Models integration)
Apache License 2.0
1.26k stars 90 forks source link

Use eos token for padding lazily #369

Closed jonatanklosko closed 2 months ago

jonatanklosko commented 2 months ago

Currently, for models that don't specify pad token, we use eos token as the default. However, this breaks if the model repo configures a different eos token, since the pad one is still the default (and may be invalid). This moves the fallback to where we actually use the pad token.