Skip to content

v0.18.0

Latest

Choose a tag to compare

@vkuzo vkuzo released this 03 Aug 20:44
· 17 commits to main since this release

Highlights

NVFP4 training

NVFP4 for dense linears is now supported for training (prototype), implementing the recipe from Pretraining Large Language Models with NVFP4. This is a prototype feature and the API may change without notice. Hardening, MoE support, and torchtitan integration are planned.

Example usage:

import torch
from torchao.quantization import quantize_
from torchao.prototype.moe_training.nvfp4_training.nvfp4_training import (
    NVFP4TrainingConfig,
)

# Blackwell (SM100+); bfloat16 model with Linear dims divisible by 128
model = model.cuda().bfloat16()

# Replace nn.Linear with NVFP4Linear
quantize_(model, NVFP4TrainingConfig())

# Train as usual
out = model(x)
out.sum().backward()
  • [nvfp4_training] Support NVFP4 linear training on Blackwell by @rdspring1 in #4369
  • [nvfp4_training] Add Triton kernel for global amax of columnwise RHT (SM90+) by @rdspring1 in #4247

BC-Breaking / Deprecations

Minimum PyTorch version is now 2.11

Support for PyTorch older than 2.11 has been dropped from the code, and CI has moved to newer PyTorch versions.

  • drop PyTorch 2.7 and older support from the code by @vkuzo in #4395
  • drop PyTorch<2.8 support from the code by @vkuzo in #4398
  • drop PyTorch<2.9 support by @vkuzo in #4399
  • drop PyTorch <2.10 support by @vkuzo in #4400
  • drop PyTorch <2.11 support by @vkuzo in #4401
  • switch CI to PyTorch 2.12 by @vkuzo in #4402
  • Pin CI to PyTorch 2.13 for release; drop unused torchaudio by @vkuzo in #4638

Removed: v1 tensor-subclass / layout system

The deprecated v1 AffineQuantizedTensor stack and layout system have been fully removed, completing the migration to v2 tensor subclasses.

  • Delete AffineQuantizedTensor, AQTTensorImpl, and Layout by @andrewor14 in #4245
  • Delete deprecated TensorCoreTiledLayout and related code by @jerryzh168 in #4153
  • Delete deprecated PlainLayout, PlainAQTTensorImpl and related v1 code paths by @jerryzh168 in #4151
  • Remove LinearActivationQuantizedTensor and all related code by @jerryzh168 in #4258
  • Remove LinearActivationWeightObservedTensor and insert_observers_ by @jerryzh168 in #4261
  • Remove WeightTensorWithLinearActivationScaleMetadata and related code by @jerryzh168 in #4262
  • Remove WeightTensorWithLinearActivationQuantizationMetadata by @jerryzh168 in #4263
  • Remove unified.py (Quantizer and TwoStepQuantizer ABCs) by @jerryzh168 in #4264
  • Remove MSLK FP8 tensorwise support by @cthi in #4461
  • Remove check_cpu_version and check_xpu_version helpers by @Xia-Weiwen in #4211

Renamed / moved APIs

  • [CPU] Rename Int4WeightOnlyOpaqueTensorConfig to PrototypeInt4WeightOnlyConfig by @Xia-Weiwen in #4205
  • Rename Sparse2x4CUTLASSFloat8Tensor to Float8Sparse2x4_2DData2DMetadataTensor (#4343) by @bbeckca in #4343
  • Move NF4Tensor to quantization.quantize_.workflows by @andrewor14 in #4256

Behavior changes

  • Use fixed scale for Float8 softmax quantization instead of observer by @jerryzh168 in #4260

Training / QAT

mxfp8

float8

nvfp4

QAT

  • fix: use Int4WeightOnlyConfig.group_size in fake quant configs by @oriollinan in #4518
  • Fix Int4WeightFakeQuantizer and Float8FakeQuantizer missing enabled attribute by @javierdejesusda in #4336

other

Inference

Docs

Devs

No-GIL support

Other

New Contributors

Full Changelog: v0.17.0...v0.18.0-rc1