Agent skill

unsloth-datasets

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/cuba6112/skillfactory/tree/main/skills/unsloth-datasets

SKILL.md

Overview

Unsloth-datasets provides tools to prepare and optimize data for fine-tuning. Key features include standardizing external datasets (like ShareGPT/Alpaca) into a unified format, synthetically extending single-turn data into multi-turn conversations, and handling custom special tokens.

When to Use

  • When converting raw datasets from diverse sources (Hugging Face, ShareGPT) into Unsloth-compatible formats.
  • When you only have single-turn data but want the model to learn multi-turn conversation logic.
  • When adding new domain-specific tokens (e.g., <THINKING>) to a model.

Decision Tree

  1. Is your dataset in ShareGPT format?
    • Yes: Use standardize_sharegpt().
  2. Do you have only single-turn data but want multi-turn performance?
    • Yes: Use the conversation_extension parameter.
  3. Are you adding new tokens?
    • Yes: Call add_new_tokens() BEFORE calling get_peft_model().

Workflows

  1. Standardizing External Datasets: Import standardize_sharegpt, apply it to the dataset to map roles (e.g., 'human/gpt'), and apply the chat template using formatting_prompts_func.
  2. Adding Custom Domain Tokens: Load model/tokenizer, use add_new_tokens to update matrices, and THEN initialize PEFT adapters to ensure new weights are covered.
  3. Custom Chat Template Design: Define a Jinja2 template and explicit EOS token, then pass them as a tuple to get_chat_template.

Non-Obvious Insights

  • Applying the wrong chat template (e.g., Llama-3 template on a Mistral model) is a leading cause of poor fine-tuning performance.
  • The conversation_extension tool creates synthetic multi-turn interactions by randomly merging single-turn rows, improving the model's contextual memory.
  • The order of operations is critical: Adding tokens after initializing LoRA will result in new tokens not being trained by the adapters.

Evidence

  • "We introduced the conversation_extension parameter, which essentially selects some random rows in your single turn dataset, and merges them into 1 conversation!" Source
  • "Users must call add_new_tokens BEFORE get_peft_model to properly resize embedding matrices and LoRA adapters." Source

Scripts

  • scripts/unsloth-datasets_tool.py: Python tool for standardization and token addition.
  • scripts/unsloth-datasets_tool.js: JS template for ShareGPT data mapping.

Dependencies

  • unsloth
  • datasets
  • jinja2

References

  • references/README.md

Expand your agent's capabilities with these related and highly-rated skills.

cuba6112/skillfactory

prompt-engineering

Comprehensive prompt engineering techniques for Claude models. Use this skill when crafting, optimizing, or debugging prompts for Claude API, Claude Code, or any Claude-powered application. Covers system prompts, role prompting, multishot examples, chain of thought, XML structuring, long context handling, extended thinking, prompt chaining, Claude 4.x-specific best practices, and agentic orchestration including subagents, agent loops, skills, MCP integration, and multi-agent workflows.

0 0
Explore
cuba6112/skillfactory

adk-rag-agent

Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.

0 0
Explore
cuba6112/skillfactory

headless-cli-agents

Build agentic systems using Claude CLI in headless mode or the Claude Agent SDK. Use when building automation pipelines, CI/CD integrations, multi-agent orchestration, or programmatic Claude interactions. Covers CLI flags (-p, --output-format), session management (--resume, --continue), Python SDK (claude-agent-sdk), custom tools, and agent loop patterns.

0 0
Explore
cuba6112/skillfactory

notion-knowledge-capture

Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.

0 0
Explore
cuba6112/skillfactory

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

0 0
Explore
cuba6112/skillfactory

gh-fix-ci

Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use when a user asks to debug or fix failing PR CI/CD checks on GitHub Actions and wants a plan + code changes; for external checks (e.g., Buildkite), only report the details URL and mark them out of scope.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results