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

Add performace metrics into phi3 C example. #928

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

daijh
Copy link
Contributor

@daijh daijh commented Sep 26, 2024

No description provided.

@daijh
Copy link
Contributor Author

daijh commented Sep 26, 2024

This PR adds performance measurement capabilities mirroring phi3-qa.py's --timings flag [1].

[1] onnxruntime-genai/examples/python/phi3-qa.py at main · microsoft/onnxruntime-genai
https://github.com/microsoft/onnxruntime-genai/blob/main/examples/python/phi3-qa.py

@daijh
Copy link
Contributor Author

daijh commented Sep 26, 2024

The output looks like below:

Prompt length: 21, New tokens: 85, Time to first: 2.62s, Prompt tokens per second: 8.02 tps, New tokens per second: 5.09 tps

@daijh
Copy link
Contributor Author

daijh commented Sep 26, 2024

@microsoft-github-policy-service agree [company="intel"]

@daijh
Copy link
Contributor Author

daijh commented Sep 26, 2024

@microsoft-github-policy-service agree company="intel"

This PR adds performance measurement capabilities mirroring the
`--timings` flag of `phi3-qa.py`.

The output is shown below:
-------------
Prompt length: 21, New tokens: 85, Time to first: 2.62s, Prompt tokens
per second: 8.02 tps, New tokens per second: 5.09 tps
-------------

Signed-off-by: Jianhui Dai <jianhui.j.dai@intel.com>
@baijumeswani baijumeswani merged commit 7013224 into microsoft:main Sep 26, 2024
1 check passed
@baijumeswani
Copy link
Contributor

Thanks for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants