mlcommons / mlcommons/inference
Llama-3.1-8B inference time with different batch sizes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 650
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
I have run Llama-3.1-8B inference on a A100 device with fixed 1 hour run. Comparing batch size 1 and 4 shows:
b1:
INFO:Llama-8B-SUT:Samples run: 2004
INFO:Llama-8B-SUT: BatchMaker time: 1.430511474609375e-06
INFO:Llama-8B-SUT: Inference time: 1.5663466453552246
INFO:Llama-8B-SUT: Postprocess time: 3.147125244140625e-05
INFO:Llama-8B-SUT: ==== Total time: 1.5663795471191406
b4:
INFO:Llama-8B-SUT:Samples run: 7348
INFO:Llama-8B-SUT: BatchMaker time: 2.384185791015625e-06
INFO:Llama-8B-SUT: Inference time: 1.713407278060913
INFO:Llama-8B-SUT: Postprocess time: 9.489059448242188e-05
INFO:Llama-8B-SUT: ==== Total time: 1.7135045528411865
So, given a fixed time, b4 runs more samples which makes sense. However, I wonder why inference time of b4 is larger than b1. I expected to see less inference time. Any idea about that? Or I am misunderstanding something?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named in the issue. Start by locating the benchmark output for BatchMaker, Inference, and Postprocess time, then compare how batch sizes 1 and 4 are measured; done means explaining the timing difference or identifying a reproducible implementation issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100