GithubHelp home page GithubHelp logo

iksnagreb / attention-dummy Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 657 KB

Quickly generate PyTorch/Brevitas Scaled Dot-Product Attention dummy operators for exploring QONNX and FINN graph transformations

Python 95.97% Shell 4.03%

attention-dummy's Introduction

attention-dummy

Quickly generate PyTorch/Brevitas Scaled Dot-Product Attention dummy operators for exploring QONNX and FINN graph transformations

Setup

Install the dependencies listed in the requirements.txt, for example via pip (these are mostly for debugging and orchestrating the builds, FINN comes with its own dependencies bundled in a docker image):

pip install -r requirements.txt

Clone and checkout the feature branch of FINN combining all necessary additions and modifications to FINN related to the attention feature and remember the path you cloned into:

git clone https://github.com/iksnagreb/[email protected]/merge/attention

Add the attention-hlslib dependency manually to your FINN installation (note that this is a private repository for now, you may have to request access):

cd <path-to-finn>/deps/
git clone https://github.com/iksnagreb/attention-hlslib.git

Running FINN Builds

The whole export, build and evaluation pipeline is managed by dvc and is executed as follows (see dvc.yaml and params.yaml for configuration options and stage dependencies):

FINN=<path-to-finn> dvc repro

It is possible to specify all FINN related environment variables (e.g. the FINN_HOST_BUILD_DIR) as usual. It might be necessary to pull existing model and build artifacts into the local dvc cache first, though dvc should try to reproduce these if not available:

dvc pull

All output artifacts, i.e., the exported model ONNX files, verification inputs, FINN build logs, reports and the generated bitstream and driver script can be found in the build directory.

attention-dummy's People

Contributors

iksnagreb avatar

Stargazers

Thomas Keller avatar  avatar Max Kuhmichel avatar

Watchers

Thomas Keller avatar  avatar Kostas Georgiou avatar

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.