Blogs / Why Transformers Are Costly on Long Sequences

Why Transformers Are Costly on Long Sequences

What a Hugging Face post says about why applying transformer-based models to long sequences is computationally very expensive.

  • Learning
  • 1 min read

For: Learners who know what a transformer model is.

What transformers have shown

Transformer-based models have shown to be very useful for many NLP tasks.[1]

Why long sequences are expensive

Hence, it's computationally very expensive to apply transformer-based models on long sequences .[1]

Transformer-basedmodelsvery useful for many NLPtasksLong sequencescomputationally veryexpensiveLongformer,Performer, Reformer,clustered attentionapproximate the fullattention matrixbutaddressed by
What do the named models try?

What other models try

Longformer, Performer, Reformer, Clustered attention try to remedy this problem by approximating the full attention matrix.[1]

Sources

  1. Understanding BigBird's Block Sparse Attention (huggingface.co · checked )

More articles