-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for open-llama-3b-v2-f16 model through sharktank. (#272)
Progress on nod-ai/SHARK-Platform#22 This adds one test for a llama model running through https://github.com/nod-ai/sharktank. That project is still getting set up, so new docs for this particular workflow are coming in at nod-ai/SHARK-Platform#69 and tests in that repo are in nod-ai/SHARK-Platform#70. Specifically, this exercises: * [`sharktank/models/llama/llama.py`](https://github.com/nod-ai/sharktank/blob/main/sharktank/sharktank/models/llama/llama.py) * [`sharktank/examples/export_paged_llm_v1.py`](https://github.com/nod-ai/sharktank/blob/main/sharktank/sharktank/examples/export_paged_llm_v1.py) with batch sizes == [4] * The `open-llama-3b-v2-f16.gguf` file from https://huggingface.co/SlyEcho/open_llama_3b_v2_gguf * Compilation and crashless execution, _not_ numerical correctness (yet) Ideas for future work: * Test cases for the same model/parameters * Other batch sizes * `decode()` as well as `prefill()` * Real inputs with expected outputs (`decode()` crashes on some faked inputs still 🤔) * Other flag combinations and target configurations (starting simple though) * Test cases for other models/parameters * 8b / 70b parameter models * Mistral, Mixtral, Gemma, etc.
- Loading branch information
Showing
6 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
iree_tests/sharktank/llama/open-llama-3b-v2-f16/open-llama-3b-v2-f16.mlirbc
Git LFS file not shown
6 changes: 6 additions & 0 deletions
6
iree_tests/sharktank/llama/open-llama-3b-v2-f16/real_weights_prefill_data_flags.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--parameters=model=open-llama-3b-v2-f16.gguf | ||
--function=prefill_bs4 | ||
--input=4x1xi64=0 | ||
--input=4xi64=1 | ||
--input=4x1xi64=0,1,2,3 | ||
--input=1x2662400xf16 |
13 changes: 13 additions & 0 deletions
13
iree_tests/sharktank/llama/open-llama-3b-v2-f16/test_cases.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"file_format": "test_cases_v0", | ||
"test_cases": [ | ||
{ | ||
"name": "real_weights_prefill", | ||
"runtime_flagfile": "real_weights_prefill_data_flags.txt", | ||
"remote_files": [ | ||
"https://huggingface.co/SlyEcho/open_llama_3b_v2_gguf/resolve/main/open-llama-3b-v2-f16.gguf", | ||
// TODO: files for real inputs and real expected outputs | ||
] | ||
} | ||
] | ||
} |