Skip to content

[PyTorch] Fine-grained recipe docs - #3336

Open
negvet wants to merge 2 commits into
NVIDIA:mainfrom
negvet:fine_grained_recipe_docs
Open

[PyTorch] Fine-grained recipe docs#3336
negvet wants to merge 2 commits into
NVIDIA:mainfrom
negvet:fine_grained_recipe_docs

Conversation

@negvet

@negvet negvet commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Fine-grained recipe documentation.
This is enabled after hybrid quantization support #2817 is merged

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Evgeny <etsykunov@nvidia.com>
@negvet
negvet requested a review from ksivaman as a code owner August 10, 2026 12:20
@negvet negvet added the documentation Improvements or additions to documentation label Aug 10, 2026
@negvet
negvet requested review from ptrendx and timmoon10 August 10, 2026 12:21
@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds comprehensive documentation for constructing fine-grained PyTorch quantization recipes and updates the runnable example to accurately describe wgrad input provenance.

  • Documents quantizer roles, per-GEMM direction mapping, hybrid quantizer provenance, high-precision directions, readiness levels, and API constraints.
  • Adds API references and experimental warnings for hybrid and identity quantization types.
  • Provides a hardware-gated training example combining MXFP8, NVFP4, and BF16 representations.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/features/low_precision_training/fine_grained_quantization/fine_grained_quantization.rst Adds the main fine-grained quantization guide, including factory contracts, direction mapping, provenance choices, and usage caveats.
docs/features/low_precision_training/fine_grained_quantization/pytorch_fine_grained_quantization_example.py Adds a runnable custom-recipe example whose updated original-BF16 wgrad description matches the configured quantizers and Linear backward path.
docs/api/pytorch.rst Adds API entries for quantizer roles and hybrid and identity quantizer tensor types.
transformer_engine/common/recipe/init.py Clarifies the CustomRecipe factory contract for optional and boundary roles.
transformer_engine/pytorch/tensor/hybrid_tensor.py Marks HybridQuantizer as experimental without changing runtime behavior.
transformer_engine/pytorch/tensor/identity_tensor.py Adds experimental-status and constructor documentation without changing runtime behavior.

Reviews (2): Last reviewed commit: "Update docs/features/low_precision_train..." | Re-trigger Greptile

@pggPL
pggPL self-requested a review August 10, 2026 12:52
…/pytorch_fine_grained_quantization_example.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Evgeny Tsykunov <e.tsykunov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant