Skip to content

Deprecate AQT quantization in MaxText#3912

Open
sarunsingla11722 wants to merge 4 commits into
mainfrom
deprecate-aqt-phase1
Open

Deprecate AQT quantization in MaxText#3912
sarunsingla11722 wants to merge 4 commits into
mainfrom
deprecate-aqt-phase1

Conversation

@sarunsingla11722
Copy link
Copy Markdown
Collaborator

@sarunsingla11722 sarunsingla11722 commented May 14, 2026

Description

This PR implements Phase 1 of the deprecation plan for Google's Accurate Quantized Training (AQT) library in MaxText in favor of its successor, Qwix. Qwix operates natively within the JAX ecosystem using a non-intrusive Interception API, supporting both QAT and PTQ without custom layer wrappers.
To ensure a smooth transition for enterprise customers and automated training scripts, AQT remains fully functional in this release but is explicitly marked as deprecated across core logic, configuration, and documentation. Full removal will occur in a future major release (Phase 2).

FIXES:b/512240084

Key Changes

  • Core Logic (quantizations.py): Added max_logging runtime warning alerting users that AQT is deprecated and advising migration to Qwix (use_qwix_quantization=True).
  • Configuration (base.yml): Updated inline documentation for use_qwix_quantization to mark the legacy AQT default as deprecated.
  • Documentation (quantization.md, supported_models_and_architectures.md): Added prominent deprecation callout banners and updated feature lists to recommend Qwix.

Tests

Verification & Testing

  • Unit Tests: Verified existing quantization unit tests pass and QuantizationTest.test_aqt_quantization successfully emits the deprecation warning.
  • Smoke Tests: Confirmed end-to-end INT8 training completes successfully under legacy AQT defaults while logging the deprecation warning.

If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/123456
FIXES: #123456

Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.

Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.

Tests

Please describe how you tested this change, and include any instructions and/or
commands to reproduce.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

Comment thread src/maxtext/layers/quantizations.py Outdated
return TransformerEngineQuantization(config)
quant_mode = get_quant_mode(quant_mode_str)
replicate_scale = config.replicate_quant_scale if config.replicate_quant_scale else False
max_logging.log("WARNING: AQT quantization is deprecated and will be removed in a future release. Please migrate to Qwix by setting use_qwix_quantization=True.")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potentially this should go in types.py instead but prolly fine here

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants