xFormers: A Modular and Hackable Transformer Modelling Library for Accelerating Research Transformers have revolutionized the field of natural language processing and have found applications in various domains, including vision and machine translation. However, working with transformers can be complex and time-consuming, especially when implementing bleeding-edge components that are not yet available in mainstream libraries like …