conformer
The convolutional module from the Conformer paper
What it is and what it does
Conformer is a PyTorch library implementing the Conformer architecture from the 2020 paper, which augments transformer models with depthwise convolutions to improve local feature extraction. The package provides three main components: ConformerConvModule (the core convolutional layer), ConformerBlock (a complete transformer block with attention, feed-forward, and convolution), and Conformer (a full stack of multiple blocks). It is primarily designed for speech recognition and audio tasks where capturing local patterns alongside global attention is beneficial.
The library depends only on torch and einops, making installation straightforward. However, the project is no longer maintained—the last commit was in May 2023 and the repository shows no active development. This means bug fixes, compatibility updates with newer PyTorch versions, or feature improvements are unlikely. For production use or long-term projects, you should evaluate whether the frozen implementation meets your needs or if you need an actively maintained alternative.
Use it for:
- Building speech recognition models that combine transformer attention with local convolution for improved acoustic modeling.
- Prototyping audio processing pipelines where you need the Conformer architecture as a backbone component.
- Research or educational projects exploring the Conformer paper's approach to augmenting transformers with convolution.
- Adapting existing Conformer implementations into larger custom architectures by using ConformerBlock or ConformerConvModule as building blocks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides PyTorch implementations of the Conformer architecture—a convolutional module and full transformer blocks that add local inductive bias to transformer models, commonly used in speech recognition.
Yes, if you need the Conformer architecture for a specific project and can accept a frozen, unmaintained codebase. The low install friction and permissive license make it easy to adopt, and the implementation is straightforward enough to fork or patch if needed. However, if you require ongoing maintenance, compatibility updates, or active support, look for an actively maintained alternative or be prepared to maintain a fork yourself.
Install
conformer on PyPI
pip
pip install conformeruv
uv add conformerpoetry
poetry add conformerInstalling conformer
Before you install
Low friction: pure Python wheel with only torch and einops as runtime dependencies. However, the package is abandoned—last release was 2023-05-17 and no commits since then, so expect no maintenance or bug fixes.
License in practice
MIT license is permissive; you can use, modify, and distribute this code freely with minimal restrictions, making it suitable for both open and closed projects.
Quickstart
pip install conformer
import torch
from conformer import ConformerBlock
block = ConformerBlock(dim=512, dim_head=64, heads=8, ff_mult=4, conv_expansion_factor=2, conv_kernel_size=31)
x = torch.randn(1, 1024, 512)
output = block(x)
Requires PyTorch and einops to be installed; no other system-level dependencies.
Verify before relying
- Whether the implementation matches the exact Conformer paper specification or if there are known deviations.
- Current compatibility with recent PyTorch versions, given the last release was in 2023.
- Whether the TODO items (relative positional encoding, flash attention) have been addressed elsewhere or remain unimplemented.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — einops, torch |
| Maintenance | abandoned — 1,185 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 508,777/month — #6,276 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: conformer-0.3.2-py3-none-any.whl
Keywords: artificial intelligence, deep learning, transformers, audio
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
vit-pytorchProvides PyTorch implementations of Vision…
permissive · top 15,000 on PyPI
local-attentionImplements local windowed attention for…
permissive · top 15,000 on PyPI
x-transformersx-transformers provides modular transformer…
permissive · top 5,000 on PyPI
CoLT5-attentionImplements conditionally routed efficient…
permissive · top 15,000 on PyPI
torchaudioProvides PyTorch-based audio processing,…
permissive · top 5,000 on PyPI
rotary-embedding-torchImplements rotary positional embeddings for…
permissive · top 15,000 on PyPI
xformersXFormers provides reusable, composable building…
permissive · top 5,000 on PyPI
transformer-engineTransformer Engine accelerates Transformer…
unclear · top 15,000 on PyPI
curated-transformersCurated Transformers provides PyTorch…
permissive · top 5,000 on PyPI
transformer-engine-cu13Accelerates Transformer model training and…
unclear · top 15,000 on PyPI