|
--- |
|
task_categories: |
|
- question-answering |
|
- text-generation |
|
language: |
|
- en |
|
size_categories: |
|
- 1K<n<10K |
|
configs: |
|
- config_name: default |
|
data_files: |
|
- split: 1k |
|
path: "dynamic_sonnet_llama_2_prefix_256_max_1024_1024_sampled.parquet" |
|
- split: 2k |
|
path: "dynamic_sonnet_llama_2_prefix_512_max_2048_1024_sampled.parquet" |
|
- split: 4k |
|
path: "dynamic_sonnet_llama_2_prefix_1024_max_4096_1024_sampled.parquet" |
|
- split: 8k |
|
path: "dynamic_sonnet_llama_2_prefix_2048_max_8192_1024_sampled.parquet" |
|
--- |
|
|
|
# Dynamic Sonnet - Llama2 |
|
*Curated dataset for benchmarking LLM serving systems* |
|
|
|
![plot](distribution.png) |
|
|
|
In real-world service scenarios, each request comes with varying input token lengths. |
|
Some requests generate only a few tokens, while others produce a significant number. |
|
Traditional fixed-length benchmarks fail to capture this variability, making it difficult to accurately assess real-world throughput performance. |
|
This dynamic nature of input token lengths is crucial as it directly affects key features of LLM serving systems, such as continuous batching, which are essential for optimal performance. |
|
|
|
To address this challenge, we introduce ***Dynamic Sonnet***—a dataset designed specifically for benchmarking LLM serving systems under realistic conditions. |
|
***Dynamic Sonnet*** comprises four subsets: 1k, 2k, 4k, and 8k. Each subset is carefully curated to have an average token length of 512, 1k, 3k, and 7k, respectively. |
|
This variability in token length within the dataset allows for a more accurate and comprehensive evaluation of LLM serving systems in environments that mirror real-world usage. |
|
|
|
Furthermore, in real-world scenarios, requests often share common prefixes. Advanced systems can leverage this by caching these prefixes to boost performance. |
|
***Dynamic Sonnet*** simulates this behavior by incorporating a common prefix that constitutes approximately 25% of the maximum length in each subset (N/4 for an Nk subset). |
|
This design allows for more realistic benchmarking of systems that optimize for such efficiencies. |
|
|
|
## Details |
|
|
|
The Dynamic Sonnet dataset consists of five columns: `id`, `system_prompt`, `user_prompt`, `formatted_input` and `tok_inputs` |
|
|
|
* `id`: A unique identifier (index) for each prompt |
|
* `system_prompt`: A common prefix that instructs the agent to select specific lines from the following text |
|
* `user_prompt`: The lines selected from Shakespeare's sonnets |
|
* `formatted_input`: The prompt(`system_prompt`+`user_prompt`) formatted according to a specific chat template |
|
* `tok_inputs`: The tokenized version of the `formatted_input` |
|
|
|
## Usage |
|
|
|
To benchmark with ***Dynamic Sonnet***, users can pass the token IDs (tok_inputs) directly to the LLM serving system. |
|
For benchmarking an OpenAI-compatible system, users can concatenate the `system_prompt` and `user_prompt`, and then send a request to `v1/chat/completions` endpoint, using the concatenated result as the request body. |
|
|