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

Restore PTQ tests for Llama2 #9018

Closed
wants to merge 8 commits into from
Closed

Restore PTQ tests for Llama2 #9018

wants to merge 8 commits into from

Conversation

janekl
Copy link
Collaborator

@janekl janekl commented Apr 23, 2024

What does this PR do ?

Restoring PTQ tests for Llama2 model. The tests are moved here from recently disabled Jenkinsfile.

Testing all methods: FP8, INT8 SQ, INT4 AWQ and special case of NULL (just weights export step).

Collection: NLP

Changelog

  • Setting up data and models
  • Testing PTQ script (four variants)

Usage

If you want to reproduce tests locally, scripts included in tests.setup module along with convert_llama_hf_to_nemo.py can be used to create tiny test model and data with the following steps (set TEST_DATA variable accordingly):

python tests/setup/data/create_sample_jsonl.py \
  --output_file ${TEST_DATA}/test_quantization/test.json

python tests/setup/models/create_hf_model.py \
  --model_name_or_path meta-llama/Llama-2-7b \
  --output_dir ${TEST_DATA}/llama-ci-hf-tiny \
  --config_updates '{"hidden_size": 256, "num_attention_heads": 4, "num_hidden_layers": 2, "num_key_value_heads": 4}'

python scripts/checkpoint_converters/convert_llama_hf_to_nemo.py \
  --input_name_or_path ${TEST_DATA}/llama-ci-hf-tiny \
  --output_path ${TEST_DATA}/llama_ci.nemo

Jenkins CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

There's no need to comment jenkins on the PR to trigger Jenkins CI.
The GitHub Actions CI will run automatically when the PR is opened.
To run CI on an untrusted fork, a NeMo user with write access must click "Approve and run".

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

@github-actions github-actions bot added the CI label Apr 23, 2024
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
…e created

Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
@janekl
Copy link
Collaborator Author

janekl commented May 6, 2024

Closing: tests were added in #9064

@janekl janekl closed this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants