Granite FP8 (E4M3) model enablement [WIP] - #507
Open
rishirajgupta-2095 wants to merge 3 commits into
Open
Conversation
Signed-off-by: rishi raj gupta <rishi.raj.gupta@ibm.com>
Signed-off-by: rishi raj gupta <rishi.raj.gupta@ibm.com>
Signed-off-by: rishi raj gupta <rishi.raj.gupta@ibm.com>
rishirajgupta-2095
requested review from
BenjSz,
Mohini-Shrivastava,
arielge and
kiszk
as code owners
September 10, 2026 13:21
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.
Runs compressed-tensors FP8 (E4M3) Granite checkpoints in FP8 on Spyre via
spyre.scaled_mm, instead of dequantizing them to 16-bit at load.Model: ibm-granite/granite-3.3-8b-instruct-FP8
(baseline: ibm-granite/granite-3.3-8b-instruct)
Related: torch-spyre/torch-spyre#4432
Initial Results
Granite 3.3 8B on current main, prefill S=512, 200 of 280 projections in FP8:
Requirements
torch-spyre with eager FP8 ops (torch-spyre/torch-spyre#3172)
Known limitations
o_projanddown_projstay fp16 pending torch-spyre FP8 codegen fixes.RMSNorms feeding FP8 projections use an fp16 variance reduction on Spyre:
stock RMSNorm's fp32->fp16 cast leaves torch-spyre no feasible layout for the
FP8
scaled_mm. Bound per instance, FP8 checkpoints only; TODO to drop.Testing
pytest -s -vvv tests/spyre/test_e2e_smoke_spyre.py
--model-path ibm-granite/granite-3.3-8b-instruct-FP8
pytest -s -vvv tests/spyre/test_e2e_smoke_spyre.py
--model-path ibm-granite/granite-3.3-8b-instruct
PYTHONPATH=. python scripts/run_fp8_granite_spyre.py