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

Adding NXD and NKI example #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

EmilyWebber
Copy link

Issue #, if available:

No issues.

Description of changes:

This adds a new example of NXD with TinyLLama and a custom NKI kernel for tensor addition. I've confirmed the kernel for accuracy and performance.

Testing:

Please see detailed unit test requirements in the CONTRIBUTING.md

  • The change is covered by numeric check using nki.baremetal
  • The change is covered by performance benchmark test using nki.benchmark
  • The change is covered by end-to-end integration test

Pull Request Checklist

  • I have filled in all the required field in the template
  • I have tested locally that all the tests pass
  • By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.

@@ -0,0 +1,40 @@
# TinyLLama inference with NeuronX Distributed and Neuron Kernel Interface
In this example you can test [TinyLlama](https://huggingface.co/TinyLlama) from Hugging Face on AWS Trainium. This example was built on a trn1.2xlarge machine using this AMI: Deep Learning AMI Neuron (Ubuntu 22.04) 20240927.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe “instance” rather than “machine”

### Test the script
Once you've installed all the packages and downloaded your model, you should be ready to test the script. This is done with `python run_llama.py`.

This script will take at least 30 minutes to complete because it does the following: 1/ compile your model 2/ load to Neuron device 3/ test on Neuron 4/ compare accuracy 5/ run benchmark suite.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: either
“it will do the following:” or the verbs in the list become plural (compiles, loads, etc…)

@JonathanHenson JonathanHenson added the enhancement New feature or request label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants