# QPyTorch: A Low-Precision Arithmetic Simulation Framework

arXiv: https://arxiv.org/abs/1910.04540 · HTML: https://mlsanity.com/paper/1910.04540/

## Key facts

- Cited by 22 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 9 Oct 2019.

## Built on by (most cited first, 22 of 22)

- [ZeroQuant(4+2): Redefining LLMs Quantization with a New FP6-Centric Strategy for Diverse Generative Tasks](https://mlsanity.com/paper/2312.08583/) (2023)
- [Low-Precision Stochastic Gradient Langevin Dynamics](https://mlsanity.com/paper/2206.09909/) (2022)
- [SALO: An Efficient Spatial Accelerator Enabling Hybrid Sparse Attention Mechanisms for Long Sequences](https://mlsanity.com/paper/2206.14550/) (2022)
- [Adaptive Precision Training (AdaPT): A dynamic fixed point quantized training approach for DNNs](https://mlsanity.com/paper/2107.13490/) (2021)
- [Scaling Laws for Floating Point Quantization Training](https://mlsanity.com/paper/2501.02423/) (2025)
- [Hessian Aware Quantization of Spiking Neural Networks](https://mlsanity.com/paper/2104.14117/) (2021)
- [Towards Cheaper Inference in Deep Networks with Lower Bit-Width Accumulators](https://mlsanity.com/paper/2401.14110/) (2024)
- [PLAM: a Posit Logarithm-Approximate Multiplier](https://mlsanity.com/paper/2102.09262/) (2021)
- [Low-Precision Reinforcement Learning: Running Soft Actor-Critic in Half Precision](https://mlsanity.com/paper/2102.13565/) (2021)
- [MCTensor: A High-Precision Deep Learning Library with Multi-Component Floating-Point](https://mlsanity.com/paper/2207.08867/) (2022)
- [PyGim: An Efficient Graph Neural Network Library for Real Processing-In-Memory Architectures](https://mlsanity.com/paper/2402.16731/) (2024)
- [HDReason: Algorithm-Hardware Codesign for Hyperdimensional Knowledge Graph Reasoning](https://mlsanity.com/paper/2403.05763/) (2024)
- [How Low Can We Go: Trading Memory for Error in Low-Precision Training](https://mlsanity.com/paper/2106.09686/) (2021)
- [Training with Mixed-Precision Floating-Point Assignments](https://mlsanity.com/paper/2301.13464/) (2023)
- [Perturbed Iterate SGD for Lipschitz Continuous Loss Functions with Numerical Error and Adaptive Step Sizes](https://mlsanity.com/paper/2211.04655/) (2022)
- [INT-FP-QSim: Mixed Precision and Formats For Large Language Models and Vision Transformers](https://mlsanity.com/paper/2307.03712/) (2023)
- [Trainable Fixed-Point Quantization for Deep Learning Acceleration on FPGAs](https://mlsanity.com/paper/2401.17544/) (2024)
- [pychop: Emulating Low-Precision Arithmetic in Numerical Methods and Neural Networks](https://mlsanity.com/paper/2504.07835/) (2025)
- [XBTorch: A Unified Framework for Modeling and Co-Design of Crossbar-Based Deep Learning Accelerators](https://mlsanity.com/paper/2601.07086/) (2026)
- [Development of Quantized DNN Library for Exact Hardware Emulation](https://mlsanity.com/paper/2106.08892/) (2021)
- [Dynamic Neural Network Architectural and Topological Adaptation and Related Methods -- A Survey](https://mlsanity.com/paper/2108.10066/) (2021)
- [Stochastic Rounding in Low-Precision Transformer Inference: A Variable-Precision Emulation Study of a Small GPT-2](https://mlsanity.com/paper/2610.01889/) (2026)

## Abstract (arXiv)

Low-precision training reduces computational cost and produces efficient models. Recent research in developing new low-precision training algorithms often relies on simulation to empirically evaluate the statistical effects of quantization while avoiding the substantial overhead of building specific hardware. To support this empirical research, we introduce QPyTorch, a low-precision arithmetic simulation framework. Built natively in PyTorch, QPyTorch provides a convenient interface that minimizes the efforts needed to reliably convert existing codes to study low-precision training. QPyTorch is general, and supports a variety of combinations of precisions, number formats, and rounding options. Additionally, it leverages an efficient fused-kernel approach to reduce simulator overhead, which enables simulation of large-scale, realistic problems. QPyTorch is publicly available at https://github.com/Tiiiger/QPyTorch.
