Skip to content

Conversation

@Fridah-nv
Copy link
Contributor

What does this PR do?

Type of change: ?

Overview: ?

Usage

# Add a code snippet demonstrating how to use this

Testing

Before your PR is "Ready for review"

  • Make sure you read and follow Contributor guidelines and your commits are signed.
  • Is this change backward compatible?: Yes/No
  • Did you write any new necessary tests?: Yes/No
  • Did you add or update any necessary documentation?: Yes/No
  • Did you update Changelog?: Yes/No

Additional Information

@Fridah-nv Fridah-nv requested a review from a team as a code owner January 9, 2026 22:45
@Fridah-nv Fridah-nv requested review from jingyu-ml and removed request for a team January 9, 2026 22:45
@Fridah-nv Fridah-nv marked this pull request as draft January 9, 2026 22:45
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 9, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

for step, multiplier in enumerate(multipliers):
candidate_amax = self._initial_amax * multiplier
for step, candidate in enumerate(candidates):
if self._fp8_scale_sweep:
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!!

Comment on lines 149 to 152
# For FP8 scale sweep, use FP8 values as multipliers of initial_amax
# This ensures we search in a reasonable range relative to max calibration
multiplier = candidate
candidate_amax = self._initial_amax * multiplier
Copy link
Contributor

@realAsma realAsma Jan 9, 2026

Choose a reason for hiding this comment

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

is not in this case candidate_amax = (fp8_by_448 * 6.0)?

Suggested change
# For FP8 scale sweep, use FP8 values as multipliers of initial_amax
# This ensures we search in a reasonable range relative to max calibration
multiplier = candidate
candidate_amax = self._initial_amax * multiplier
candidate_amax = (candidate * global_amax).view_as(self._initial_amax)

Copy link
Contributor

Choose a reason for hiding this comment

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

why?

fp8_scale =  FP8(block_eqv_amax / 6.0  * (448/(global_amax/6.0))
so if we reverse calculate block_eqv_amax_from_fp8, we get:
block_eqv_amax = (fp8_scale / 448.0) * global_amax

candidate_amax = candidate * global_amax

Signed-off-by: Fridah-nv <[email protected]>
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.

3 participants