Skip to content

Granite FP8 (E4M3) model enablement [WIP] - #507

Open
rishirajgupta-2095 wants to merge 3 commits into
torch-spyre:mainfrom
rishirajgupta-2095:granite-fp8-enablement
Open

Granite FP8 (E4M3) model enablement [WIP]#507
rishirajgupta-2095 wants to merge 3 commits into
torch-spyre:mainfrom
rishirajgupta-2095:granite-fp8-enablement

Conversation

@rishirajgupta-2095

@rishirajgupta-2095 rishirajgupta-2095 commented Sep 10, 2026

Copy link
Copy Markdown

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:

base (bf16) FP8
steady-state decode 268.1 ms/token 225.4 ms/token (−16%)
load 37.8 s 62.7 s
weight HBM ~16 GB ~10.7 GB

Requirements

torch-spyre with eager FP8 ops (torch-spyre/torch-spyre#3172)

Known limitations

  • o_proj and down_proj stay 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

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>
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.

1 participant