Skip to content

Conversation

@aryasaatvik
Copy link

Related Issue

Fixes FP8 quantization import errors with modern PyTorch versions.

Summary

This PR migrates FP8 quantization support from the deprecated float8_experimental package to the modern torchao library. The float8_experimental package has been archived and moved to torchao as of August 2024.

Changes:

  • Updated imports from float8_experimental to torchao.quantization
  • Added torchao>=0.7.0 as a development dependency
  • Updated error messages to guide users to install torchao
  • Uses the new quantize_() API with float8_dynamic_activation_float8_weight()

Why this is needed:

  • float8_experimental is no longer maintained
  • PyTorch officially moved FP8 support to torchao
  • Ensures compatibility with PyTorch >= 2.3

Checklist

  • I have read the CONTRIBUTING guidelines.
  • I have added tests to cover my changes.
  • I have updated the documentation (docs folder) accordingly.

Additional Notes

This change maintains backward compatibility while ensuring FP8 quantization works with modern PyTorch installations.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Migrates FP8 quantization from deprecated float8_experimental to torchao library in the infinity embedding engine.

  • torchao dependency in pyproject.toml should be moved from dev dependencies to main optional dependencies since it's core FP8 functionality
  • Version constraint of torchao>=0.7.0 needs stricter upper bound to ensure PyTorch 2.2.1+ compatibility
  • Missing test coverage for new FP8 quantization implementation
  • Documentation updates needed in docs folder as per unchecked items in PR checklist

2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Comment on lines 104 to 105
[tool.poetry.group.dev.dependencies]
torchao = "^0.11.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider moving torchao to main dependencies section with optional=true if it's needed for core FP8 functionality

@aryasaatvik aryasaatvik changed the title Fix: Migrate FP8 support from deprecated float8_experimental to torchao Fix: migrate FP8 support from float8_experimental to torchao Jul 10, 2025
@aryasaatvik aryasaatvik changed the title Fix: migrate FP8 support from float8_experimental to torchao fix: migrate FP8 support from float8_experimental to torchao Jul 10, 2025
opt-einsum = ["opt-einsum (>=3.3)"]
optree = ["optree (>=0.13.0)"]

[[package]]
Copy link
Owner

Choose a reason for hiding this comment

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

preferably without adding it to poetry lock

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