GithubHelp home page GithubHelp logo

autoq's Introduction

AutoQ

A library (W.I.P) that automatically quantizes a Keras Model in Qm.n format. Configurable with Hydra.

How to install

pip install -r requirements.txt

How to run

python main.py

How it works

Given a model M with L layers and a quatization bits space B, the number of total configurations is B^L. The goal of this tool is to find for M the best configuration among the B^L possible ones.
AutoQ follows the following pipeline:

  • Compute, for each layer l, the best values m and n in order to minimize the quantization loss.
  • Sample a subset of the B^L configurations. This will be the training set for the regressor (see following)
  • Train a regressor r that receives in input a configuration q and predicts the performances of the model M quantized following q.
  • Execute an optimization algorithm that explore the configuration space (using r), in order to find the best configuration q for M that preserves the performances while minimizes the number of bits used.\

How to configure

In config the default paremeters are defined:

  • qmnAnalyzer defines which class is responsible for extracting the informations for each layer
  • model defines the model M
  • dataset defines the dataset on which M will be evaluated
  • explorer defines the class that will be responsible of creating the training set for the regressor r
  • regressor defines the regressor r
  • optimizer defines the optimizer algorithm
  • bitSpace defines the bit space B

autoq's People

Contributors

rizzo98 avatar

Watchers

 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.