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

Benchmarks - Add LLaMA-2 Models #668

Merged
merged 30 commits into from
Nov 28, 2024
Merged

Benchmarks - Add LLaMA-2 Models #668

merged 30 commits into from
Nov 28, 2024

Conversation

dpower4
Copy link
Contributor

@dpower4 dpower4 commented Nov 19, 2024

Added llama benchmark - training and inference in accordance with the existing pytorch models implementation like gpt2, lstm etc.

  • added llama fp8 unit test for better code coverage, to reduce memory required
  • updated transformers version >= 4.28.0 for LLamaConfig
  • set tokenizers version <= 0.20.3 to avoid 0.20.4 version issues with py3.8
  • added llama2 to tensorrt
  • llama2 tests not added to test_tensorrt_inference_performance.py due to large memory requirement for worker gpu. tests validated separately on gh200

@dpower4 dpower4 requested review from cp5555 and a team as code owners November 19, 2024 02:53
Copy link
Member

@abuccts abuccts left a comment

Choose a reason for hiding this comment

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

pls use python3 setup.py lint to check the format and run python3 setup.py format to format and code

@abuccts abuccts changed the title Feat/llama2 Benchmarks - Add LLaMA-2 Models Nov 19, 2024
@dpower4
Copy link
Contributor Author

dpower4 commented Nov 19, 2024

@abuccts can I get access to the unit test logs.

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 87.70492% with 15 lines in your changes missing coverage. Please review.

Project coverage is 85.61%. Comparing base (4e6935a) to head (1570707).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...bench/benchmarks/model_benchmarks/pytorch_llama.py 87.17% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #668      +/-   ##
==========================================
+ Coverage   85.58%   85.61%   +0.03%     
==========================================
  Files          98       99       +1     
  Lines        7046     7165     +119     
==========================================
+ Hits         6030     6134     +104     
- Misses       1016     1031      +15     
Flag Coverage Δ
cpu-python3.10-unit-test 71.21% <35.53%> (-0.64%) ⬇️
cpu-python3.7-unit-test 71.18% <36.06%> (-0.63%) ⬇️
cpu-python3.8-unit-test 71.22% <36.13%> (-0.62%) ⬇️
cuda-unit-test 83.42% <85.95%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guoshzhao
Copy link
Contributor

LGTM, thanks! Please fix the UT failures with Python 1.10. And since the CUDA tests are running on K80 which is very old GPU, we can skip the "cuda-init-test", and just make sure "cpu-unit-test" can pass.

/__w/1/s/.eggs/setuptools_scm-8.1.0-py3.10.egg/setuptools_scm/_integration/setuptools.py:92: UserWarning: version of superbench already set
  warnings.warn(f"version of {dist_name} already set")
running lint
tests/analyzer/test_summaryop.py:7: error: Module "numpy" has no attribute "NaN"  [attr-defined]

@dpower4 dpower4 added benchmarks SuperBench Benchmarks micro-benchmarks Micro Benchmark Test for SuperBench Benchmarks labels Nov 22, 2024
@dpower4
Copy link
Contributor Author

dpower4 commented Nov 22, 2024

pytorch-llama validation on gh200.
Screenshot 2024-11-21 at 6 55 33 PM
Screenshot 2024-11-21 at 6 53 56 PM

@dpower4 dpower4 added the model-benchmarks Model Benchmark Test for SuperBench Benchmarks label Nov 25, 2024
@dpower4
Copy link
Contributor Author

dpower4 commented Nov 27, 2024

tokenizers Rust:cargo issue: huggingface/tokenizers#1691

setup.py Outdated Show resolved Hide resolved
superbench/benchmarks/base.py Outdated Show resolved Hide resolved
@abuccts abuccts enabled auto-merge (squash) November 28, 2024 00:56
@abuccts abuccts merged commit 249e21c into microsoft:main Nov 28, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmarks SuperBench Benchmarks micro-benchmarks Micro Benchmark Test for SuperBench Benchmarks model-benchmarks Model Benchmark Test for SuperBench Benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants