| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This example script validates the LLaMA implementation by running inference on a couple of prompts.
This script lets you run a battery of timing tests on our LLaMa implementation. The specific test matrix is the following:
An example command to run a 70B test with expected maximum performance would be:
torchrun --nnodes=1 --nproc-per-node=8 --standalone scripts/benchmark_inference.py --architecture=llama --variant=70b --tokenizer="~/llama_weights/tokenizer.model" --distributed --compile_mode="reduce-overhead"
And to get the end to end generation numbers, you would do:
torchrun --nnodes=1 --nproc-per-node=8 --standalone scripts/benchmark_inference.py --architecture=llama --variant=70b --tokenizer="~/llama_weights/tokenizer.model" --distributed --compile_mode="reduce-overhead" --skip_eager_runs --skip_single_token_runs --skip_nokvcache_runs --skip_correctness_check
While running a single GPU 7B test would be:
CUDA_VISIBLE_DEVICES=0 python scripts/benchmark_inference.py --architecture=llama --variant=7b --tokenizer="~/llama_weights/tokenizer.model"
| Back | FazBrowse Home | New Git URL |