OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Lsq Net

Lsq Net is an unofficial Python and PyTorch implementation of Learned Step Size Quantization for training and evaluating quantized deep neural networks, with current model support for ResNet.

Independent OpenViST project profile, based on linked sources.

Lsq Net — ImageNet and CIFAR-10 ResNet experiments
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need a code-based LSQ workflow for ResNet quantization experiments and can supply the configuration, data and compute environment for your run.

Who it is for

  • Researchers and developers experimenting with quantized ResNet training.
  • PyTorch users evaluating quantized-model accuracy from checkpoints.
  • Developers prepared to add and register model code when adapting the framework to another architecture.

Documented uses

  • Train quantized ResNet models using YAML configuration settings.
  • Resume training from a checkpoint or evaluate a quantized model's accuracy.
  • Compare configurations such as weight and activation bitwidths using model results.
  • Extend the implementation with added model code and a registered architecture.
Before you choose

Requirements & limits

The repository is public and identified as MIT-licensed.

  • The current supported model family is ResNet, with listed variants for ImageNet and CIFAR-10.
  • The README specifies Python 3.8, PyTorch GPU version 1.5 or later, CUDA toolkit 10.1, TensorBoard, scikit-learn, PyYAML and Munch.
  • The implementation generally follows LSQ paper version 2 but initializes activation quantization step sizes to 1.0.
  • The README reports one ImageNet ResNet-18 result at 3-bit weights and 2-bit activations: 66.9% top-1 and 87.2% top-5 accuracy.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the documented Python environment

Prepare the Anaconda environment and dependencies listed for using Lsq Net.

Before you start

  • Anaconda or conda
  • Python 3.8
  • GPU-capable PyTorch installation

Steps

  1. Create a conda environment with Python 3.8.

  2. Install PyTorch, torchvision and cudatoolkit 10.1 from the PyTorch channel.

  3. Install TensorBoard.

  4. Install scikit-learn, PyYAML and Munch.

Expected outcome

An environment with the dependencies specified in the repository README.

Guide limitations

  • This covers dependency setup only; it does not establish that a particular machine or CUDA setup is compatible.
  • The README specifies PyTorch GPU version 1.5 or later.
Source-based practical guide

Launch a configured training or evaluation run

Pass a YAML configuration file to the repository's main script for its documented training or evaluation workflow.

Before you start

  • The repository and its dependencies
  • A YAML configuration file, such as a provided example or a modified copy of config.yaml
  • A dataset and checkpoint as required by the selected configuration

Steps

  1. Choose or copy a YAML configuration file and adjust its documented options.

  2. Run main.py with the configuration file path as its argument.

  3. For continued training or model evaluation, set resume.path in the YAML file to the checkpoint path.

Expected outcome

The program starts with the selected YAML settings; training saves the best model parameters after each epoch, and a checkpoint path can be used to resume training or evaluate model accuracy.

Guide limitations

  • Only ResNet architectures are currently supported.
  • The README documents the command and checkpoint configuration but does not provide a complete dataset setup procedure.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
20 November 2026
Original website title
zhutmost/lsq-net · Official homepage title · retained in its source language