dataset-curation
यह क्या करती है
यह टूल AI मॉडल के प्रशिक्षण के लिए आपके कच्चे डेटा को व्यवस्थित और तैयार करता है। यह सुनिश्चित करता है कि डेटा सही फॉर्मेट में हो, अच्छी तरह व्यवस्थित हो और सफल प्रशिक्षण के लिए जाँचा गया हो।
कब इस्तेमाल करें
- ✓जब आपके पास कच्चा डेटा हो और उसे AI के सीखने लायक फॉर्मेट में बदलना हो।
- ✓जब असली डेटा के साथ AI-जनित डेटा मिलाकर प्रशिक्षण बेहतर करना हो।
- ✓AI मॉडल का प्रशिक्षण शुरू करने से पहले, यह पक्का करने के लिए कि डेटा तैयार है।
Skill का लिंक
https://github.com/wshobson/agents/blob/main/plugins/llm-finetuning/skills/dataset-curation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे बातचीत वाले डेटा को message फॉर्मेट में चैट मॉडल के प्रशिक्षण के लिए तैयार करो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह चुने गए प्रशिक्षण तरीके (जैसे बातचीत या prompt/response जोड़े) के अनुसार आपके डेटा को फॉर्मेट करता है। यह डेटा को इस तरह व्यवस्थित करता है कि AI सिर्फ़ ज़रूरी जवाबों से सीखे और बेकार की प्रोसेसिंग से बचे।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Dataset Curation
This skill assumes finetuning-method-selection
already routed here — the next step is preparing
data, not choosing a method. What follows: format
selection by target method, the template/packing
mechanics behind the most common silent training
failures, rules for mixing in synthetic data
without collapse, and the dataset card that closes
out Phase 2 before a run starts.
Input: raw examples (demonstrations, preference
judgments, or task prompts) plus a routing decision
from finetuning-method-selection.
Output format: a formatted, packed, validated
JSONL dataset plus a completed dataset card — the
Phase 2 artifact /finetune checks before launching
training.
Format Selection
| Method | Shape | Rows |
|---|---|---|
| SFT, single-turn | Instruct (instruction/response or prompt/completion) |
~1,000+ floor |
| SFT, multi-turn | Conversation / ChatML messages list |
~1,000+ floor |
| DPO / ORPO | Preference pair (prompt, chosen, rejected) |
Method-dependent, see preference-optimization |
| KTO | Unpaired (prompt, completion, label) |
Method-dependent, see preference-optimization |
| GRPO / RLVR | Prompt-only (prompt + verifier metadata) |
Method-dependent, see grpo-rlvr-training |
~1,000+ rows is the recommended floor for SFT, not a target. Below it, a handful of low-quality or duplicate examples can dominate the gradient; above it, quality over quantity — a smaller verified, deduplicated set beats a larger noisy one.
The ChatML shape, for orientation; the other four formats plus a ShareGPT conversion note live in
references/formats-and-templates.md:{"messages": [ {"role": "user", "content": "..."}, {"role": "assistant", "content": "..."} ]}
Chat Templates and Loss Masking
Apply the target model's chat template before any concatenation or packing, never after — packing raw text and templating the packed blob afterward corrupts turn boundaries, landing role markers in the wrong place relative to each example.
Train on assistant responses only. Mask the loss (
-100in the labels tensor) over system/user turns and the template's own role markers — only assistant-turn content tokens contribute to loss.Template/tokenizer mismatches are a top silent failure mode. A model trained against one chat template but served or evaluated with a different one degrades without erroring. Verify the same template string used in training is applied at inference and eval time.
Keep the dataset in
messagesshape and let the trainer template and mask it (assistant_only_loss=Truein current TRL) — pre-rendering to a flat text field destroys the turn boundaries masking needs. Full code sketch:references/formats-and-templates.md. Sanity-check before training — decode only unmasked positions; expect only assistant text:keep = batch["labels"][0] != -100 print(tokenizer.decode(batch["input_ids"][0][keep]))
Packing
Without packing, 40–70% of compute is spent on padding — variable-length examples batched at a fixed sequence length waste the gap between each example's length and the batch's max. Packing concatenates multiple examples into one sequence up to the max length, cutting most of that waste.
Packing changes batch semantics. A packed sequence can contain several original examples, so "steps per epoch" and any LR schedule keyed to example count shift once packing is on — recompute schedule milestones against packed-sequence count.
MANDATORY: decode and manually inspect 5–10 packed sequences before scaling to a full run. Confirm example boundaries land where expected, template markers are intact per sub-example, and the loss mask is still assistant-only within each packed sequence. Not optional — packing bugs are silent (the loss curve looks normal) and only surface in eval quality, hours later:
for seq in packed_dataset.select(range(10)): print(tokenizer.decode(seq["input_ids"]))
Synthetic Data Rules
- Keep ≥25% real data as a collapse guard. Training on a growing share of model-generated data without a real-data floor drives measurable quality collapse over successive generations — 25% real is the minimum that holds the line. General-domain replay rows count toward this floor — "real" means "not generated for this task from this
…
अक्सर पूछे जाने वाले सवाल
'packing' क्या है?
यह एक तकनीक है जिसमें कई प्रशिक्षण उदाहरणों को एक ही सीक्वेंस में जोड़ दिया जाता है, ताकि प्रोसेसिंग पावर का बेहतर इस्तेमाल हो और खाली जगह की बर्बादी कम हो।
AI-जनित डेटा इस्तेमाल करते समय असली डेटा रखना क्यों ज़रूरी है?
कम से कम 25% असली डेटा रखने से AI मॉडल की गुणवत्ता समय के साथ घटती नहीं, और वह भरोसेमंद स्रोतों से सीखता रहता है।
'dataset card' क्या है?
यह एक दस्तावेज़ है जिसमें प्रशिक्षण के लिए इस्तेमाल किए गए डेटा का स्रोत, मात्रा और खासियतें लिखी होती हैं, ताकि पारदर्शिता और ट्रेसेबिलिटी बनी रहे।
जानकारी
लेखक का मूल विवरण
Prepare, format, and validate datasets for supervised fine-tuning and preference training. Use when converting raw data into training format, applying chat templates, configuring sequence packing, generating synthetic training data, or writing a dataset card before a run.
repo: wshobson/agents
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6729
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
screen-reader-testing
41kआपके एजेंट को screen readers का इस्तेमाल करके वेबसाइटों की जांच करने देता है, ताकि यह पक्का हो सके कि वे accessible हैं।
wcag-audit-patterns
41kआपके एजेंट को वेबसाइटों का accessibility audit करने और WCAG guidelines के हिसाब से समस्याएं ठीक करने में मदद करता है।
multi-reviewer-patterns
41kआपके एजेंट को कई code reviews को एक साथ चलाने देता है। यह एक जैसे findings हटाता है और सारी रिपोर्ट को एक जगह जोड़ता है।
parallel-debugging
41kआपके एजेंट को parallel जांच के साथ जटिल समस्याओं को debug करने और root cause analysis में मदद करता है।
मिलती-जुलती skills
pytorch-patterns
280kआपके एजेंट को machine learning models के लिए PyTorch इस्तेमाल करने में मदद करता है। कुशल model training के best practices लागू करता है और नतीजों को दोहराने लायक रखता है।
evm-token-decimals
280kयह आपके एजेंट को अलग-अलग blockchain networks पर decimal numbers की गलतियों से बचने में मदद करता है। यह transactions और calculations में token values सही रखने का ध्यान रखता है।
ito-inference
280kआपके एजेंट को AI models की उपलब्धता जाँचने देता है। यह compute request को तैयार model service से जोड़ता है।