Skip to content

Conversation

danieldk
Copy link
Member

What does this PR do?

Sync with upstream change that improves the precision of the 'global_reduce' algorithm from FP16 to FP32. This solves some reported generation quality issues.

There is a small regression in performance (Llama 3.1 8B):

Before GPTQ-Marlin fix:

| Step    | Batch Size | Average             | Lowest              | Highest             |
|---------|------------|---------------------|---------------------|---------------------|
| Prefill | 1          | 56.44 tokens/secs   | 56.09 tokens/secs   | 56.97 tokens/secs   |
|         | 2          | 110.64 tokens/secs  | 109.85 tokens/secs  | 111.07 tokens/secs  |
|         | 4          | 211.77 tokens/secs  | 209.87 tokens/secs  | 212.77 tokens/secs  |
|         | 8          | 243.95 tokens/secs  | 243.18 tokens/secs  | 244.58 tokens/secs  |
|         | 16         | 320.99 tokens/secs  | 319.94 tokens/secs  | 321.91 tokens/secs  |
|         | 32         | 370.34 tokens/secs  | 369.72 tokens/secs  | 370.91 tokens/secs  |
| Decode  | 1          | 82.48 tokens/secs   | 82.00 tokens/secs   | 82.76 tokens/secs   |
|         | 2          | 162.07 tokens/secs  | 161.52 tokens/secs  | 162.40 tokens/secs  |
|         | 4          | 318.82 tokens/secs  | 318.34 tokens/secs  | 319.60 tokens/secs  |
|         | 8          | 617.87 tokens/secs  | 616.30 tokens/secs  | 618.96 tokens/secs  |
|         | 16         | 1159.00 tokens/secs | 1155.31 tokens/secs | 1161.47 tokens/secs |
|         | 32         | 2005.69 tokens/secs | 2000.95 tokens/secs | 2010.29 tokens/secs |

After:

| Step    | Batch Size | Average             | Lowest              | Highest             |
|---------|------------|---------------------|---------------------|---------------------|
| Prefill | 1          | 55.66 tokens/secs   | 53.66 tokens/secs   | 56.63 tokens/secs   |
|         | 2          | 107.86 tokens/secs  | 105.06 tokens/secs  | 109.49 tokens/secs  |
|         | 4          | 205.86 tokens/secs  | 203.58 tokens/secs  | 207.39 tokens/secs  |
|         | 8          | 237.30 tokens/secs  | 235.50 tokens/secs  | 237.97 tokens/secs  |
|         | 16         | 314.34 tokens/secs  | 313.70 tokens/secs  | 315.10 tokens/secs  |
|         | 32         | 369.78 tokens/secs  | 369.21 tokens/secs  | 370.55 tokens/secs  |
| Decode  | 1          | 81.37 tokens/secs   | 80.71 tokens/secs   | 81.65 tokens/secs   |
|         | 2          | 160.10 tokens/secs  | 159.60 tokens/secs  | 160.53 tokens/secs  |
|         | 4          | 315.80 tokens/secs  | 315.15 tokens/secs  | 316.32 tokens/secs  |
|         | 8          | 612.87 tokens/secs  | 611.21 tokens/secs  | 614.92 tokens/secs  |
|         | 16         | 1154.18 tokens/secs | 1151.36 tokens/secs | 1157.41 tokens/secs |
|         | 32         | 1968.70 tokens/secs | 1964.30 tokens/secs | 1974.53 tokens/secs |

Upstream issue/PR:

vllm-project/vllm#6795

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Sync with upstream change that improves the precision of the
'global_reduce' algorithm from FP16 to FP32. This solves some
reported generation quality issues.

Upstream issue/PR:

vllm-project/vllm#6795
Copy link
Contributor

@Narsil Narsil left a comment

Choose a reason for hiding this comment

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

LGTM. Didn't check kernel given large modifications (most likely some autoformatter)

@danieldk
Copy link
Member Author

Closing in favor of #2320.

@danieldk danieldk closed this Jul 29, 2024
@danieldk danieldk deleted the bugfix/gptq-marlin-precision branch August 1, 2024 11:26
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