File size: 9,061 Bytes
e3d284a
696498e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e3d284a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
696498e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
---
license: other
license_name: source-specific-terms
license_link: https://huggingface.co/datasets/inference-optimization/RazorCal/blob/main/LICENSE-DATA
language:
- en
- zh
size_categories:
- 1K<n<10K
task_categories:
- text-generation
tags:
- calibration
- model-compression
- pruning
- mixture-of-experts
- moe
- arxiv:2609.30465
dataset_info:
  features:
  - name: domain
    dtype: string
  - name: sub_source
    dtype: string
  - name: coding_subclass
    dtype: string
  - name: messages
    list:
    - name: role
      dtype: string
    - name: content
      dtype: string
    - name: tool_calls
      list:
      - name: id
        dtype: string
      - name: type
        dtype: string
      - name: index
        dtype: int64
      - name: function
        struct:
        - name: name
          dtype: string
        - name: arguments
          dtype: string
  - name: tools
    list:
    - name: type
      dtype: string
    - name: function
      struct:
      - name: name
        dtype: string
      - name: description
        dtype: string
      - name: parameters
        dtype: string
  splits:
  - name: train
    num_bytes: 7506600
    num_examples: 2048
  download_size: 7414027
  dataset_size: 7506600
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

# RazorCal

RazorCal is a general-purpose calibration corpus released with [RAZOR](https://arxiv.org/abs/2609.30465). It contains 2,048 samples across seven domains (about 8 MB). Each record includes input messages and source attribution. The records carry no architecture-specific fields, so the corpus also suits FFN or layer pruning, perplexity measurement and other calibration-based compression; RAZOR uses it to estimate per-expert statistics. Reasoning traces are omitted because the calibration loader does not consume them. Potential contact identifiers, home-directory usernames, private-network examples and literal password examples are replaced with placeholders.

This repository re-publishes the corpus in a row-oriented format: each of the 2,048 samples is one dataset row. It is converted from the original single-file release at [Nickyang/RazorCal](https://huggingface.co/datasets/Nickyang/RazorCal), which is also included unchanged at [source/RazorCal.json](source/RazorCal.json) so that the conversion can be verified against the original artifact.

## Composition

| Domain | Samples |
|---|---:|
| Coding | 512 |
| Math | 256 |
| Science (STEM) | 256 |
| Chinese-STEM | 256 |
| Instruction Following | 256 |
| Tool Calling | 256 |
| World Knowledge | 256 |
| **Total** | **2,048** |

## Format

Each row is one sample with the following columns:

| Column | Type | Description |
|---|---|---|
| `domain` | string | one of the seven domains above |
| `sub_source` | string | recorded upstream source attribution |
| `coding_subclass` | string, nullable | subclass label, present on Coding samples |
| `messages` | list of structs | chat messages with `role`, `content` and optional `tool_calls` (`id`, `type`, `index`, `function.name`, `function.arguments`) |
| `tools` | list of structs, nullable | tool definitions with `type` and `function` (`name`, `description`, `parameters`) |

The corpus defines a single `train` split holding all 2,048 samples; no train/validation/test semantics are implied.

Conversions applied to the original file, needed to keep a single valid arrow schema:

- `tool_calls[].function.arguments` and `tools[].function.parameters` are free-form JSON objects whose value types conflict across records (for example a string and a number under the same key path of different records). They are recorded as JSON strings; parse them with `json.loads` before use.
- The optional message fields `tool_call_id` and `name` are null for every record in the original file and are omitted here.
- Empty `tool_calls` and `tools` lists are recorded as null.

Everything else is preserved verbatim. The corpus metadata recorded in the original file's `meta` object:

```json
{
  "name": "RazorCal",
  "total_samples": 2048,
  "max_length_per_sample": 32000,
  "domains": {
    "Math": 256,
    "Science (STEM)": 256,
    "Chinese-STEM": 256,
    "Instruction Following": 256,
    "Tool Calling": 256,
    "World Knowledge": 256,
    "Coding": 512
  },
  "coding_subclass_distribution": {
    "swe_issue_fix": 40,
    "engineering_oop_api": 111,
    "cp_python_stdin": 138,
    "cp_cpp_stdin": 99,
    "func_signature_completion": 100,
    "leetcode_class_solution": 24
  },
  "homepage": "https://github.com/nick7nlp/RAZOR",
  "description": "RazorCal is a multi-domain calibration corpus released with RAZOR. It is a general-purpose calibration mixture: the records carry no architecture-specific fields and can be used for expert, FFN or layer pruning as well as other calibration-based compression. Source labels record attribution; see the datasheet for provenance, privacy processing, and usage limitations.",
  "license": "Source-specific terms apply; see LICENSE-DATA.",
  "privacy_processing": "Reasoning traces are omitted. Contact identifiers, home-directory usernames, private-network examples, and literal password examples are replaced with placeholders."
}
```

Loading the rows:

```python
import json

from datasets import load_dataset

dataset = load_dataset("inference-optimization/RazorCal", split="train")

sample = dataset[0]
messages = sample["messages"]
for call in messages[-1]["tool_calls"] or []:
    call["function"]["arguments"] = json.loads(call["function"]["arguments"])
```

For the [RAZOR CLI](https://github.com/nick7nlp/RAZOR), use the unchanged original file:

```bash
curl -L -o RazorCal.json \
  https://huggingface.co/datasets/inference-optimization/RazorCal/resolve/main/source/RazorCal.json

razor saliency --model <model-path> --data RazorCal.json --out out/sal
```

## Recorded sources

A source label records attribution information; it is not, by itself, proof
of a record-level match to an upstream release.

| Domain | `sub_source` labels and counts | Recorded source description |
|---|---|---|
| Math | `nemotron-cascade2-math` (160); `nemotron-math-v2-high-aime-style` (96) | Nemotron-Cascade-2-SFT-Data math slice; Nemotron-Math-V2 |
| Science (STEM) | `Nemotron-Science-V1-RQA` (176); `Nemotron-Science-V1-MCQ` (80) | Nemotron-Science-V1 |
| World Knowledge | `OpenHermes-2.5` (256) | OpenHermes-2.5 via smoltalk2 |
| Coding | `Dolci-Python-Algorithms` (205); `competitive-programming-python` (141); `competitive-programming-cpp` (115); `Nemotron-SFT-SWE-V2-agentless` (40); `Nemotron-OpenCode-general` (11) | Dolci; competitive-programming, SWE and OpenCode corpora |
| Instruction Following | `Dolci-Precise-IF` (256) | Dolci instruction-following corpus |
| Tool Calling | `Nemotron-Agentic-tool-calling-v2` (256) | Nemotron agentic/tool-calling corpus |
| Chinese-STEM | `multilingual-chinese-math` (86); `multilingual-chinese-code` (85); `multilingual-chinese-stem` (85) | Multilingual Chinese categories |

The `nemotron-cascade2-math` records were taken as a whole domain slice rather
than sampled individually, so the label records the upstream dataset but not a
per-record identifier within it. Source labels alone do not establish
provenance. See [FIDELITY_AUDIT.md](FIDELITY_AUDIT.md) for provenance
boundaries and [LICENSE-DATA](LICENSE-DATA) for recorded license information.

## Usage limitations

RazorCal is calibration data, not an independent evaluation benchmark.
Domain coverage does not guarantee preservation of model quality. Review
possible overlap with evaluation data for the intended use.

The original record array contains 587 tool messages without populated
`tool_call_id` links and 11 tool definitions with empty `parameters` objects;
in this repository the always-null `tool_call_id` and `name` fields are
omitted, as documented under [Format](#format). Tokenizer chat templates and
schema validators may require additional handling at load time.

Public source material can still contain personal references or unsuitable
content; source labels do not establish that records are free of such content.
See [DATASHEET.md](DATASHEET.md) for intended use and limitations.

## Citation and licensing

Source-specific terms continue to apply; no single replacement license is
asserted for all RazorCal records. Retain applicable upstream attribution.
See [LICENSE-DATA](LICENSE-DATA) and [NOTICE](NOTICE) before use or
redistribution.

This repository contains no code; [LICENSE-CODE](LICENSE-CODE) is retained
from the upstream release for completeness. See [DATASHEET.md](DATASHEET.md)
for intended use and limitations and [FIDELITY_AUDIT.md](FIDELITY_AUDIT.md)
for the scope of available provenance evidence.

```bibtex
@misc{song2026razorpruningreplaceableexperts,
      title={RAZOR: Pruning Replaceable Experts in LLMs},
      author={Mingyang Song and Mao Zheng},
      year={2026},
      eprint={2609.30465},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2609.30465},
}
```