HLSTransform: Energy-Efficient Llama 2 Inference on FPGAs Via High Level Synthesis
Not on the map. Why?
Abstract (arXiv)
Graphics Processing Units (GPUs) have become the leading hardware accelerator for deep learning applications and are used widely in training and inference of transformers; transformers have achieved state-of-the-art performance in many areas of machine learning and are especially used in most modern Large Language Models (LLMs). However, GPUs require large amounts of energy, which poses environmental concerns, demands high operational costs, and causes GPUs to be unsuitable for edge computing. We develop an accelerator for transformers, namely, Llama 2, an open-source state-of-the-art LLM, using high level synthesis (HLS) on Field Programmable Gate Arrays (FPGAs). HLS allows us to rapidly prototype FPGA designs without writing code at the register-transfer level (RTL). We name our method HLSTransform, and the FPGA designs we synthesize with HLS achieve up to a 12.75x reduction and 8.25x reduction in energy used per token on the Xilinx Virtex UltraScale+ VU9P FPGA compared to an Intel Xeon Broadwell E5-2686 v4 CPU and NVIDIA RTX 3090 GPU respectively, while increasing inference speeds by up to 2.46x compared to CPU and maintaining 0.53x the speed of an RTX 3090 GPU despite the GPU's 4 times higher base clock rate. With the lack of existing open-source FPGA accelerators for transformers, we open-source our code and document our steps for synthesis. We hope this work will serve as a step in democratizing the use of FPGAs in transformer inference and inspire research into energy-efficient inference methods as a whole. The code can be found on https://github.com/HLSTransform/submission.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 20 of its 33 references that are in the map. First posted on arXiv 29 Apr 2024.
Builds on
20 of 33 references.
References · 20
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
- 2020GLU Variants Improve Transformercited by 1,724
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
- 2020A Primer in BERTology: What we know about how BERT workscited by 807
- 2024TinyLlama: An Open-Source Small Language Modelcited by 604
- 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 425
- 2023QuIP: 2-Bit Quantization of Large Language Models With Guaranteescited by 397
8 more
- 2021I-BERT: Integer-only BERT Quantizationcited by 250
- 2023From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inferencecited by 168
- 2018Fast inference of deep neural networks in FPGAs for particle physicscited by 132
- 2021hls4ml: An Open-Source Codesign Workflow to Empower Scientific Low-Power Machine Learning Devicescited by 61
- 2020FTRANS: Energy-Efficient Acceleration of Transformers using FPGAcited by 52
- 2022Great Power, Great Responsibility: Recommendations for Reducing Energy for Training Language Modelscited by 21
- 2021NPE: An FPGA-based Overlay Processor for Natural Language Processingcited by 15
- 2021Accelerating Deep Learning Inference via Learned Cachescited by 8
Built on by
Citing papers per year: 2024: 1; 2025: 0; 2026: 1.
2 papers.