This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Add rowwise scaling to Float8Inference module #305
Open
drisspg
wants to merge
4
commits into
gh/drisspg/4/base
Choose a base branch
from
gh/drisspg/4/head
base: gh/drisspg/4/base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Jul 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ce3baaf - Browse repository at this point
Copy the full SHA ce3baafView commit details -
Update on "Add rowwwise scaling to Float8Inference module"
[ghstack-poisoned]
Configuration menu - View commit details
-
Copy full SHA for 39e0ad1 - Browse repository at this point
Copy the full SHA 39e0ad1View commit details
Commits on Jul 4, 2024
-
Update on "Add rowwise scaling to Float8Inference module"
# Summary # Performance - Need to investigate the Rowwise dynamic case, I would think this should be faster than TensorWise dynamic ```Shell Benchmark Results: +--------------------------+-------------+ | Variant | Time (μs) | +==========================+=============+ | BF16 | 2540.56 | +--------------------------+-------------+ | FP8 Dynamic | 1512.96 | +--------------------------+-------------+ | FP8 Static | 1363.75 | +--------------------------+-------------+ | FP8 Weight Only | 2774.22 | +--------------------------+-------------+ | FP8 Dynamic AxisWise | 1510.82 | +--------------------------+-------------+ | FP8 Static AxisWise | 1438.92 | +--------------------------+-------------+ | FP8 Weight Only AxisWise | 2762.88 | +--------------------------+-------------+ Comparison Results: +--------------------------+-------------+-------------------+---------------+ | Variant | Time (μs) | Speedup vs BF16 | MAE vs BF16 | +==========================+=============+===================+===============+ | BF16 | 2540.56 | 1.00x | 0 | +--------------------------+-------------+-------------------+---------------+ | FP8 Dynamic | 1512.96 | 1.68x | 0.00543213 | +--------------------------+-------------+-------------------+---------------+ | FP8 Static | 1363.75 | 1.86x | 0.00546265 | +--------------------------+-------------+-------------------+---------------+ | FP8 Weight Only | 2774.22 | 0.92x | 0.00379944 | +--------------------------+-------------+-------------------+---------------+ | FP8 Dynamic AxisWise | 1510.82 | 1.68x | 0.00543213 | +--------------------------+-------------+-------------------+---------------+ | FP8 Static AxisWise | 1438.92 | 1.77x | 0.00546265 | +--------------------------+-------------+-------------------+---------------+ | FP8 Weight Only AxisWise | 2762.88 | 0.92x | 0.00379944 | +--------------------------+-------------+-------------------+---------------+ ``` ### Numerics Using this pytorch/ao#446 TensorWise Dynamic scaling: ``` Shell +------------+--------------------------------------------+ | Task | Metrics | +============+============================================+ | winogrande | +-----------------+----------+ | | | | acc,none | 0.735596 | | | | +-----------------+----------+ | | | | acc_stderr,none | 0.012395 | | | | +-----------------+----------+ | +------------+--------------------------------------------+ | wikitext | +-----------------------------+----------+ | | | | bits_per_byte,none | 0.538637 | | | | +-----------------------------+----------+ | | | | bits_per_byte_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | byte_perplexity,none | 1.452600 | | | | +-----------------------------+----------+ | | | | byte_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | word_perplexity,none | 7.363215 | | | | +-----------------------------+----------+ | | | | word_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | +------------+--------------------------------------------+ ``` AxisWise Dynamic Scaling ``` Shell +------------+--------------------------------------------+ | Task | Metrics | +============+============================================+ | winogrande | +-----------------+----------+ | | | | acc,none | 0.735596 | | | | +-----------------+----------+ | | | | acc_stderr,none | 0.012395 | | | | +-----------------+----------+ | +------------+--------------------------------------------+ | wikitext | +-----------------------------+----------+ | | | | bits_per_byte,none | 0.538637 | | | | +-----------------------------+----------+ | | | | bits_per_byte_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | byte_perplexity,none | 1.452600 | | | | +-----------------------------+----------+ | | | | byte_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | word_perplexity,none | 7.363215 | | | | +-----------------------------+----------+ | | | | word_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | +------------+--------------------------------------------+ ``` [ghstack-poisoned]
Configuration menu - View commit details
-
Copy full SHA for 0ec7ada - Browse repository at this point
Copy the full SHA 0ec7adaView commit details
Commits on Jul 17, 2024
-
Update on "Add rowwise scaling to Float8Inference module"
# Summary # Performance - Need to investigate the Rowwise dynamic case, I would think this should be faster than TensorWise dynamic ```Shell Benchmark Results: +--------------------------+-------------+ | Variant | Time (μs) | +==========================+=============+ | BF16 | 2540.56 | +--------------------------+-------------+ | FP8 Dynamic | 1512.96 | +--------------------------+-------------+ | FP8 Static | 1363.75 | +--------------------------+-------------+ | FP8 Weight Only | 2774.22 | +--------------------------+-------------+ | FP8 Dynamic AxisWise | 1510.82 | +--------------------------+-------------+ | FP8 Static AxisWise | 1438.92 | +--------------------------+-------------+ | FP8 Weight Only AxisWise | 2762.88 | +--------------------------+-------------+ Comparison Results: +--------------------------+-------------+-------------------+---------------+ | Variant | Time (μs) | Speedup vs BF16 | MAE vs BF16 | +==========================+=============+===================+===============+ | BF16 | 2540.56 | 1.00x | 0 | +--------------------------+-------------+-------------------+---------------+ | FP8 Dynamic | 1512.96 | 1.68x | 0.00543213 | +--------------------------+-------------+-------------------+---------------+ | FP8 Static | 1363.75 | 1.86x | 0.00546265 | +--------------------------+-------------+-------------------+---------------+ | FP8 Weight Only | 2774.22 | 0.92x | 0.00379944 | +--------------------------+-------------+-------------------+---------------+ | FP8 Dynamic AxisWise | 1510.82 | 1.68x | 0.00543213 | +--------------------------+-------------+-------------------+---------------+ | FP8 Static AxisWise | 1438.92 | 1.77x | 0.00546265 | +--------------------------+-------------+-------------------+---------------+ | FP8 Weight Only AxisWise | 2762.88 | 0.92x | 0.00379944 | +--------------------------+-------------+-------------------+---------------+ ``` ### Numerics Using this pytorch/ao#446 TensorWise Dynamic scaling: ``` Shell +------------+--------------------------------------------+ | Task | Metrics | +============+============================================+ | winogrande | +-----------------+----------+ | | | | acc,none | 0.735596 | | | | +-----------------+----------+ | | | | acc_stderr,none | 0.012395 | | | | +-----------------+----------+ | +------------+--------------------------------------------+ | wikitext | +-----------------------------+----------+ | | | | bits_per_byte,none | 0.538637 | | | | +-----------------------------+----------+ | | | | bits_per_byte_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | byte_perplexity,none | 1.452600 | | | | +-----------------------------+----------+ | | | | byte_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | word_perplexity,none | 7.363215 | | | | +-----------------------------+----------+ | | | | word_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | +------------+--------------------------------------------+ ``` AxisWise Dynamic Scaling ``` Shell +------------+--------------------------------------------+ | Task | Metrics | +============+============================================+ | winogrande | +-----------------+----------+ | | | | acc,none | 0.735596 | | | | +-----------------+----------+ | | | | acc_stderr,none | 0.012395 | | | | +-----------------+----------+ | +------------+--------------------------------------------+ | wikitext | +-----------------------------+----------+ | | | | bits_per_byte,none | 0.538637 | | | | +-----------------------------+----------+ | | | | bits_per_byte_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | byte_perplexity,none | 1.452600 | | | | +-----------------------------+----------+ | | | | byte_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | | | | word_perplexity,none | 7.363215 | | | | +-----------------------------+----------+ | | | | word_perplexity_stderr,none | N/A | | | | +-----------------------------+----------+ | +------------+--------------------------------------------+ ``` [ghstack-poisoned]
Configuration menu - View commit details
-
Copy full SHA for aced22f - Browse repository at this point
Copy the full SHA aced22fView commit details
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.