In short.
Together AI's data preparation guide explains training-file preparation for developers using its fine-tuning API, with server validation required even after local checks pass. It documents six JSONL formats, tokenized Parquet, message and sample weights, packing, uploads and validation datasets. Its strongest practical guidance concerns choosing training targets and waiting for ingestion to finish. Pricing, minimum SDK versions and model-quality outcomes are unknown, and the displayed dataset-splitting example needs attention before reuse.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete captured page at [https://docs.together.ai/docs/fine-tuning/data-preparation.md], including all six JSONL formats, weights, packing, Parquet fields, validation, upload readiness, file reuse and validation splitting. The Mintlify hosting attribution supplies no redistribution license. Linked pages, datasets, documentation indexes and scripts are excluded. No code or service operations were executed; runtime behavior, SDK compatibility, costs and model-quality outcomes remain unassessed.
The overview
identity
Data preparation is a Together AI documentation page about preparing files for its fine-tuning API. The original address is [https://docs.together.ai/docs/fine-tuning/data-preparation.md].
The resource explains dataset structure, training-loss controls, tokenization choices, validation and uploading. Its examples use the tg CLI, Python and TypeScript.
assessment
This is useful when you have training examples and need to turn them into files Together can ingest. It gives concrete field names and explains consequential defaults, including assistant-only training loss, automatic chat templates and enabled packing.
The distinction between local checks and server validation is especially useful: readable JSON and a successful upload do not establish training readiness. The page provides implementation guidance, but no execution results, training-quality measurements or evidence that fine-tuning will improve a particular application.
users
Beginners can use the conversational and prompt/completion examples to understand how individual training records are structured. Following the upload examples requires familiarity with JSON files and at least one of the illustrated programming or command-line interfaces.
Experienced developers get more detailed controls for preference pairs, tool calls, reasoning traces, message masking, sample weighting and pre-tokenized inputs. The guidance is specific to Together's API; compatibility with other providers is not assessed.
capabilities
The guide covers six JSONL structures: conversations using messages; instruction examples using prompt and completion; generic text using text; preference pairs using input, preferred_output and non_preferred_output; tool-calling conversations using messages and tools; and reasoning conversations with reasoning or reasoning_content on assistant messages.
Preference outputs must each contain exactly one assistant message. Tool-calling examples include function definitions, assistant tool_calls and tool-role results; for preference training, tools belongs inside input.
For reasoning models, the page says only the final assistant message is trained on by default. It recommends splitting multi-turn conversations into examples that each end at the intended assistant response, and warns that training reasoning models without reasoning data can degrade their reasoning ability.
Using it
requirements
JSONL uses one training example per line. A file must have an unambiguous format: the page says a file containing competing structures, such as both text and messages, is rejected. It specifies a 100 GB file limit and explicitly requires Parquet files to be below 100 GB.
Parquet requires input_ids and attention_mask. Labels and position_ids are optional. Local JSONL checks require UTF-8, parseable JSON and enough examples, but the numeric minimum sample count is not supplied.
The examples require a configured Together client or CLI. Python uses together, TypeScript uses together-ai, and the Parquet-loading example uses datasets. Installation, authentication setup, minimum package versions and a supported-model matrix are absent.
mechanism
Training loss measures the prediction error used to update the model. Conversational data trains on assistant messages by default, while instruction data trains on completion. Setting train_on_inputs=True includes the other inputs. Conversational per-message weight accepts only 0 or 1 to exclude or include a message; a root-level, non-negative sample weight scales the whole example across all JSONL formats.
When available, the model's chat template formats conversational data automatically. JSONL packing is enabled by default and combines short examples into windows up to max_seq_length. The guide says this increases effective batch size and reduces training steps and time, but supplies no measured performance results. Setting packing=false disables it for JSONL; that flag has no effect on Parquet.
Parquet supplies token IDs and masks directly. Labels default to input_ids, and -100 masks individual positions from loss. The trainer shifts labels internally, so the page says not to shift them yourself. For packed sequences, position_ids reset at example boundaries, with padding positions set to zero.
setup
Choose the task schema, prepare the file and run the documented local check, such as tg files check or Python check_file(). Upload with purpose fine-tune and retain the returned file ID. Python also supports an optional upload-progress callback.
Upload returns before ingestion finishes. Retrieve file metadata until processing_status is COMPLETED before using the file for training. INVALID_FORMAT indicates a dataset problem described through validation_report; the Python example also handles FAILED. The page identifies processing_status as the authoritative readiness signal because the validation-report schema may evolve.
Before starting a job, the guide recommends inspecting tokenization with tg fine-tuning preview. Files with identical existing contents reuse the existing file metadata and ID rather than creating a duplicate.
example
The page's per-message example is {"messages":[{"role":"user","content":"Question A","weight":0},{"role":"assistant","content":"Answer A","weight":1}]}. The user message supplies context without contributing training loss, while the assistant response contributes to training. A separate root-level weight can scale the entire record.
A complete file needs enough examples to meet the service's unspecified minimum and must pass server validation. To evaluate during training, the page shows supplying training_file and validation_file IDs and setting n_evals above zero. Evaluation loss appears in training metrics and, when configured with wandb_api_key, in W&B.
Assessment & evidence
limitations
Local checks cover basic file properties and JSON parsing, while full schema checks happen after upload. The guide does not specify the minimum example count, all model-specific restrictions or complete validation-report fields.
There is an unresolved example inconsistency: the general conversational rules require a system or user message first, but the preference example begins its input conversation with an assistant message. The page does not explain whether preference inputs are an exception.
The Bash splitting example appears faulty because it uses split_ratio=0.9 inside integer arithmetic expansion. Its head/tail split also takes consecutive records without shuffling or deduplicating them, so the example alone does not establish a representative validation set or prevent overlap between related examples.
reasoning
JSONL is the sensible starting point within this guide because the page recommends it for ordinary use and supplies readable task-specific examples. Parquet becomes relevant when you need custom attention masks or labels, a different tokenizer, or reusable pre-tokenized data.
Those choices change responsibility for preparation: Parquet requires you to supply token IDs and masks, while JSONL uses the service's formatting and tokenization path. Message masks and sample weights control training contribution, but the page gives no evidence that a particular weighting scheme improves model quality.
alternatives
The documented alternatives are primarily within Together's service. Conversational data suits chat exchanges, instruction data supplies prompt/completion pairs, generic text supports free-form completion, and preference data supplies preferred and less-preferred responses. JSONL and Parquet offer different levels of control over tokenization and training inputs.
For datasets without reasoning traces, the page recommends an instruct model instead of a reasoning model. Competing providers, external preparation tools and their relative costs or quality are not assessed.
evidence
The evidence is the complete captured Data preparation page at [https://docs.together.ai/docs/fine-tuning/data-preparation.md]. It contains schemas, examples and descriptions of intended service behavior.
No commands, uploads or fine-tuning jobs were executed. The page's examples therefore provide no observed runtime results, compatibility verification or model-quality measurements. Linked documentation, datasets and tokenization-script contents are outside this evidence.
Access & freshness
costs
The page provides no prices, billing units or total-cost examples. Upload, storage, validation and fine-tuning charges are unknown from this evidence.
It recommends local validation to avoid unnecessary charges and describes packing as reducing training time. Parquet can avoid repeating tokenization across jobs. Neither monetary savings nor a guarantee that rejected files incur no charges is established.
rights
The captured page states no redistribution license for its documentation or example code. Its Mintlify hosting attribution does not establish reuse permission.
The linked datasets are examples; their licenses and suitability for a particular training purpose are not established here. Model-license conditions, uploaded-data retention, confidentiality terms and ownership arrangements for fine-tuned models are also unknown from this page.
freshness
The page was captured at 2026-11-24T03:36:54.488Z. The supplied source revision is sha256:c743e268652edde0e3bc7dbdc3cbfc5291d12f3e1d7bde4b4e8e978af98a197e; this identifies the documentation snapshot, not an API or SDK release.
The text provides no publication date, last-update date or minimum SDK version. It explicitly warns that the validation_report schema may evolve. Compatibility beyond the captured documentation is unknown.
actions
Choose the training objective and model, then select the corresponding schema. Start with JSONL unless the documented Parquet controls are needed. Remove competing format fields, decide which messages should contribute loss, and include reasoning data when using a reasoning model.
Correct the decimal arithmetic before reusing the Bash split example, and review how records are divided between training and validation. Run local checks, upload the files, wait for COMPLETED and preview tokenization before creating a training job.
Confirm current model requirements, SDK compatibility, pricing and applicable data rights separately. Resolve the preference example's opening-role ambiguity before relying on that structure.
