Datasets:
Add dataset README and analysis plots
Browse files- README.md +175 -0
- plots/isl_hist_linear.png +3 -0
- plots/isl_hist_log.png +3 -0
- plots/kv_cached_tokens_vs_isl.png +3 -0
- plots/kv_hit_rate_prefix_hist.png +3 -0
- plots/kv_hit_rate_vs_turn.png +3 -0
- plots/kv_miss_rate_prefix_hist.png +3 -0
- plots/kv_new_tokens_hist.png +3 -0
- plots/osl_hist_linear.png +3 -0
- plots/osl_hist_log.png +3 -0
- plots/think_time_hist_linear.png +3 -0
- plots/think_time_hist_log.png +3 -0
- plots/think_time_pos_log.png +3 -0
README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pretty_name: CC Traces — Weka (April 2026)
|
| 4 |
+
task_categories:
|
| 5 |
+
- text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- llm
|
| 8 |
+
- inference
|
| 9 |
+
- benchmarking
|
| 10 |
+
- kv-cache
|
| 11 |
+
- agentic
|
| 12 |
+
- multi-turn
|
| 13 |
+
- claude
|
| 14 |
+
size_categories:
|
| 15 |
+
- n<1K
|
| 16 |
+
configs:
|
| 17 |
+
- config_name: default
|
| 18 |
+
data_files:
|
| 19 |
+
- split: train
|
| 20 |
+
path: traces.jsonl
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# CC Traces — Weka (April 2026)
|
| 24 |
+
|
| 25 |
+
A collection of **739 multi-turn agentic traces** (≈ 59.3k individual model
|
| 26 |
+
requests) driven by `claude-opus-4-5-20251101`. Each trace captures the full
|
| 27 |
+
request/response sequence of a single agent session, including per-request KV
|
| 28 |
+
block hashes, so the dataset can be replayed against an inference engine or
|
| 29 |
+
used to simulate prefix-cache behavior offline.
|
| 30 |
+
|
| 31 |
+
- **Traces:** 739
|
| 32 |
+
- **Requests:** 59,274 total, mean **80.2** per trace, max **1,178**
|
| 33 |
+
- **Model:** `claude-opus-4-5-20251101`
|
| 34 |
+
- **KV block size:** 64 tokens
|
| 35 |
+
- **Hash scope:** `local` — block hash IDs are only comparable *within* a
|
| 36 |
+
single trace; they are not a global content-addressable identity.
|
| 37 |
+
|
| 38 |
+
## What's in each trace
|
| 39 |
+
|
| 40 |
+
Top-level trace fields:
|
| 41 |
+
|
| 42 |
+
| field | type | description |
|
| 43 |
+
|-----------------|------------------|-----------------------------------------------------|
|
| 44 |
+
| `id` | str | Trace identifier, e.g. `trace_0001` |
|
| 45 |
+
| `models` | list[str] | Models used by the trace (all one entry here) |
|
| 46 |
+
| `block_size` | int | KV block size used to derive `hash_ids` (64) |
|
| 47 |
+
| `hash_id_scope` | str | `local` — hash IDs are per-trace, not global |
|
| 48 |
+
| `tool_tokens` | int | Size of the tool-definition block for the session |
|
| 49 |
+
| `system_tokens` | int | Size of the system prompt for the session |
|
| 50 |
+
| `requests` | list[object] | Ordered list of per-request records |
|
| 51 |
+
|
| 52 |
+
Each entry in `requests` is:
|
| 53 |
+
|
| 54 |
+
| field | type | description |
|
| 55 |
+
|----------------|-------------|----------------------------------------------------------------|
|
| 56 |
+
| `t` | float | Seconds since start of trace |
|
| 57 |
+
| `type` | str | Request type marker (e.g. `n`) |
|
| 58 |
+
| `model` | str | Target model for this request |
|
| 59 |
+
| `in` | int | Input tokens (ISL) |
|
| 60 |
+
| `out` | int | Output tokens (OSL) |
|
| 61 |
+
| `hash_ids` | list[int] | Block-hash IDs for the input, one per 64-token block |
|
| 62 |
+
| `input_types` | list[str] | Content kinds in the input (`text`, `tool_result`, …) |
|
| 63 |
+
| `output_types` | list[str] | Content kinds in the output (`text`, `thinking`, `tool_use`, …) |
|
| 64 |
+
| `stop` | str | Stop reason (`tool_use`, `end_turn`, …) |
|
| 65 |
+
| `api_time` | float | End-to-end server time for this call (seconds) |
|
| 66 |
+
| `think_time` | float | Client think/tool time between this request and the next (s) |
|
| 67 |
+
|
| 68 |
+
`hash_ids` make the dataset unusually useful for KV-cache work: the
|
| 69 |
+
contiguous common prefix between turn *t* and turn *t − 1* exactly measures
|
| 70 |
+
the portion of the input that a local prefix cache would be able to reuse.
|
| 71 |
+
|
| 72 |
+
## Summary statistics
|
| 73 |
+
|
| 74 |
+
| metric | p50 | p75 | p90 | p95 | mean |
|
| 75 |
+
|---------------------|--------:|--------:|--------:|--------:|------:|
|
| 76 |
+
| ISL (input tokens) | 109,903 | 150,308 | 300,118 | 395,328 |139,925|
|
| 77 |
+
| OSL (output tokens) | 218 | 441 | 937 | 1,563 | 446 |
|
| 78 |
+
| `think_time` (s) | 10 | 30 | 154 | 435 | 199 |
|
| 79 |
+
| `api_time` (s) | 6.47 | 11.02 | 19.50 | 29.63 | 10.18 |
|
| 80 |
+
| requests / trace | 48 | 101 | 201 | 253 | 80.2 |
|
| 81 |
+
|
| 82 |
+
Aggregate prefix-KV-cache hit rate across **all** requests and **all**
|
| 83 |
+
traces: **96.57 %** of the 129,409,824 blocks would have been served from
|
| 84 |
+
a local prefix cache (incl. turn 0 which can never hit).
|
| 85 |
+
|
| 86 |
+
## Plots
|
| 87 |
+
|
| 88 |
+
All plots below were produced from the full dataset with the analysis
|
| 89 |
+
script published alongside the repo. Vertical dashed lines mark
|
| 90 |
+
p50 / p75 / p90 / p95.
|
| 91 |
+
|
| 92 |
+
### Input sequence length (ISL)
|
| 93 |
+
|
| 94 |
+
Agentic traces accumulate a very large context over time — the median
|
| 95 |
+
turn sends ~110k tokens of input, and the p95 exceeds 395k.
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+

|
| 99 |
+
|
| 100 |
+
### Output sequence length (OSL)
|
| 101 |
+
|
| 102 |
+
Outputs are short by comparison: most turns produce a tool call or a brief
|
| 103 |
+
text response. The median is 218 tokens and p95 is ~1,600.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+

|
| 107 |
+
|
| 108 |
+
### Client think time
|
| 109 |
+
|
| 110 |
+
Time between a completed response and the next request — this includes
|
| 111 |
+
local tool execution, user wait time, etc. The distribution has an extreme
|
| 112 |
+
heavy tail (p95 ≈ 7 min, p99 ≈ 50 min). The linear plot also shows the
|
| 113 |
+
large spike at `0 s` (≈888 requests fired back-to-back).
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+

|
| 117 |
+
|
| 118 |
+
### Prefix KV cache behavior
|
| 119 |
+
|
| 120 |
+
Because this is a sequence of agentic turns on the same conversation, the
|
| 121 |
+
hit rate of a local prefix cache is **extremely high** — almost every turn
|
| 122 |
+
reuses nearly the full preceding context.
|
| 123 |
+
|
| 124 |
+
**Per-request hit rate.** The distribution is saturated near 1.0:
|
| 125 |
+
|
| 126 |
+

|
| 127 |
+
|
| 128 |
+
**Per-request miss rate (log x).** Viewing `1 − hit_rate` on a log axis is
|
| 129 |
+
more informative; most turns miss <2 % of blocks, but there's a visible
|
| 130 |
+
secondary mode near 1.0 corresponding to conversation resets /
|
| 131 |
+
compaction:
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
|
| 135 |
+
**New tokens to prefill per request.** Tokens the prefix cache did *not*
|
| 136 |
+
cover — i.e. the work an engine actually has to do on prefill:
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
|
| 140 |
+
**Hit rate across turns.** After the first couple of turns the mean hit
|
| 141 |
+
rate stabilizes around 0.97, with occasional dips wherever the client
|
| 142 |
+
compacts or rebuilds the context:
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
|
| 146 |
+
**Cached tokens vs ISL.** Each point is one (non-first) request. Most sit
|
| 147 |
+
on the *y = x* line (fully cacheable). The distinctive horizontal band
|
| 148 |
+
near *y = 0* is the compaction/reset cluster:
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
|
| 152 |
+
## Intended uses
|
| 153 |
+
|
| 154 |
+
- **Inference benchmarking:** replay traces against a serving engine
|
| 155 |
+
(vLLM, SGLang, TRT-LLM, etc.) to measure throughput / latency under a
|
| 156 |
+
realistic agentic workload.
|
| 157 |
+
- **KV-cache research:** the `hash_ids` field exposes block-level prefix
|
| 158 |
+
structure directly, without needing to re-tokenize any text.
|
| 159 |
+
- **Capacity planning:** the ISL / OSL / think-time distributions are a
|
| 160 |
+
reasonable first-order model of traffic from long-context agentic
|
| 161 |
+
clients.
|
| 162 |
+
|
| 163 |
+
## Loading
|
| 164 |
+
|
| 165 |
+
```python
|
| 166 |
+
from datasets import load_dataset
|
| 167 |
+
|
| 168 |
+
ds = load_dataset("semianalysisai/cc-traces-weka-042026", split="train")
|
| 169 |
+
print(ds[0]["id"], len(ds[0]["requests"]))
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
## License & attribution
|
| 173 |
+
|
| 174 |
+
Released under the **Apache 2.0** license.
|
| 175 |
+
Credit: **Callan Fox**.
|
plots/isl_hist_linear.png
ADDED
|
Git LFS Details
|
plots/isl_hist_log.png
ADDED
|
Git LFS Details
|
plots/kv_cached_tokens_vs_isl.png
ADDED
|
Git LFS Details
|
plots/kv_hit_rate_prefix_hist.png
ADDED
|
Git LFS Details
|
plots/kv_hit_rate_vs_turn.png
ADDED
|
Git LFS Details
|
plots/kv_miss_rate_prefix_hist.png
ADDED
|
Git LFS Details
|
plots/kv_new_tokens_hist.png
ADDED
|
Git LFS Details
|
plots/osl_hist_linear.png
ADDED
|
Git LFS Details
|
plots/osl_hist_log.png
ADDED
|
Git LFS Details
|
plots/think_time_hist_linear.png
ADDED
|
Git LFS Details
|
plots/think_time_hist_log.png
ADDED
|
Git LFS Details
|
plots/think_time_pos_log.png
ADDED
|
Git LFS Details
|