# Flash Attention 2

Published articles for Flash Attention 2.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Finally, a Replacement for BERT: Introducing ModernBERT

DevFeed: [Finally, a Replacement for BERT: Introducing ModernBERT](<https://devfeed.tech/articles/finally-a-replacement-for-bert-introducing-modernbert-7356.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/modernbert>)

Author: Benjamin Warner; Antoine Chaffin; Benjamin Clavié; Orion Weller; Oskar Hallström; Said Taghadouini; Alexis Gallagher; Raja Biswas; Faisal Ladhak; Tom Aarsen

Published: 2024-12-19T00:00:00Z

Content type: article

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Transformers](<https://devfeed.tech/topics/transformers.md>), [Retrieval-Augmented Generation](<https://devfeed.tech/topics/retrieval-augmented-generation.md>), [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [community](<https://devfeed.tech/tags/community.md>), [fine-tuning](<https://devfeed.tech/tags/fine-tuning.md>), [flash-attention-2](<https://devfeed.tech/tags/flash-attention-2.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [nlp](<https://devfeed.tech/tags/nlp.md>), [open-source-collab](<https://devfeed.tech/tags/open-source-collab.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rag](<https://devfeed.tech/tags/rag.md>), [research](<https://devfeed.tech/tags/research.md>), [transformers](<https://devfeed.tech/tags/transformers.md>)

### AI overview

The article introduces ModernBERT, a family of encoder-only models designed as improved replacements for BERT-like models. It describes 8,192-token context, stronger downstream performance, faster processing, base and large model sizes, compatibility with Transformers, and use cases including retrieval, classification, question answering, entity extraction, RAG pipelines, and recommendation systems. It also recommends Flash Attention 2 when supported by the GPU.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.

## Improving Hugging Face Training Efficiency Through Packing with Flash Attention 2

DevFeed: [Improving Hugging Face Training Efficiency Through Packing with Flash Attention 2](<https://devfeed.tech/articles/improving-hugging-face-training-efficiency-through-packing-with-flash-attention-2-7433.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/packing-with-FA2>)

Author: Rhui Dih Lee; Arthur Zucker; Achintya Kundu; Laura Wynter; Raghu Ganti; Mayank Mishra

Published: 2024-08-21T00:00:00Z

Content type: article

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [hugging face](<https://devfeed.tech/topics/hugging-face.md>), [Transformers](<https://devfeed.tech/topics/transformers.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [datasets](<https://devfeed.tech/topics/datasets.md>)

Tags: [datasets](<https://devfeed.tech/tags/datasets.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [flash-attention-2](<https://devfeed.tech/tags/flash-attention-2.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [hugging-face](<https://devfeed.tech/tags/hugging-face.md>), [models](<https://devfeed.tech/tags/models.md>), [packing](<https://devfeed.tech/tags/packing.md>), [padding](<https://devfeed.tech/tags/padding.md>), [training](<https://devfeed.tech/tags/training.md>), [transformers](<https://devfeed.tech/tags/transformers.md>)

### AI overview

The article explains how Hugging Face improves training throughput by packing instruction-tuning sequences without padding while using Flash Attention 2. A new data collator preserves sequence boundaries and can provide up to 2x higher throughput while maintaining convergence quality, with measured gains varying by dataset and sequence-length variance.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.

## Falcon 2: An 11B parameter pretrained language model and VLM, trained on over 5000B tokens and 11 languages

DevFeed: [Falcon 2: An 11B parameter pretrained language model and VLM, trained on over 5000B tokens and 11 languages](<https://devfeed.tech/articles/falcon-2-an-11b-parameter-pretrained-language-model-and-vlm-trained-on-over-5000b-tokens-and-11-languages-7189.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/falcon2-11b>)

Author: Quentin Malartic; Nilabhra Roy Chowdhury; Ruxandra Cojocaru; Mughaira; Giulia Campesan; Sanath Narayan; Ankit Singh; Clémentine Fourrier; Nathan Habib

Published: 2024-05-24T00:00:00Z

Content type: article

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [vlm](<https://devfeed.tech/topics/vlm.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [model-deployment](<https://devfeed.tech/topics/model-deployment.md>), [dataset](<https://devfeed.tech/topics/dataset.md>), [model architecture](<https://devfeed.tech/topics/model-architecture.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>)

Tags: [3d](<https://devfeed.tech/tags/3d.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [community](<https://devfeed.tech/tags/community.md>), [data](<https://devfeed.tech/tags/data.md>), [ecosystem](<https://devfeed.tech/tags/ecosystem.md>), [flash-attention-2](<https://devfeed.tech/tags/flash-attention-2.md>), [inference](<https://devfeed.tech/tags/inference.md>), [llm](<https://devfeed.tech/tags/llm.md>), [model](<https://devfeed.tech/tags/model.md>), [multimodal](<https://devfeed.tech/tags/multimodal.md>), [nlp](<https://devfeed.tech/tags/nlp.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [research](<https://devfeed.tech/tags/research.md>), [vision](<https://devfeed.tech/tags/vision.md>), [vlm](<https://devfeed.tech/tags/vlm.md>)

### AI overview

The article announces Falcon 2, a family of smaller open-source models from TII that includes an 11B pretrained language model and an 11B vision-language model. Falcon 2 targets improved performance, multimodal support, cheaper inference, and broader downstream use. The VLM supports text-based conversations about visual content, while the models primarily support English and have capabilities in ten additional languages.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.

## Powerful ASR + diarization + speculative decoding with Hugging Face Inference Endpoints

DevFeed: [Powerful ASR + diarization + speculative decoding with Hugging Face Inference Endpoints](<https://devfeed.tech/articles/powerful-asr-diarization-speculative-decoding-with-hugging-face-inference-endpoints-7106.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/asr-diarization>)

Author: Sergei Petrov; Vaibhav Srivastav; Pedro Cuenca; Philipp Schmid

Published: 2024-05-01T00:00:00Z

Content type: article

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [asr](<https://devfeed.tech/topics/asr.md>), [inference-endpoints](<https://devfeed.tech/topics/inference-endpoints.md>), [hugging face](<https://devfeed.tech/topics/hugging-face.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Whisper](<https://devfeed.tech/topics/whisper.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>)

Tags: [asr](<https://devfeed.tech/tags/asr.md>), [audio](<https://devfeed.tech/tags/audio.md>), [flash-attention-2](<https://devfeed.tech/tags/flash-attention-2.md>), [hugging-face](<https://devfeed.tech/tags/hugging-face.md>), [inference](<https://devfeed.tech/tags/inference.md>), [inference-endpoints](<https://devfeed.tech/tags/inference-endpoints.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [whisper](<https://devfeed.tech/tags/whisper.md>)

### AI overview

This article explains how to build a custom inference handler for Automatic Speech Recognition, speaker diarization, and speculative decoding on Hugging Face Inference Endpoints. It covers modular pipeline design, repository files, Pyannote-based diarization, PyTorch SDPA with Flash Attention 2, and constraints on speculative decoding such as batch size one and compatible decoder architectures.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.