Cited by 227Advanced Neural Network ApplicationsTopic ModelingNatural Language Processing Techniques

HAT: Hardware-Aware Transformers for Efficient Natural Language Processing

Open access
Wang, Hanrui, Wu, Zhanghao, Liu, Zhijian, Cai, Han, Zhu, Ligeng, Gan, Chuang, Han, Song·2020·Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics

Abstract

Transformers are ubiquitous in Natural Language Processing (NLP) tasks, but they are difficult to be deployed on hardware due to the intensive computation.To enable low-latency inference on resource-constrained hardware platforms, we propose to design Hardware-Aware Transformers (HAT) with neural architecture search.We first construct a large design space with arbitrary encoder-decoder attention and heterogeneous layers.Then we train a Super-Transformer that covers all candidates in the design space, and efficiently produces many SubTransformers with weight sharing.Finally, we perform an evolutionary search with a hardware latency constraint to find a specialized SubTransformer dedicated to run fast on the target hardware.Extensive experiments on four machine translation tasks demonstrate that HAT can discover efficient models for different hardware (CPU, GPU, IoT device).When running WMT'14 translation task on Raspberry Pi-4, HAT can achieve 3× speedup, 3.7× smaller size over baseline Transformer; 2.7× speedup, 3.6× smaller size over Evolved Transformer with 12,041× less search cost and no performance loss.HAT is open-sourced.Elastic Layer Num in Encoder Elastic Head Num (Self Attention) Elastic Hidden Dim in FFN Encoder Layer 2 Encoder Layer m Elastic Embedding Dim Elastic Head Num (Self Attention) Elastic Hidden Dim in FFN Elastic Embedding Dim Elastic Head Num (En-Decoder Attention) Decoder Layer n Elastic Layer Num in Decoder Arbitrary Encoder-Decoder Attention concat ❶ Train a SuperTransformer by uniformly sampling SubTransformers with weight sharing 12/3/

Integrity signals

Registry

Crossref · 10.18653/v1/2020.acl-main.686

Cites

4 of 4 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • HAT developed a methodology to search transformer models which have better validation metrics than the original transformer while having lower latency on CPU, GPU and mobile platforms.

    “For instance, Hardware-aware Transformers (HAT) [53] developed a methodology to search transformer models which have better validation metrics than original transformer [2] while having lower latency on CPU, GPU and mobile platforms.”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [53]

  • HAT showed that the NLP transformer specialized for GPU runs faster on GPU than CPU and vice versa for similar validation accuracy.

    “For instance, Hardware-aware Transformers (HAT) [53] showed that the NLP transformer specialized for GPU runs faster on GPU than CPU and vice versa for similar validation accuracy.”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [53]

  • HAT's searched subtransformers reveal that GPU platforms prefer shallow models with wide layers, while ARM CPU picks deep models with thin layers to obtain optimal hardware performance.

    “The searched subtransformers reveal that GPU platforms prefer shallow models with wide layers, while ARM CPU picks deep models with thin layers to obtain optimal hardware performance.”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [53]

  • HAT's searched model for Raspberry Pi-4 embedded device on the WMT'14 translation task achieves a 3× speedup with 3.7× fewer trainable parameters over the baseline vanilla transformer.

    “The searched model for Raspberry Pi-4 embedded device on the WMT'14 translation task achieves a 3 × speedup with 3.7 × fewer trainable parameters over the baseline vanilla transformer.”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [53]

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Wang, H., Wu, Z., Liu, Z., Cai, H., Zhu, L., Gan, C., & Han, S.
Affiliations
  • Massachusetts Institute of Technology (US)
  • IBM (United States) (US)
Venue
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics
Published
2020
Pages
7675-7688
ISSN
0736-587X (ISSN-L)
OpenAlex
W3035251378
Cited by
227
References
4
Citations by year
2026: 11 · 2025: 22 · 2024: 30 · 2023: 64 · 2022: 38 · 2021: 48 · 2020: 14
FWCI
12.65
Type
conference paper
Language
en
Open access
Licence
cc-by
Locations
  • Proceedings of the conference - Association for Computational Linguistics. Meeting (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion)
  • DSpace@MIT (Massachusetts Institute of Technology) (submittedVersion, other-oa)
  • arXiv (Cornell University)
Funders
National Science Foundation (1943349)
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
Keywords
neural architecture search, low-latency inference, resource-constrained devices, evolutionary search, parameter sharing, heterogeneous layer, encoder-decoder attention, model compression, Raspberry Pi deployment

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review