Datasets:
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -11,15 +11,6 @@ tags:
|
|
| 11 |
- qwen3
|
| 12 |
size_categories:
|
| 13 |
- 10M<n<100M
|
| 14 |
-
configs:
|
| 15 |
-
- config_name: trace
|
| 16 |
-
data_files:
|
| 17 |
-
- split: train
|
| 18 |
-
path: trace.jsonl
|
| 19 |
-
- config_name: qwen3-32b-buckets
|
| 20 |
-
data_files:
|
| 21 |
-
- split: train
|
| 22 |
-
path: qwen3-32b-buckets.jsonl
|
| 23 |
---
|
| 24 |
|
| 25 |
# LLM Serving Trace
|
|
@@ -37,30 +28,51 @@ input-token buckets. It is packaged as newline-delimited JSON.
|
|
| 37 |
|
| 38 |
## Loading
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
```python
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
"
|
| 46 |
-
"qwen3-32b-buckets",
|
| 47 |
-
split="train",
|
| 48 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
-
|
|
|
|
| 52 |
|
| 53 |
```python
|
| 54 |
-
from
|
| 55 |
|
| 56 |
-
|
| 57 |
-
"eth-easl/swissai-serving-trace",
|
| 58 |
-
"qwen3-32b-buckets",
|
| 59 |
-
|
| 60 |
-
streaming=True,
|
| 61 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
|
|
|
|
|
|
|
| 64 |
```
|
| 65 |
|
| 66 |
## Schema
|
|
@@ -80,16 +92,21 @@ Each row contains:
|
|
| 80 |
| `reported_token_input` | int64 | Reported input-token count, or `-1` when unavailable. |
|
| 81 |
| `reported_token_output` | int64 | Reported output-token count, or `-1` when unavailable. |
|
| 82 |
|
| 83 |
-
`model_parameters`
|
|
|
|
|
|
|
| 84 |
|
| 85 |
-
| Field |
|
| 86 |
| --- | --- |
|
| 87 |
-
| `temperature` |
|
| 88 |
-
| `max_tokens` | string |
|
| 89 |
-
| `top_p` |
|
| 90 |
-
| `frequency_penalty` |
|
| 91 |
-
| `presence_penalty` |
|
| 92 |
-
| `seed` |
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
### `qwen3-32b-buckets`
|
| 95 |
|
|
|
|
| 11 |
- qwen3
|
| 12 |
size_categories:
|
| 13 |
- 10M<n<100M
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
# LLM Serving Trace
|
|
|
|
| 28 |
|
| 29 |
## Loading
|
| 30 |
|
| 31 |
+
The files are distributed as raw newline-delimited JSON. The `model_parameters`
|
| 32 |
+
field is heterogeneous across requests (mixed types and occasional extra keys),
|
| 33 |
+
so the schema is not friendly to `datasets.load_dataset`'s automatic Arrow
|
| 34 |
+
inference. Download the files with `huggingface_hub` and read them directly.
|
| 35 |
+
|
| 36 |
```python
|
| 37 |
+
import json
|
| 38 |
+
from pathlib import Path
|
| 39 |
+
|
| 40 |
+
from huggingface_hub import snapshot_download
|
| 41 |
|
| 42 |
+
local_dir = snapshot_download(
|
| 43 |
+
repo_id="eth-easl/swissai-serving-trace",
|
| 44 |
+
repo_type="dataset",
|
| 45 |
+
allow_patterns=["trace.jsonl"], # or ["qwen3-32b-buckets.jsonl"], or both
|
|
|
|
| 46 |
)
|
| 47 |
+
|
| 48 |
+
with (Path(local_dir) / "trace.jsonl").open("r", encoding="utf-8") as handle:
|
| 49 |
+
for line in handle:
|
| 50 |
+
record = json.loads(line)
|
| 51 |
+
# process record
|
| 52 |
```
|
| 53 |
|
| 54 |
+
To grab a single file without materialising the whole snapshot tree, use
|
| 55 |
+
`hf_hub_download`:
|
| 56 |
|
| 57 |
```python
|
| 58 |
+
from huggingface_hub import hf_hub_download
|
| 59 |
|
| 60 |
+
path = hf_hub_download(
|
| 61 |
+
repo_id="eth-easl/swissai-serving-trace",
|
| 62 |
+
filename="qwen3-32b-buckets.jsonl",
|
| 63 |
+
repo_type="dataset",
|
|
|
|
| 64 |
)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
If you prefer a dataframe and have enough memory, pandas can read the JSONL
|
| 68 |
+
directly (`trace.jsonl` is ~7 GB, so consider `chunksize=`):
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
import pandas as pd
|
| 72 |
|
| 73 |
+
frames = pd.read_json(path, lines=True, chunksize=100_000)
|
| 74 |
+
for chunk in frames:
|
| 75 |
+
... # process chunk
|
| 76 |
```
|
| 77 |
|
| 78 |
## Schema
|
|
|
|
| 92 |
| `reported_token_input` | int64 | Reported input-token count, or `-1` when unavailable. |
|
| 93 |
| `reported_token_output` | int64 | Reported output-token count, or `-1` when unavailable. |
|
| 94 |
|
| 95 |
+
`model_parameters` is the raw user-supplied generation config and is
|
| 96 |
+
deliberately not normalised. Most rows contain the keys below, but values are
|
| 97 |
+
mixed JSON types because they reflect what the client sent:
|
| 98 |
|
| 99 |
+
| Field | Observed JSON types |
|
| 100 |
| --- | --- |
|
| 101 |
+
| `temperature` | number, `"null"` string, missing |
|
| 102 |
+
| `max_tokens` | number, string, `null` |
|
| 103 |
+
| `top_p` | number, `"null"` string, missing |
|
| 104 |
+
| `frequency_penalty` | number, string, list, `null`, missing |
|
| 105 |
+
| `presence_penalty` | number, string, bool, `null`, missing |
|
| 106 |
+
| `seed` | integer, missing |
|
| 107 |
+
|
| 108 |
+
A small number of rows also carry an extra `n` integer key. Coerce these to
|
| 109 |
+
your preferred schema at read time.
|
| 110 |
|
| 111 |
### `qwen3-32b-buckets`
|
| 112 |
|