Added alpamayo fp8-woq torch ao example - #4731
Open
micwill755 wants to merge 2 commits into
Open
micwill755 wants to merge 2 commits into
micwill755 wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Torch-TensorRT Sphinx Gallery example for compiling the cache-independent Alpamayo 1.5 diffusion expert path with TorchAO FP8 weight-only quantization.
The example:
nvidia/Alpamayo-1.5-10Bcheckpoint.action_in_proj -> expert -> action_out_projinto an export-friendly wrapper.Float8WeightOnlyConfig, keeping activations in BF16 without calibration.torchao.dequantize_affineoperations duringtorch.exportso Torch-TensorRT can lower them to TensorRTIDequantizeLayeroperations.The complete Alpamayo rollout is intentionally not exported as one graph because Hugging Face autoregressive generation, mutable KV caches, and the Python-controlled diffusion loop are dynamic. The example documents this boundary and focuses on the static diffusion expert graph.
Documentation links were added to the TorchAO examples README, the precision and quantization guide, and the Hugging Face examples index.
Motivation
Torch-TensorRT already contains TorchAO FP8 weight-only examples for linear layers and FLUX. This adds a multimodal autonomous-driving model example and demonstrates how to isolate a compilable subgraph when the complete inference pipeline contains dynamic generation and cache mutation.
Dependencies
nvidia/Alpamayo-1.5-10BHugging Face checkpointtorchao,transformers,accelerate,einops, andhydra-corealpamayo1_5fromhttps://github.com/NVlabs/alpamayo1.5.gitNo issue is associated with this change.
Type of change
Validation
The gated 10B model example and the full unit-test suite were not executed locally.
Checklist