# salesforce/pytorch-qrnn

PyTorch implementation of the Quasi-Recurrent Neural Network - up to 16 times faster than NVIDIA's cuDNN LSTM

Repository: https://github.com/salesforce/pytorch-qrnn
Canonical: https://ross.abutalabs.com/products/pytorch-qrnn
Language: Python
License: BSD-3-Clause
License Family: permissive
Archived: true
Last push: 2022-02-12T14:34:07+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3262, "days_push": 1663, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1263, forks 192 (observed 2026-08-28T04:04:10.406140+00:00)

## What it is
A PyTorch implementation of the Quasi-Recurrent Neural Network (QRNN) from Salesforce Research, offering LSTM-like accuracy with 2-17x faster training than cuDNN LSTM. It provides a drop-in replacement API for PyTorch's LSTM/GRU modules with both GPU and CPU implementations.

## Use cases
- speed up LSTM training in PyTorch
- replace LSTM or GRU layers with a faster recurrent network
- train language models faster with AWD-QRNN
- run recurrent networks across multiple GPUs with DataParallel
- build sequence models with fewer compute costs

## When to choose
- you need faster recurrent network training than cuDNN LSTM on NVIDIA GPUs
- you want a drop-in LSTM/GRU replacement in PyTorch with similar accuracy
- you are doing language modeling and want near state-of-the-art results with quicker training

## When to avoid
- you need bidirectional recurrent layers (not supported)
- you work only on CPU where speedups are smaller
- you need actively maintained code with recent PyTorch compatibility
- you prefer transformer-based architectures over RNNs

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning
- platform: python, cross-platform
- tags: pytorch, qrnn, quasi-recurrent-neural-network, lstm-alternative, rnn, cuda, language-modeling, natural-language-processing, gpu, linux

## Member repositories
- salesforce/pytorch-qrnn (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:10.406140+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:04:10.175413+00:00, confidence not recorded.
  - readme: https://github.com/salesforce/pytorch-qrnn (fetched 2026-08-28T04:04:10.406140+00:00, sha ae38c6b42246)
- Data as of 2026-08-30T08:39:29.467469+00:00.
