Code Monkey home page Code Monkey logo

low_precision_quantization's Introduction

Low-Precision Quantizer

lpq(Low-Precision Quantizer) is a method for performing integer quantization. It is implemented in C++ with complete Python bindings. In order for the Python wheel to work, make sure you have python 3.7 and above installed.

Building the Package

In order to build this package, first clone this repository with the available submodules

$ git clone https://github.com/BlaiseMuhirwa/low_precision_quantization.git --recurse-submodules

Open the low_precision_quantization folder and install the necessary Python libraries via pip. I recommend first creating a virtual environment.

$ python3 -m venv lpq_venv
$ source lpq_venv/bin/activate
$(lpq_venv) pip install -r requirements.txt 

Now to build the package, run the setup file, which will invoke cmake in order to create a wheel file for the package.

$(lpq_venv) python setup.py bdist_wheel 

This will create a wheel file in a dist folder. The file should be named something like dist/lpq-0.0.1-cp310-cp310-macosx_12_0_arm64.whl. The final step is to just install the library with pip.

$(lpq_venv) pip install dist/dist/lpq-0.0.1-cp310-cp310-macosx_12_0_arm64.whl

You can then import this library in a python script as follows:

from lpq import quantizer

quantizer = quantizer.LowPrecisionQuantizerInt8()
help(quantizer)

low_precision_quantization's People

Contributors

blaisemuhirwa 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.