camsemianalsyis commited on
Commit
ae1ab9b
·
verified ·
1 Parent(s): 81f936c

Add dataset README and analysis plots

Browse files
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
+ ![ISL — log x](plots/isl_hist_log.png)
98
+ ![ISL — linear x](plots/isl_hist_linear.png)
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
+ ![OSL — log x](plots/osl_hist_log.png)
106
+ ![OSL — linear x](plots/osl_hist_linear.png)
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
+ ![Think time — linear x](plots/think_time_hist_linear.png)
116
+ ![Think time — log x, zeros excluded](plots/think_time_pos_log.png)
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
+ ![Prefix hit rate histogram](plots/kv_hit_rate_prefix_hist.png)
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
+ ![Prefix miss rate histogram](plots/kv_miss_rate_prefix_hist.png)
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
+ ![New tokens per request](plots/kv_new_tokens_hist.png)
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
+ ![Prefix hit rate vs turn index](plots/kv_hit_rate_vs_turn.png)
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
+ ![Cached tokens vs ISL](plots/kv_cached_tokens_vs_isl.png)
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

  • SHA256: d24c6615a613aa513810cbc53efb1a62d0db64705251cb79e4d060c941fa4e59
  • Pointer size: 130 Bytes
  • Size of remote file: 59.2 kB
plots/isl_hist_log.png ADDED

Git LFS Details

  • SHA256: f7013769656f1fb4433c0098a1cec67ede41d6146013bf85fc77797c5300a931
  • Pointer size: 130 Bytes
  • Size of remote file: 58.2 kB
plots/kv_cached_tokens_vs_isl.png ADDED

Git LFS Details

  • SHA256: a7303990339659389885638dac5c3f893fcff7a80e11bf5f8605e42bdf996902
  • Pointer size: 131 Bytes
  • Size of remote file: 103 kB
plots/kv_hit_rate_prefix_hist.png ADDED

Git LFS Details

  • SHA256: aca98921a3ad7f8e4fa5dd38c0a35d1b3db51a9ca25d07cc977f9c717da45a56
  • Pointer size: 130 Bytes
  • Size of remote file: 58 kB
plots/kv_hit_rate_vs_turn.png ADDED

Git LFS Details

  • SHA256: cab409303444e007dd835e5ca571c0abe812fcf1226cc7d4ec4ede9b6c7a4c4e
  • Pointer size: 131 Bytes
  • Size of remote file: 143 kB
plots/kv_miss_rate_prefix_hist.png ADDED

Git LFS Details

  • SHA256: a62d9213e62445b63c270564d42f9c88297454f3057a8c641019bc9a7680ac93
  • Pointer size: 130 Bytes
  • Size of remote file: 63.5 kB
plots/kv_new_tokens_hist.png ADDED

Git LFS Details

  • SHA256: cb5960c57ecabe1a8a0491c9129b48987a01a4b4fd46082b42298bb5ca38f2ce
  • Pointer size: 130 Bytes
  • Size of remote file: 61.7 kB
plots/osl_hist_linear.png ADDED

Git LFS Details

  • SHA256: 13ca57e49938212c20eec26c8002bc9e1e338a182e524ec62e682f715b0de9e9
  • Pointer size: 130 Bytes
  • Size of remote file: 55.6 kB
plots/osl_hist_log.png ADDED

Git LFS Details

  • SHA256: faddba8d020d6d3389c1f1d54debaf991e4418fd9d96888ed223e160c322014c
  • Pointer size: 130 Bytes
  • Size of remote file: 54.1 kB
plots/think_time_hist_linear.png ADDED

Git LFS Details

  • SHA256: 2804695e6bd292cc47e1802a0693817802b5b174da23b7872f2c37000d2a3e87
  • Pointer size: 130 Bytes
  • Size of remote file: 51.6 kB
plots/think_time_hist_log.png ADDED

Git LFS Details

  • SHA256: ebc25cbf19c127fef539bb944537fd81321c397cb438ddd5dfb3f9bc58dcf44f
  • Pointer size: 130 Bytes
  • Size of remote file: 53.2 kB
plots/think_time_pos_log.png ADDED

Git LFS Details

  • SHA256: 547bab582c002c9c9c5e79ba67363902d4a03b8b0eca2b04f7ad9fb5fdf2e7d1
  • Pointer size: 130 Bytes
  • Size of remote file: 59.3 kB