All models

sb_ConformerEncoder

Attention and a depthwise convolution between two half-step feed-forward layers; the speech encoder of the 2020s.

Audio and speech · 291 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (10 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
12.7M
Operations
291
Framework
PyTorch
Recurrent
No
Published
Interspeech 2020
Cited by
3,128 (as of 18 October 2026)
Authors
Anmol Gulati, James Qin, Chung-Cheng Chiu and others
License
BSD-2-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m9045
Graph hash
f695f34973cc9d9667bac4794459bee62c1735e03c8e362b270e26470e2d432a
Skeleton hash
23f262337e9b41a2f6308bbaa377d318b95920413241a7b09762b8476757aa05
Architecture hash
05d09b0e955bfbe5a19f26ee0e1b348acd84c7be3334e95f3f1cc85981efa7ff
Diagram SHA-256
911490fe0b5cc1bc06f3410d9613d11277924be2fada9da289679f90ae5b9e96
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

Conformer is a convolution-augmented Transformer for speech recognition, built to get the best of both worlds from attention and convolution. The premise is that Transformer models are good at capturing content-based global interactions, while CNNs exploit local features effectively. The paper studies how to combine the two to model both local and global dependencies of an audio sequence in a parameter-efficient way.

A Conformer block stacks four modules: a feed-forward module, a self-attention module, a convolution module, and a second feed-forward module at the end. The two feed-forward modules sandwich attention and convolution, a structure inspired by Macaron-Net with its two half-step feed-forward layers. Self-attention is multi-headed and borrows the relative sinusoidal positional encoding scheme from Transformer-XL. The authors found that two Macaron-style feed-forward layers give a significant improvement over a single feed-forward module.

On LibriSpeech, Conformer reaches word error rates of 2.1%/4.3% without a language model and 1.9%/3.9% with an external language model on test/testother. A small model of only 10M parameters still reaches 2.7%/6.3%. Three sizes, small, medium and large, were chosen at 10M, 30M and 118M parameters by sweeping depth, model dimension and attention heads. One of the saved implementations is SpeechBrain's ConformerEncoder. Its convolution module replaces the BatchNorm of the original Conformer with a LayerNorm.

Key idea. Sandwiching multi-headed self-attention and a convolution module between two half-step feed-forward modules, so one block models both local and global dependencies of an audio sequence.

  • Conformer
  • Convolution-augmented Transformer
  • ConformerEncoder
  • speech recognition
  • ASR
  • LibriSpeech
  • SpeechBrain Conformer
  • torchaudio Conformer
  • Macaron-Net

AI-written summary, checked automatically against its sources; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{gulati2020conformerconvolutionaugmentedtransformerspeech,
      title={Conformer: Convolution-augmented Transformer for Speech Recognition}, 
      author={Anmol Gulati and James Qin and Chung-Cheng Chiu and Niki Parmar and Yu Zhang and Jiahui Yu and Wei Han and Shibo Wang and Zhengdong Zhang and Yonghui Wu and Ruoming Pang},
      year={2020},
      eprint={2005.08100},
      archivePrefix={arXiv},
      primaryClass={eess.AS},
      url={https://arxiv.org/abs/2005.08100}, 
}