Skip to main content
QUICK REVIEW

[Paper Review] Shifted and Squeezed 8-bit Floating Point format for Low-Precision Training of Deep Neural Networks

Léopold Cambier, Anahita Bhiwandiwalla|arXiv (Cornell University)|Jan 16, 2020
Model Reduction and Neural NetworksPhysics and Astronomy24 references24 citations
TL;DR

This paper proposes Shifted and Squeezed 8-bit Floating Point (S2FP8), a novel FP8 format that enables out-of-the-box training of deep neural networks without loss scaling, stochastic rounding, or maintaining first/last layers in higher precision. By introducing learnable shift and squeeze factors to dynamically rescale tensor ranges before quantization, S2FP8 maintains FP32-level accuracy across ResNet-50, Transformer, and NCF models with no hyperparameter tuning.

ABSTRACT

Training with larger number of parameters while keeping fast iterations is an increasingly adopted strategy and trend for developing better performing Deep Neural Network (DNN) models. This necessitates increased memory footprint and computational requirements for training. Here we introduce a novel methodology for training deep neural networks using 8-bit floating point (FP8) numbers. Reduced bit precision allows for a larger effective memory and increased computational speed. We name this method Shifted and Squeezed FP8 (S2FP8). We show that, unlike previous 8-bit precision training methods, the proposed method works out-of-the-box for representative models: ResNet-50, Transformer and NCF. The method can maintain model accuracy without requiring fine-tuning loss scaling parameters or keeping certain layers in single precision. We introduce two learnable statistics of the DNN tensors - shifted and squeezed factors that are used to optimally adjust the range of the tensors in 8-bits, thus minimizing the loss in information due to quantization.

Motivation & Objective

  • To address the challenge of training deep neural networks in 8-bit precision without requiring extensive hyperparameter tuning or hardware-specific rounding techniques.
  • To eliminate the need for loss scaling, stochastic rounding, or keeping first and last layers in FP32, which are common requirements in prior 8-bit training methods.
  • To develop a hardware-friendly, generalizable 8-bit training method that maintains model accuracy across diverse architectures like ResNet-50, Transformer, and NCF.
  • To enable faster, memory-efficient training by leveraging reduced bit-width computation while preserving model performance.

Proposed method

  • Introduces a new 8-bit floating-point format, S2FP8, with 5 exponent bits and 2 mantissa bits, optimized for low-precision training.
  • Employs two learnable statistics—shift (β) and squeeze (α)—to rescale tensor ranges before quantization, minimizing information loss.
  • Applies shift and squeeze operations to the exponent and mantissa of FP32 tensors, respectively, prior to truncation into 8-bit representations.
  • Uses the shift operation via simple exponent addition/subtraction and squeeze via mantissa scaling to enable efficient hardware mapping.
  • Stores master weights and accumulations in FP32 within matrix multipliers to preserve numerical stability during training.
  • Enables end-to-end 8-bit training by dynamically adjusting tensor statistics per layer using backpropagated gradients.

Experimental results

Research questions

  • RQ1Can 8-bit floating-point training be made fully out-of-the-box without requiring loss scaling or layer-specific precision restrictions?
  • RQ2How can tensor range adaptation be achieved in 8-bit training to minimize quantization error without relying on stochastic rounding or chunked accumulation?
  • RQ3Can learnable shift and squeeze factors effectively replace manual hyperparameter tuning in low-precision training?
  • RQ4Does S2FP8 maintain FP32-level accuracy across diverse DNN architectures such as ResNet-50, Transformer, and NCF without architectural modifications?
  • RQ5How does S2FP8 compare to existing FP8 methods in terms of convergence and accuracy under identical training conditions?

Key findings

  • S2FP8 achieves FP32-level accuracy on ResNet-50 image classification without any hyperparameter tuning, outperforming FP8 with exponential loss scaling.
  • On the English-Vietnamese translation task, S2FP8 matches the FP32 BLEU score of 25.3, while FP8 with loss scaling only reaches 21.3.
  • For the NCF recommendation model, S2FP8 achieves a Hit Ratio of 0.663, closely matching the FP32 baseline of 0.666, while FP8 with RNE drops to 0.633.
  • S2FP8 eliminates the need to keep the first and last layers in FP32, unlike prior methods that require this restriction for convergence.
  • The method is robust across diverse models, including vision, NLP, and recommendation systems, demonstrating generalizability without architectural or training scheme modifications.
  • Hardware evaluation confirms minimal overhead: shift and squeeze operations are efficiently implementable using simple arithmetic on exponents and mantissas, with no performance or throughput penalty.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.