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

[Feature Branch][LLM Testing] Create GroundTruthSource objects #1219

Conversation

dbogunowicz
Copy link
Contributor

@dbogunowicz dbogunowicz commented Aug 30, 2023

Create two objects that facilitate the generation of the ground truth data (coming from ORT and Torch models) for LLM testing.

tests/conftest.py Outdated Show resolved Hide resolved
Comment on lines 68 to 75
assert numpy.allclose(
torch_target_prompt_logits, ort_target_prompt_logits, atol=1e-4
)
# check that the prompt cache is the same
for torch_cache, ort_cache in zip(
torch_target_prompt_cache, ort_target_prompt_cache
):
assert numpy.allclose(torch_cache, ort_cache, atol=1e-5)
Copy link
Member

Choose a reason for hiding this comment

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

could be useful to add in this functionality as helper to the GTS objects

from sparsezoo import Model


class GroundTruthSource(ABC):
Copy link
Member

Choose a reason for hiding this comment

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

let's rename to Source or GenerationSource? we use this for all scenarios, not just ground truth right?

dbogunowicz and others added 2 commits September 7, 2023 11:03
* Update README.md

* Update src/deepsparse/yolov8/README.md

* Update text_generation.py

* quality

* readability

* all tests passing

* added some full kv cache tests

* initial commit

* ready for review

* Delete tests/deepsparse/transformers/pipelines/proposal_text_generation_tests.md
…re_branch' into feature/damian/testing_sources_truth
@dbogunowicz dbogunowicz merged commit 0477551 into feature/damian/llm_testing_feature_branch Sep 7, 2023
@dbogunowicz dbogunowicz deleted the feature/damian/testing_sources_truth branch September 7, 2023 09:07
dbogunowicz added a commit that referenced this pull request Sep 13, 2023
* initial commit

* initial commit

* [Feature Branch][LLM Testing] Create GroundTruthSource objects (#1219)

* initial commit

* finish creation of helper objects

* Update tests/conftest.py

* small refactor

* [Feature Branch][LLM Testing] LLM Testing Suite (#1227)

* Update README.md

* Update src/deepsparse/yolov8/README.md

* Update text_generation.py

* quality

* readability

* all tests passing

* added some full kv cache tests

* initial commit

* ready for review

* Delete tests/deepsparse/transformers/pipelines/proposal_text_generation_tests.md

* fix tests

* Dipika's comments plus adjusting the script to renamed variables

* remove ORT ground truth

* add OPT tests

* rebase and disable tests in GHA

* quality
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.

None yet

2 participants