Skip to content

Commit fc6b198

Browse files
WindChimeRanclaude
andcommitted
feat(data): add When2Call multi-turn tool-use dataset preset
Register nvidia/When2Call (train_sft split) in both dataset registries: the offline preprocessing DATASET_CONFIGS (configs.py) and the on-policy response-regeneration script's DATASET_CONFIGS. When2Call is a multi-turn function-calling SFT dataset (CC-BY-4.0) that also teaches when NOT to call a tool. Its conversations use the OpenAI `messages` schema (mapped to `conversations`), and its tool schemas ride along in a parallel `tools` column. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LRRGNt2T9ktWyFRboNUZNU
1 parent 6030a44 commit fc6b198

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

scripts/response_regeneration/script.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
"default_split": "train",
3636
"subset": "main",
3737
},
38+
"when2call": {
39+
"id": "nvidia/When2Call",
40+
"prompt_field": "messages",
41+
"default_split": "train",
42+
"subset": "train_sft",
43+
},
3844
}
3945

4046

src/speculators/data_generation/configs.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ def _normalize_nemotron(example: dict) -> dict:
4747
}
4848

4949

50+
def _normalize_when2call(example: dict) -> dict:
51+
# When2Call already stores the dialogue as role/content ``messages``;
52+
# the parallel ``tools`` column is preserved by the map for tool-aware runs.
53+
return {"conversations": example["messages"]}
54+
55+
5056
def get_coco_dir():
5157
return os.getenv("COCO_DIR") or "coco/"
5258

@@ -146,4 +152,11 @@ def _normalize_sharegpt4v_coco(example: dict) -> dict:
146152
hf_path="mlabonne/open-perfectblend",
147153
split="train",
148154
),
155+
"when2call": DatasetConfig(
156+
name="when2call",
157+
hf_path="nvidia/When2Call",
158+
subset="train_sft",
159+
split="train",
160+
normalize_fn=_normalize_when2call,
161+
),
149162
}

0 commit comments

Comments
 (0)