Code Monkey home page Code Monkey logo

swifttron's Introduction

SwiftTron: An Efficient Hardware Accelerator for Quantized Transformers

This repository provides the source codes of the SwiftTron hardware design for Quantized Transformers. If you used these results in your research, please refer to the paper

A. Marchisio, D. Dura, M. Capra, M. Martina, G. Masera and M. Shafique, "SwiftTron: An Efficient Hardware Accelerator for Quantized Transformers," 2023 International Joint Conference on Neural Networks (IJCNN), Queensland, Australia, June 2023.
@INPROCEEDINGS{Marchisio2023SwiftTron,
  author={A. {Marchisio} and D. {Dura} and M. {Capra} and M. {Martina} and G. {Masera} and M. {Shafique}},
  booktitle={2023 International Joint Conference on Neural Networks (IJCNN)}, 
  title={SwiftTron: An Efficient Hardware Accelerator for Quantized Transformers}, 
  year={2023},
  volume={},
  number={},
  pages={}}

swifttron's People

Contributors

albertomarchisio avatar

Stargazers

Ilayda Yaman avatar Balint Cristian avatar Robin_Leon avatar  avatar  avatar boat avatar Xiang Li avatar Ming-Han Tsai avatar  avatar Papiris avatar  avatar  avatar Wayne avatar  avatar  avatar Mingo avatar Liu Yang avatar  avatar 房泽锐 avatar Xiuhua Yang avatar Cra2yPierr0t avatar  avatar  avatar  avatar Li Guo avatar  avatar Cao Boran avatar  avatar  avatar Zhikai Li avatar

Watchers

 avatar

swifttron's Issues

Questions about Non-liner functions

Hi Alberto, thanks for your work. After reading your paper and the vhdl code here, I had some questions that may need your help to illustrate.

Don't the non-linear functions Softmax and LayerNorm need some register files or SRAMs to store the middle results?

Let's take the Softmax operator as an example. Your architecture has three stages: max search, exp computation, and output gener.

In the I_SOFTMAX.vhd, q_in_soft is one 32-bit data q_in_soft. You're using one comparator to find the max value. Hence it takes several cycles to find the max value of one whole row.

IF(SIGNED(q_in_soft) > SIGNED(q_max)) THEN
q_max <= q_in_soft;
END IF;

In this case, doesn't this module need some reg files or SRAMs to store the q_in_soft so that it can be used to compute the q_diff? If this is computed after the comparison, the q_max is not the max of the whole row.

q_diff <= STD_LOGIC_VECTOR(SIGNED(q_in_soft) - SIGNED(q_max));

Things are similar to the LayerNorm.

Looking forward to your illustration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.