Skip to content

Commit b59019d

Browse files
WindChimeRanclaude
andcommitted
feat(data): add When2Call single-turn tool-use dataset preset
Register nvidia/When2Call (train_sft config) in the shared dataset registry. Since vllm-project#777 that registry is the single source of presets, so the entry serves both pipelines: off-policy `prepare-data` and the on-policy regeneration script's `--dataset`. When2Call is a function-calling SFT dataset (CC-BY-4.0) that also teaches when NOT to call a tool. Every row is a single user/assistant exchange with no system turn; the conversation uses the OpenAI `messages` schema (normalized to `conversations`), and the 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 Signed-off-by: Ranran Haoran Zhang <ranzhang@redhat.com>
1 parent 548f9f7 commit b59019d

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

docs/cli/response_regeneration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ The text presets from the shared dataset registry (`DATASET_CONFIGS` in `specula
124124
| `magpie` | `Magpie-Align/Magpie-Llama-3.1-Pro-300K-Filtered` | `train` |
125125
| `nemotron` | `nvidia/Llama-Nemotron-Post-Training-Dataset` | `chat` |
126126
| `open-perfectblend` | `mlabonne/open-perfectblend` | `train` |
127+
| `when2call` | `nvidia/When2Call` | `train` |
127128

128129
The registry's multimodal preset, `sharegpt4v_coco`, is **off-policy only** and `--dataset` rejects it. Its turns carry image content parts, which the Chat Completions API rejects, and the pre-tokenized output row has nowhere to keep pixel data. Use it with `prepare-data`.
129130

src/speculators/data_generation/configs.py

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

5151

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

@@ -151,4 +157,11 @@ def _normalize_sharegpt4v_coco(example: dict) -> dict:
151157
hf_path="mlabonne/open-perfectblend",
152158
split="train",
153159
),
160+
"when2call": DatasetConfig(
161+
name="when2call",
162+
hf_path="nvidia/When2Call",
163+
subset="train_sft",
164+
split="train",
165+
normalize_fn=_normalize_when2call,
166+
),
154167
}

0 commit comments

Comments
 (0)