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

Make sharded Llama export test also compile to IREE module and verify numerics #237

Merged

Conversation

sogartar
Copy link
Contributor

@sogartar sogartar commented Sep 27, 2024

Verifies the IREE module numerical accuracy compared to execution with PyTorch.
The prefill step result has very low absolute accuracy of around 1e-2 for FP32.
The resulting cache state of prefill is way off.
The decode step accuracy is also completely off.

This test is market as skipped until iree-org/iree#18663 is merged. Without it the IREE compilation will crash.

@sogartar sogartar changed the title Make sharded Llama export test also compile to IREE module WIP Make sharded Llama export test also compile to IREE module Sep 27, 2024
@sogartar
Copy link
Contributor Author

sogartar commented Oct 2, 2024

This PR is waiting on iree-org/iree#18663.
@rsuderman should I mark it xfail and merge it like that. Then reenable when the fix gets merged?

@sogartar sogartar changed the title WIP Make sharded Llama export test also compile to IREE module Make sharded Llama export test also compile to IREE module and verify numerics Oct 3, 2024
@sogartar sogartar marked this pull request as ready for review October 3, 2024 15:46
Copy link
Contributor

@IanNod IanNod left a comment

Choose a reason for hiding this comment

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

Couple nit comments but looks good to me

sharktank/tests/models/llama/sharded_llama_test.py Outdated Show resolved Hide resolved
sharktank/tests/models/llama/sharded_llama_test.py Outdated Show resolved Hide resolved
@sogartar sogartar force-pushed the compile-to-iree-module-in-sharded-llama-test branch from 2bd895c to 975e46d Compare October 3, 2024 18:14
@sogartar sogartar enabled auto-merge (squash) October 3, 2024 19:59
@sogartar sogartar disabled auto-merge October 3, 2024 20:17
@sogartar sogartar enabled auto-merge (squash) October 3, 2024 20:17
@sogartar sogartar disabled auto-merge October 3, 2024 21:51
@sogartar sogartar enabled auto-merge (squash) October 3, 2024 21:54
@sogartar sogartar merged commit 8727db0 into nod-ai:main Oct 3, 2024
8 checks passed
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.

4 participants