How to prepare a dataset for LLM fine-tuning (JSONL, CSV, chat)
Published 25 November 2026
The quality of a fine-tune is decided by the data far more than by hyperparameters. Here is what Tunewerk accepts and what works well.
Supported formats
Alpaca (instruction, optional input, output):
{"instruction": "Summarize the text.", "input": "Long text …", "output": "Short summary …"}Prompt/completion or question/answer:
{"prompt": "Translate to German: Good morning", "completion": "Guten Morgen"}Chat (OpenAI or ShareGPT style):
{"messages": [{"role": "system", "content": "You are a support agent."},
{"role": "user", "content": "My order is late."},
{"role": "assistant", "content": "Sorry about that! …"}]}Plain text for continued pre-training: one {"text": "…"} per line, or a .txt file with paragraphs separated by blank lines.
How much data?
- Style or persona changes: 50–500 high-quality examples.
- New task or domain: 1,000–10,000 examples.
- Teaching new knowledge works poorly with LoRA – use retrieval for facts and fine-tuning for behavior.
Common mistakes
- Training on the prompt as well as the answer. Keep “train on responses only” enabled for instruction data.
- Ignoring the chat template. Tunewerk applies the model’s own template so the fine-tune matches how the model is used later.
- Overly long examples. Everything beyond the max sequence length is cut off; check the “truncated” counter after tokenization.
- Duplicates and near-duplicates, which make the model overfit quickly.
Try it yourself – free, in your browser.
Open the studio