TATAA: Programmable Mixed-Precision Transformer Acceleration with a Transformable Arithmetic Architecture

Jiajun Wu, Mo Song, Jingmin Zhao, Yizhao Gao, Jia Li, Hayden Kwok-Hay So · DOI

Abstract

Transformer models increasingly rely on diverse non-linear functions that create computational bottlenecks in standard hardware accelerators. This paper presents TATAA, a programmable mixed-precision accelerator on FPGA featuring a Transformable Arithmetic Architecture. By utilizing Dual-Mode Processing Units (DMPUs), TATAA dynamically reconfigures its hardware to handle both high-throughput int8 matrix multiplications and high-precision bfloat16 non-linear operations. This approach eliminates the need for expensive quantization-aware training while achieving significant improvements in DSP efficiency and power consumption compared to state-of-the-art GPUs and FPGA designs.

Introduction: The Non-linear Bottleneck

While linear matrix multiplications constitute the bulk of Transformer computations, modern architectures like Llama, GPT, and ViT increasingly utilize complex non-linear functions such as SoftMax, LayerNorm, and specialized activations (GELU, SwiGLU). These operations, despite their smaller workloads, can account for up to 25% of total inference time.

Standard accelerators typically face a trade-off: quantizing all operations to low-bit integers to maximize speed—which often necessitates data-intensive Quantization-Aware Training (QAT)—or employing dedicated floating-point units (FPUs) that remain idle during linear computation phases, wasting silicon area. TATAA addresses this by providing a unified, programmable framework capable of handling both linear and non-linear operations on a single hardware footprint.

Transformer block computation and the variety of non-linear functions across different models.

Proposed Architecture: TATAA

The core innovation of TATAA is its Transformable Arithmetic Architecture, centered around Dual-Mode Processing Units (DMPUs).

Dual-Mode Processing Units (DMPUs)

Rather than implementing separate circuits for integer and floating-point arithmetic, TATAA utilizes DMPUs that morph at runtime based on the operation required:

  • Systolic Array Mode: For linear layers, the units are linked to perform high-throughput int8 matrix multiplications.
  • SIMD Mode: For non-linear layers, the units decouple to function as a vectorized bfloat16 engine.

Mixed-Precision Strategy

The choice of bfloat16 is strategic; its structure (1-bit sign, 8-bit exponent, 7-bit mantissa) aligns well with 8-bit integer hardware. TATAA decomposes complex floating-point operations—including addition, multiplication, and approximations for square roots and division—into sequences of integer operations. This allows for high-precision non-linear processing without dedicated FPUs. By maintaining non-linear layers in bfloat16, TATAA supports Post-Training Quantization (PTQ), allowing pre-trained models to be deployed with minimal accuracy loss and no retraining.

The TATAA Core Architecture, featuring DMPU design and the run-time transformation between linear and non-linear modes.

End-to-End Compiler

The hardware is complemented by a custom compiler that maps models from ONNX or PyTorch to the TATAA Instruction Set Architecture (ISA). It optimizes dataflow by caching intermediate results in on-chip registers, significantly reducing external memory access.

Evaluation and Results

TATAA was evaluated across diverse benchmarks, including DeiT and Swin (Vision), BERT (NLP), and GPT-2/OPT (Generative AI), as well as components from Llama and ChatGLM2.

  • Accuracy: The mixed-precision approach maintained high fidelity, with an accuracy drop of only 0.14% to 1.16% compared to full FP32 models.
  • Performance: On an Alveo U280 FPGA, TATAA achieved 2935.2 GOPS for linear layers and 189.5 GFLOPS for non-linear operations.
  • Efficiency: TATAA demonstrated 2.19× better power efficiency than an NVIDIA RTX 4090 GPU on BERT and achieved 4.25× lower latency for complex non-linear operations compared to existing FPGA accelerators. It also showed 2.29× higher DSP efficiency through hardware reuse.

Conclusion

TATAA demonstrates that a transformable hardware architecture can effectively bridge the gap between high-throughput integer math and high-precision non-linear functions. By repurposing hardware resources, it provides a flexible and efficient solution for deploying modern Transformers without the overhead of retraining. Future work will explore scaling to multi-FPGA setups for larger LLMs and further optimizing memory-bound operations like SoftMax.

Summary updated

BibTeX
@article{wu2025tataa,
  author = {Jiajun Wu and Mo Song and Jingmin Zhao and Yizhao Gao and Jia Li and Hayden Kwok-Hay So},
  title = {{TATAA: Programmable Mixed-Precision Transformer Acceleration with a Transformable Arithmetic Architecture}},
  journal = {ACM Trans. Reconfigurable Technol. Syst.},
  year = {2025},
  doi = {10.1145/3714416},
}
Figure