BAQET: BRAM-aware Quantization for Efficient Transformer Inference via Stream-based Architecture on an FPGA
FPGAs are a compelling substrate for supporting machine learning inference. Tools such as High-Level Synthesis and hls4ml can shorten the development cycle for deploying ML algorithms on FPGAs, but can struggle to handle the large on-chip storage needed for many of these models. In particular the high BRAM usage found in many of these flows can cause Place & Route failures during synthesis. In this paper we propose using a Simulated-Annealing based flow to perform BRAM-aware quantization. This approach trades off inference accuracy with BRAM usage, to provide a high-quality inference engine that still meets on-chip resource constraints. We demonstrate this flow for Transformer-based machine learning algorithms, which include Flash Attention in a Stream-based Dataflow architecture. Our system imposes minimal accuracy drops, yet can reduce BRAM usage by 20%-50%, and improve power efficiency by 264%-812% compared to existing Transformer-based accelerators on FPGAs
Authors
- Scott Hauck (ORCID: https://orcid.org/0000-0001-9516-0311)
- Bo-Cheng Charles Lai (ORCID: https://orcid.org/0000-0002-9729-5196)
- Trung Le (ORCID: https://orcid.org/0000-0002-7047-8451)
- S.‐C. Hsu (ORCID: https://orcid.org/0000-0001-6214-8500)
- C. H. Chen
- Ling-Chi Yang (ORCID: https://orcid.org/0009-0008-3064-6108)
Institutions
- National Yang Ming Chiao Tung University (TW)
- University of Washington (US)
- University of Washington Applied Physics Laboratory (US)
- Seattle University (US)
Publication Details
- Published
- 2025-02-26
- DOI
- https://doi.org/10.1145/3706628.3708849
- Primary Topic
- Image and Signal Denoising Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00