Data Formats
Soup supports 19 data formats as of v0.71.32 (raft added for Retrieval-Augmented Fine-Tuning in v0.62, asr added for Whisper fine-tuning in v0.71.32). Files can be JSONL, JSON, CSV, Parquet, or TXT — local paths or remote URIs (s3 / gs / gcs / az / abfs / abfss / oci). Format is auto-detected from the first row for the twelve formats with a distinctive set of keys; the six at the end of this page cannot be detected and must be named in data.format.
Alpaca
{"instruction": "Explain gravity", "input": "", "output": "Gravity is..."}ShareGPT
{"conversations": [{"from": "human", "value": "Hi"}, {"from": "gpt", "value": "Hello!"}]}ChatML
{"messages": [{"role": "user", "content": "Hi"}, {"role": "assistant", "content": "Hello!"}]}DPO / ORPO / SimPO / IPO (preference pairs)
{"prompt": "Explain gravity", "chosen": "Gravity is a force...", "rejected": "I don't know"}KTO (unpaired preferences)
{"prompt": "Explain gravity", "completion": "Gravity is a force...", "label": true}LLaVA (vision)
{"image": "photo.jpg", "conversations": [{"from": "human", "value": "<image>\nDescribe this."}, {"from": "gpt", "value": "A cat."}]}ShareGPT4V (vision)
{"image": "chart.png", "conversations": [{"from": "human", "value": "<image>\nExplain this chart."}, {"from": "gpt", "value": "Revenue growth."}]}Plaintext (pre-training)
{"text": "Raw text document for continued pre-training..."}Or use .txt files directly (one document per line).
Embedding
{"anchor": "What is Python?", "positive": "Python is a programming language."}
{"anchor": "What is Python?", "positive": "A programming language.", "negative": "A type of snake."}Audio
{"audio": "recording.wav", "messages": [{"role": "user", "content": "Transcribe."}, {"role": "assistant", "content": "Hello world."}]}ASR (new in v0.71.32)
{"audio": "clip.wav", "text": "the transcript"}For Whisper fine-tuning (task: asr): the clip becomes 16 kHz log-mel input features, the text becomes the decoder labels. Paths resolve against data.audio_dir (containment-checked).
Tool-calling (new in v0.25.0)
{"messages": [{"role": "user", "content": "Weather in Tokyo?"}], "tools": [{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}}}}], "tool_calls": [{"function": {"name": "get_weather", "arguments": "{\"city\": \"Tokyo\"}"}}]}Tool definitions are embedded in the system message during normalization and tool_calls are emitted as assistant turns. See the Tool-calling guide for the full pipeline.
The seven the page above does not show a row for
Nineteen formats are declared, and the twelve above are the ones you will meet first. These are the rest, one row each.
// prm — process reward, stepwise supervision
{"prompt": "Solve 2+2", "completions": ["First, add", "Result is 4"], "labels": [true, true]}
// pre_tokenized — skip the tokenize stage entirely
{"input_ids": [1, 2, 3], "labels": [-100, 2, 3], "attention_mask": [1, 1, 1]}
// input_output — template-free, per-segment loss control
{"segments": [{"text": "Q: hi", "label": false}, {"text": "A: hello", "label": true}]}
// video — the path string is kept as written; data.video_dir is not applied
{"video": "clip.mp4", "messages": [{"role": "user", "content": "Describe this clip."}]}
// multimodal — typed content parts, text / image / audio / video in one message
{"messages": [{"role": "user", "content": [{"type": "text", "text": "What's in this?"}, {"type": "image", "url": "x.png"}]}]}
// raft — Retrieval-Augmented Fine-Tuning, v0.62
{"query": "...", "golden_doc": "...", "distractor_docs": ["...", "..."], "answer": "..."}pre_tokenized pairs with data.tokenized_path after soup data preprocess. For raft, query, golden_doc and answer are required and distractor_docs is optional; a row with other key names is dropped.
And auto, the default, is the nineteenth. It sniffs the format from the first row, but only for the twelve formats with a section of their own higher up this page. The six in the block above must be named in data.format. prm, pre_tokenized, input_output and raft rows fail auto-detection with "Cannot detect format". video and multimodal rows carry messages, so auto-detection reads them as chatml: for video that drops the video path, and for multimodal it skips the content-part validation. One more pair to know: a sharegpt4v row has exactly the keys of a llava row, so auto-detection reads it as llava; name sharegpt4v if you mean it.
All data normalizes internally to {"messages": [...]} structure (+ "image" for vision, "audio" for audio, + "tools" for tool-calling).
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.