Official TweakTune plugins for Claude Code - Interactive assistance for synthesizing LLM training datasets
npx claudepluginhub qooba/tweaktuneInteractive assistant for designing and generating tweaktune pipelines to synthesize training data for LLMs. Includes skills, examples, and templates for text generation, JSON synthesis, conversations, and function calling datasets.
tweaktune is a Rust-powered, Python-facing library for synthesizing datasets for training and fine-tuning AI models, especially Language Models.
Build powerful data pipelines to generate synthetic text, structured JSON, and function calling datasets using LLM APIs. Perfect for creating high-quality training data for model fine-tuning.
Load data from multiple sources:
Connect to any LLM provider:
Create datasets for:
pip install tweaktune
Generate synthetic data in minutes:
from tweaktune import Pipeline
import os
# Create a Q&A dataset
(Pipeline()
.with_workers(3)
.with_llm_openai(
name="gpt4",
api_key=os.environ["OPENAI_API_KEY"],
model="gpt-4o-mini"
)
.with_template("system", "You are an expert educator.")
.with_template("question", "Generate a question about: {{topic}}")
.with_template("answer", "Answer this question: {{question}}")
.with_template("output", """{"topic": "{{topic}}", "question": "{{question}}", "answer": "{{answer}}"}""")
.iter_range(100)
.add_column("topic", lambda data: f"Topic {data['index']}")
.generate_text(
template="question",
llm="gpt4",
output="question",
system_template="system"
)
.generate_text(
template="answer",
llm="gpt4",
output="answer",
system_template="system"
)
.write_jsonl(path="qa_dataset.jsonl", template="output")
.run())
Create datasets for training models on tool use:
from tweaktune import Pipeline
from pydantic import Field
def search_products(
query: str = Field(..., description="Search query"),
category: str = Field(..., description="Product category")
):
"""Search for products in the catalog."""
pass
(Pipeline()
.with_workers(5)
.with_llm_openai("gpt4", api_key, "gpt-4o-mini")
.with_tools_dataset("tools", [search_products])
.iter_range(50)
.sample_tools("tools", 1, "tool")
# Generate user question, tool call, and response
# ... (see examples/08_function_calling.py for complete code)
.render_conversation(
conversation="@user:question|@assistant:tool_calls([call])|@tool:result|@assistant:answer",
tools="tool",
output="conversation"
)
.write_jsonl(path="function_calling.jsonl", value="conversation")
.run())
More examples in the examples directory.