Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MOE tests #1476

Closed
wants to merge 4 commits into from
Closed

Fix MOE tests #1476

wants to merge 4 commits into from

Conversation

ksivaman
Copy link
Member

Description

The code drop for 2.0 results in breaking certain tests in the CI. This PR fixes the MOE/permutation tests.

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

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: Kirthi Shankar Sivamani <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
@ksivaman ksivaman requested a review from timmoon10 February 11, 2025 14:38
@@ -308,6 +308,18 @@ def reshape(self, *shape: Tuple[int]) -> Float8Tensor:
# pylint: disable=missing-function-docstring
return _ReshapeFunc.apply(self, shape)

@classmethod
def to_float8(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer naming this quantize so that we can generalize to the other quantized tensor classes.

Copy link
Member Author

@ksivaman ksivaman Feb 12, 2025

Choose a reason for hiding this comment

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

This is meant as a standalone quantization for a high precision tensor and I think it would be better for this to not conflict with existing quantize function in QuantizedTensor.

Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Copy link
Member

@ptrendx ptrendx left a comment

Choose a reason for hiding this comment

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

Wait wait wait. Why are we adding the to_float8 function again? We should just fix the tests to create and use the quantizer instead.

@yaox12
Copy link
Collaborator

yaox12 commented Feb 13, 2025

I think the to_float8 issues has been fixed in #1468 using dequantize. Can you review that PR?

@ksivaman
Copy link
Member Author

@ptrendx The to_float8 function is meant purely as a utility/convenience function for one-time/throwaway quantization use cases that just creates a defaults quantizer and returns quantized tensor. Either way, closing as this change has been included in #1468

@ksivaman ksivaman closed this Feb 18, 2025
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.

4 participants