-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Serving][Benchmark] Add benchmark code for serving #69
Conversation
Currently prompts are sampled from ShareGPT, I am thinking adding more prompt workloads. |
* support more models in finetune * modify dockerfile * fix bug caused by accelerate upgrade * add llama2 * fix error * fix error * test * fix error * support_lora_finetune * fix error * remove bin before lora test * fix * update
Added support for ipex prompt.json dataset, will continue to add
|
2baaeb2
to
d0b5659
Compare
benchmarks/benchmark_serving.py
Outdated
""" | ||
tasks: List[asyncio.Task] = [] | ||
progress_bar = tqdm(total=len(input_requests)) if progress else None | ||
async for request in get_request(input_requests, request_rate): |
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.
Maybe we need to make a deep copy of the parameter config in this loop.
benchmarks/benchmark_serving.py
Outdated
# Use sample output_len if max_new_tokens not specified | ||
if "max_new_tokens" in config: | ||
output_len = config["max_new_tokens"] | ||
else: | ||
config["max_new_tokens"] = output_len |
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.
Or make a deep copy of the config parameters here. Otherwise, when passing through line 231 for the first time, the value of config
will become {'max_new_tokens': 37}, so that the output_len will be 37 every time in the future. This is why total_time is reduced a lot
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.
good catch, pls feel free to fix this.
replaced with #163 and already merged. |
closes #68