Fine Tuning Data Generator logo

Fine Tuning Data Generator

Community
markpitt
fine-tuning-data-generator

Generates comprehensive synthetic fine-tuning datasets in ChatML format (JSONL) for use with Unsloth, Axolotl, and similar training frameworks. Gathers requirements, creates datasets with diverse examples, validates quality, and provides framework integration guidance.

Overview

Publishermarkpitt
Repositoryclaude-skills
Skill namefine-tuning-data-generator
Stars
25
Forks
3
Bundled files
9
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 9 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by markpitt on GitHub. Read the source before you install it.

Installation

Install the Fine Tuning Data Generator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/markpitt/claude-skills/tree/main/skills/fine-tuning-data-generator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/markpitt/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/fine-tuning-data-generator .claude/skills/fine-tuning-data-generator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Fine Tuning Data Generator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Fine Tuning Data Generator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Fine Tuning Data Generator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Fine-Tuning Data Generator

This skill generates high-quality synthetic training data in ChatML format for fine-tuning language models using frameworks like Unsloth, Axolotl, or similar tools.

What Do I Need?

NeedResource
Planning my dataset - requirements, strategy, quality checklistresources/dataset-strategy.md
How to create diverse examples - variation techniques, multi-turn patterns, format-specific guidanceresources/generation-techniques.md
ChatML format details - structure, specification, common issues, framework compatibilityresources/chatml-format.md
Example datasets - inspiration across domains, multi-turn samples, edge casesresources/examples.md
Validating quality - validation workflow, analyzing datasets, troubleshootingresources/quality-validation.md
Training & deployment - framework setup, hyperparameters, optimization, deploymentresources/framework-integration.md

Workflow

Phase 1: Gather Requirements

Start with these essential clarifying questions:

Task Definition:

  • What is the model being trained to do? (e.g., customer support, code generation, creative writing)
  • What specific domain or subject matter? (e.g., legal, medical, e-commerce, software development)
  • How many training examples are needed? (Recommend: 100+ for simple tasks, 500-1000+ for complex)

Quality & Diversity:

  • Complexity range: simple to complex mix, or focus on specific difficulty level?
  • Diversity: edge cases, error handling, unusual scenarios?
  • Tone/style: professional, friendly, technical, concise, detailed?
  • Response length preferences?
  • Any specific formats: code blocks, lists, tables, JSON?

Dataset Composition:

  • Distribution across subtopics: evenly distributed or weighted?
  • Include negative examples (what NOT to do)?
  • Need validation split? (Recommend 10-20% of total)

See resources/dataset-strategy.md for detailed question templates.

Phase 2: Create Generation Plan

Present a plan covering:

  • Number and distribution of examples across categories
  • Key topics/scenarios to cover
  • Diversity strategies (phrasing variations, complexity levels, edge cases)
  • System prompt approach (consistent vs. varied)
  • Quality assurance approach

Get user approval before generating.

Phase 3: Generate Synthetic Data

Create examples following these quality standards:

Key Principles:

  • Realistic scenarios reflecting real-world use cases
  • Natural language with varied phrasing and formality levels
  • Accurate, helpful responses aligned with desired behavior
  • Consistent ChatML formatting throughout
  • Balanced difficulty (unless specified)
  • Meaningful variety (no repetition)
  • Include edge cases and error scenarios

Diversity Techniques:

  • Vary query phrasing (questions, commands, statements)
  • Include different expertise levels (beginner, intermediate, expert)
  • Cover both positive and negative examples
  • Mix short and long-form responses
  • Include multi-step reasoning when appropriate
  • Add context variations

See resources/generation-techniques.md for detailed techniques, domain-specific guidance, and batch generation workflow.

Phase 4: Validate & Document

Run validation tools and checks:

bash
# Validate JSON formatting and structure
python scripts/validate_chatml.py training_data.jsonl

# Analyze dataset statistics and diversity
python scripts/analyze_dataset.py training_data.jsonl

# Export statistics
python scripts/analyze_dataset.py training_data.jsonl --export stats.json

Quality Checklist:

  • JSON validation passed (no errors)
  • Analysis shows good diversity metrics
  • Manual sample review passed
  • No duplicate or near-duplicate examples
  • All required fields present
  • Realistic user queries
  • Accurate, helpful responses
  • Balanced category distribution
  • Dataset metadata documented

See resources/quality-validation.md for validation details, troubleshooting, and documentation templates.

Phase 5: Integration & Training

Prepare for training with your framework of choice:

Output Files:

  • training_data.jsonl - Main training set
  • validation_data.jsonl - Optional validation set
  • dataset_info.txt - Metadata and statistics

Framework Setup:

  • Unsloth: Automatic ChatML detection, efficient 4-bit training
  • Axolotl: Specify type: chat_template and chat_template: chatml
  • Hugging Face: Use tokenizer's apply_chat_template() method
  • Custom: Load from JSONL, handle ChatML formatting

See resources/framework-integration.md for setup code, hyperparameters, deployment options, and best practices.

ChatML Format Overview

Each training example is a JSON object with a messages array:

json
{"messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How do I reverse a string in Python?"}, {"role": "assistant", "content": "Use slicing: `text[::-1]`"}]}

Roles:

  • system: Sets assistant behavior (optional but recommended)
  • user: User's input/query
  • assistant: Model's expected response

Multi-turn: Add additional user/assistant message pairs for conversations.

See resources/chatml-format.md for detailed specification, validation, common issues, and framework-specific notes.

Tool Reference

Scripts in scripts/

validate_chatml.py

Validates ChatML format JSONL files:

bash
python scripts/validate_chatml.py training_data.jsonl
python scripts/validate_chatml.py training_data.jsonl --verbose

Checks:

  • Valid JSON formatting
  • Required fields (messages, role, content)
  • Valid role values (system, user, assistant)
  • Proper message order
  • Duplicate detection
  • Diversity metrics
analyze_dataset.py

Provides comprehensive statistics and analysis:

bash
python scripts/analyze_dataset.py training_data.jsonl
python scripts/analyze_dataset.py training_data.jsonl --export stats.json

Provides:

  • Dataset overview (total examples, message counts)
  • Message length statistics
  • System prompt variations
  • User query patterns (questions, commands, code-related, length categories)
  • Assistant response patterns (code blocks, lists, headers, length categories)
  • Quality indicators (diversity score, balance ratio)
  • Token estimates and cost projection

Common Workflows

Small Dataset (100-200 examples)

  1. Gather requirements
  2. Create generation plan for 1-2 categories
  3. Generate in single batch, review quality
  4. Validate and document
  5. Ready for training

Medium Dataset (500-1000 examples)

  1. Gather requirements
  2. Create detailed plan with multiple categories
  3. Generate in 2-3 batches, reviewing after each
  4. Analyze diversity and adjust approach
  5. Fill any gaps
  6. Final validation and documentation

Large Dataset (2000+ examples)

  1. Gather comprehensive requirements
  2. Create multi-batch generation plan
  3. Batch 1 (50-100): Foundation examples
  4. Batch 2 (100-200): Complexity expansion
  5. Batch 3 (100-200): Coverage filling
  6. Batch 4 (50-100): Polish and validation
  7. Run full validation suite
  8. Generate comprehensive documentation

Best Practices

Start Small, Iterate

  1. Generate 10-20 examples first
  2. Review and get feedback
  3. Refine approach based on feedback
  4. Scale up to full dataset

Quality Over Quantity

  • Better to have 500 diverse, high-quality examples than 5,000 repetitive ones
  • Each example should teach something new
  • Maintain consistent response quality throughout

Diversify Systematically

  • Vary query phrasing (questions, commands, statements)
  • Cover different expertise levels
  • Mix response complexities
  • Include edge cases (typically 20-30% of dataset)
  • Use batch generation workflow for large datasets

Test Before Deployment

  • Test dataset with actual training framework
  • Monitor training metrics for issues
  • Test fine-tuned model outputs before deployment
  • Compare results to base model

Document Everything

  • Keep notes on generation parameters
  • Save different dataset versions
  • Document any modifications made
  • Record generation strategies used
  • Track model performance metrics

Advanced Features

Batch Generation Strategy

For datasets 500+ examples:

  • Generate 50-100 examples at a time
  • Review distribution and diversity after each batch
  • Adjust generation strategy based on identified gaps
  • Prevents repetition and maintains creativity

Common Pitfalls to Avoid

  • Over-templating: Creates repetitive patterns (vary naturally)
  • Unrealistic Queries: Overly formal/robotic user inputs (use varied phrasing)
  • Narrow Coverage: Limited scenarios and phrasing (ensure diversity)
  • Inconsistent Quality: Quality degradation over time (use quality checklist)
  • JSON Errors: Invalid formatting breaking training (always validate)
  • Missing Context: System prompts without detail (provide clear instructions)
  • Response Mismatch: Responses don't address queries (verify relevance)

Dataset Size Recommendations

Task ComplexityRecommended SizeNotes
Simple tasks100-500Well-defined, limited variation
Medium tasks500-2,000Multiple scenarios, moderate complexity
Complex tasks2,000-10,000+Many edge cases, high variability
Domain adaptation1,000-5,000Specialized knowledge required

Resources


Version: 2.0 | Updated: 2024 | Pattern: Modular Orchestration

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Fine Tuning Data Generator AI skill do?

Generates comprehensive synthetic fine-tuning datasets in ChatML format (JSONL) for use with Unsloth, Axolotl, and similar training frameworks. Gathers requirements, creates datasets with diverse examples, validates quality, and provides framework integration guidance.

Why use Fine Tuning Data Generator on TypingMind?

Because you install it once and use it with any model. Fine Tuning Data Generator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Fine Tuning Data Generator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/markpitt/claude-skills/tree/main/skills/fine-tuning-data-generator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Fine Tuning Data Generator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Fine Tuning Data Generator?

As many as you like. As long as a model supports skills, you can use Fine Tuning Data Generator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Fine Tuning Data Generator AI skill free?

It is published on GitHub by markpitt. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇