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

[Serving][Benchmark] Add benchmark code for serving #69

Closed
wants to merge 43 commits into from

Conversation

xwu99
Copy link
Contributor

@xwu99 xwu99 commented Jan 19, 2024

closes #68

@xwu99 xwu99 marked this pull request as ready for review January 22, 2024 09:36
@xwu99
Copy link
Contributor Author

xwu99 commented Jan 22, 2024

Currently prompts are sampled from ShareGPT, I am thinking adding more prompt workloads.

zhangjian94cn pushed a commit to zhangjian94cn/llm-on-ray that referenced this pull request Feb 4, 2024
* 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
benchmarks/benchmark_serving.py Outdated Show resolved Hide resolved
benchmarks/benchmark_serving.py Outdated Show resolved Hide resolved
benchmarks/benchmark_serving.py Show resolved Hide resolved
benchmarks/benchmark_serving.py Outdated Show resolved Hide resolved
@xwu99
Copy link
Contributor Author

xwu99 commented Feb 22, 2024

Added support for ipex prompt.json dataset, will continue to add

  • first/next token latencies from client side.
  • data format: synthesis, input/output len is sampled from gaussian distribution rather than fixed.

Signed-off-by: Wu, Xiaochang <xiaochang.wu@intel.com>
Signed-off-by: Wu, Xiaochang <xiaochang.wu@intel.com>
@xwu99 xwu99 marked this pull request as draft February 26, 2024 09:19
Signed-off-by: Wu, Xiaochang <xiaochang.wu@intel.com>
Signed-off-by: Wu, Xiaochang <xiaochang.wu@intel.com>
"""
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):
Copy link
Contributor

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.

Comment on lines 227 to 231
# 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
Copy link
Contributor

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

Copy link
Contributor Author

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.

@xwu99
Copy link
Contributor Author

xwu99 commented Apr 23, 2024

replaced with #163 and already merged.

@xwu99 xwu99 closed this Apr 23, 2024
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.

[Serving][Benchmark] Add benchmark code for serving
3 participants