explosion / curated-transformers

🤖 A PyTorch library of curated Transformer models and their composable components
MIT License
864 stars 34 forks source link

Option to only return the last hidden layer output from models #342

Open danieldk opened 1 year ago

danieldk commented 1 year ago

In many applications we only need the last layer and letting go of references to intermediate layers can save some memory during inference.