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

LLM Inputs Library - MVP #481

Merged
merged 11 commits into from
Mar 1, 2024
Merged

LLM Inputs Library - MVP #481

merged 11 commits into from
Mar 1, 2024

Conversation

nv-braf
Copy link
Contributor

@nv-braf nv-braf commented Mar 1, 2024

Adds a library with a single method create_openai_llm_inputs.

Unit testing is in place to cover private methods as well as an end-to-end test that checks both open_orca and cnn_dailymail.

if model_name:
pa_json["data"][0]["payload"][index]["model"] = model_name
if add_streaming:
pa_json["data"][0]["payload"][index]["streaming"] = "true"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I told you wrong. It is supposed to be "stream", not "streaming"
https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

src/c++/perf_analyzer/genai-pa/genaipa_exceptions.py Outdated Show resolved Hide resolved
DEFAULT_LENGTH = 100
MINIMUM_LENGTH = 1

EMPTY_JSON_IN_PA_FORMAT = {"data": [{"payload": []}]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI the payload key is only true for OpenAI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed name to reflect this

Copy link
Collaborator

@tgerdesnv tgerdesnv left a comment

Choose a reason for hiding this comment

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

This looks fine for HuggingFace->OpenAI format. There will need to be some refactoring in order to support the following:
HuggingFace->Triton_Trtllm
Synthetic->OpenAI
Synthetic->Triton_Trtllm

We probably also need Triton_vllm. I think that's 99% the same as Triton_trtllm though

Copy link
Contributor

@debermudez debermudez left a comment

Choose a reason for hiding this comment

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

Thanks for all the work here.
Think this is good to go in now.

@nv-braf nv-braf merged commit f3514e4 into feature-genai-pa Mar 1, 2024
3 checks passed
@nv-braf nv-braf deleted the llm-inputs-initial-code branch March 1, 2024 19:42
debermudez pushed a commit that referenced this pull request Mar 12, 2024
* Initial code for LLmInputs methods. All unit tests passing.

* Ensure file is deleted and general cleanup

* Adding in missing parameter descriptions

* Removing uneeded import

* Fixing precommit issues

* Fixing codeQL issue

* Fixing more codeQL issues

* Removing datasets dependency

* Changes based on Elias' review

* Fixing precommit error

* Fixing names
debermudez pushed a commit that referenced this pull request Mar 13, 2024
* Initial code for LLmInputs methods. All unit tests passing.

* Ensure file is deleted and general cleanup

* Adding in missing parameter descriptions

* Removing uneeded import

* Fixing precommit issues

* Fixing codeQL issue

* Fixing more codeQL issues

* Removing datasets dependency

* Changes based on Elias' review

* Fixing precommit error

* Fixing names
mc-nv pushed a commit that referenced this pull request Mar 13, 2024
* Initial code for LLmInputs methods. All unit tests passing.

* Ensure file is deleted and general cleanup

* Adding in missing parameter descriptions

* Removing uneeded import

* Fixing precommit issues

* Fixing codeQL issue

* Fixing more codeQL issues

* Removing datasets dependency

* Changes based on Elias' review

* Fixing precommit error

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

Successfully merging this pull request may close these issues.

3 participants