-
Notifications
You must be signed in to change notification settings - Fork 234
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
LlmInputs - Add ability to synthetically generate inputs #506
Conversation
src/c++/perf_analyzer/genai-pa/genai_pa/llm_inputs/synthetic_prompt_generator.py
Fixed
Show fixed
Hide fixed
src/c++/perf_analyzer/genai-pa/genai_pa/llm_inputs/llm_inputs.py
Outdated
Show resolved
Hide resolved
src/c++/perf_analyzer/genai-pa/genai_pa/llm_inputs/llm_inputs.py
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,104 @@ | |||
The period for a new election of a citizen to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High level, this all looks great, thanks @nv-braf.
import random | ||
from typing import List, Tuple | ||
|
||
from transformers import LlamaTokenizerFast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, we will add the ability to use a tokenizer from the cli but for now, we are using gpt2 in the metrics.
Can we update this one to use gpt2 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also okay with this being a TODO for now
* First cut of synthetic prompt generation class * Enabled synthetic prompt generation w/ unit testing to all endpoints. * Creating a new text input for synthetic generation * Fixes based on Tim's comments * Adding GPT2 todo
* First cut of synthetic prompt generation class * Enabled synthetic prompt generation w/ unit testing to all endpoints. * Creating a new text input for synthetic generation * Fixes based on Tim's comments * Adding GPT2 todo
* First cut of synthetic prompt generation class * Enabled synthetic prompt generation w/ unit testing to all endpoints. * Creating a new text input for synthetic generation * Fixes based on Tim's comments * Adding GPT2 todo
New class to synthetically generate an input json. Have unit tests covering the new library as well as end-to-end testing to cover synthetic -> vlmm, trtllm, and both openai endpoints.