Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions docs/benchmark_modes/trace_replay.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This tutorial takes you through an example trace replay profile. Trace Replay be

- [MoonCake Traces](#mooncake-traces)
- [Profiling using a MoonCake Trace](#profiling-using-a-mooncake-trace)
- [Real Mooncake Trace Example](#real-mooncake-trace-example)
- [Download and Benchmark Mooncake Trace](#download-and-benchmark-mooncake-trace)

## MoonCake Traces

Expand Down Expand Up @@ -50,7 +52,29 @@ echo \
aiperf profile \
-m deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B \
--input-file example_trace.jsonl \
--custom-dataset-type mooncake_trace
--custom-dataset-type mooncake_trace \
--fixed-schedule
```

The code above will create an example trace file formatted in jsonl. AIPerf will use it to define the dataset and timing to replay the trace.
The code above will create an example trace file formatted in jsonl. AIPerf will use it to define the dataset and timing to replay the trace.

## Real Mooncake Trace Example

For real-world benchmarking, you can use the actual FAST25 production trace data from the Mooncake research paper. This trace contains realistic request patterns from production workloads.

### Download and Benchmark Mooncake Trace

```bash
# Download the Mooncake trace data
curl -o mooncake_trace.jsonl https://raw.githubusercontent.com/kvcache-ai/Mooncake/refs/heads/main/FAST25-release/arxiv-trace/mooncake_trace.jsonl

# Create a subset of the file for quick testing (skip if you want to run the full dataset)
head -n 5 mooncake_trace.jsonl > mooncake_trace_short.jsonl

# Run a small portion of the trace dataset
aiperf profile \
-m deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B \
--input-file mooncake_trace_short.jsonl \
--custom-dataset-type mooncake_trace \
--fixed-schedule
```