OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Hqq

Hqq is a Python implementation of Half-Quadratic Quantization that reduces model weights to configurable bit widths without requiring calibration data. It supports PyTorch linear layers and documented Transformers model workflows, with options for saving and loading quantized models.

Independent OpenViST project profile, based on linked sources.

Hqq — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Hqq when preparing a PyTorch or Transformers model for lower-bit weight storage and a workflow that does not require calibration data. Check the target model’s save/load path and the supported settings of the intended inference backend before choosing a configuration.

Who it is for

  • Machine-learning developers preparing models for deployment with lower weight-storage requirements.
  • Teams working with PyTorch or Transformers models that want a calibration-free quantization workflow.

Documented uses

  • Quantize model weights at supported bit widths from 1 to 8 bits.
  • Replace PyTorch linear layers with quantized HQQLinear layers.
  • Load, quantize, save and reload causal language models through documented Transformers integrations.
  • Choose quantization parameters and backends according to quality, memory and inference constraints.
Before you choose

Requirements & limits

The repository is public and specifies an Apache-2.0 license.

  • The README lists 8-, 4-, 3-, 2- and 1-bit quantization.
  • The suggested starting configuration is 4 bits, group size 64 and axis 1; axis 0 can improve results but is not supported by the optimized inference runtime described.
  • The ATEN/CUDA backend supports axis 0, while inference backends have separate configuration constraints.
  • Models saved with the Hqq library are not compatible with Transformers from_pretrained(); Hqq provides its own loading helper and a safetensors save route.

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 Hqq from the repository

Install the library from a local checkout using the repository’s documented setup route.

Before you start

  • A PyTorch 2 version matching the installed CUDA version.
  • A local clone of the Hqq repository.

Steps

  1. Clone the repository.

  2. From the repository folder, run the command below.

    Documented command
    pip install .

Expected outcome

Hqq is installed from the local repository checkout.

Guide limitations

  • The repository also documents pip installation, but this guide covers only the local-checkout route.
  • The source does not specify platform compatibility beyond its technical classification as Linux.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
13 October 2026
Original website title
dropbox/hqq · Official homepage title · retained in its source language