Your data or a sample dataset
Ask the owner which. Their own data (a file or a Hugging Face link) is what teaches the model their task; the rest of this page is about preparing it. Sample datasets, which every account can train on, are for trying the service or a model without preparing data:max_seq_len (they would be truncated: pick the model’s long-context id, such as ...-256k, or accept it).
source says where each comes from. The ones marked validation are held-out sets: pass one as val_dataset_id
with the training set of the same name. Sample datasets hold tens of millions of tokens, so a full epoch is costly:
cap a trial with max_steps and show the owner the estimate.
The format
A dataset is a JSONL file: UTF-8, one JSON object per line, at most 32 MB a line and 10 GB a file.- Roles are
system,user,assistant, andtoolwith tool calls (below). At most one system message, and only first. - At least one non-empty assistant message.
contentis a string, or OpenAI content parts:{"type": "text", "text": ...}, and in user messages image and video parts (Images and videos). Audio is refused.
messages (by to_messages / write_jsonl locally, and by the server on upload):
A top-level
"system" or "system_prompt" string becomes the system message. Hugging Face datasets in these formats
import directly (import_huggingface), no conversion needed. Values must be strings (an "answer": 7 is refused:
write "7").
What training learns from
Checked against Qwen3.8-27B’s training template; the other models follow the same rules. Whether a model has a thinking mode shows in its chat template (chat_template.jinja in a checkpoint): no <think> there, no think block.
- Every assistant message is trained, in every turn of a multi-turn sample, including its end-of-turn token. System and user messages are context only.
- Reasoning: jobs train in non-thinking mode. An assistant message without reasoning is trained as
<think>\n\n</think>\n\n+ the answer, so the model learns to answer directly. To train reasoning, put it in the assistant content as<think>\n...\n</think>\n\nfollowed by the answer; it is kept and trained. Serve the checkpoint the same way (see Checkpoints).qwen4-35b-a3blays this out as its own chat template does: a first system turnReasoning effort is set to off., then<think></think>+ the answer (write reasoning as<think>...</think>+ the answer). - Long samples: a sample longer than the job’s
max_seq_lenkeeps its lastmax_seq_lentokens (the start of the conversation is cut).params={"truncation_side": "right"}keeps its first tokens instead; then a reply that lies past the limit is not trained (a long question with its answer at the end trains no token). The job’s notices say how many were cut. Samples with images or videos are never cut. - Several samples are packed into one row for speed; attention stays within each sample.
Build and check locally
From a file (.csv, .jsonl, .json) to train.jsonl + val.jsonl, shuffled, unusable rows left out and counted:
--prompt-column to join several columns into the user message (blank line between, empty ones skipped), e.g.
--prompt-column question --prompt-column context.
(prepare_file(...) in nextron_cloud.data does the same from Python.) Without the column options, each row must
already be in one of the formats above. Read skipped and errors in its output before uploading.
For anything else, build the rows yourself:
write_jsonlraises on the first bad sample with its number. To skip bad rows instead, callto_messagesper row and catchValueError.check_filereports the first five errors with line numbers, like the server.- pandas:
write_jsonl(df.to_dict("records"), path)when the columns are one of the formats above; otherwise build{"messages": [...]}per row, as in this CSV example (columnsticket,reply):
- Hugging Face
datasets:write_jsonl(ds, path)works the same way (rows are dicts). - Shuffle before splitting off a validation set, so both come from the same distribution.
Upload or import
org/name; gated or private ones need hf_token=. The split must already be in
one of the formats above; otherwise download it, convert with write_jsonl and upload.
What the server reports
After its check,dataset has:
samples,est_tokens(the largest token count over the models; the estimate uses it),too_long(samples over 65,536 tokens for at least one model).tokens[model]:totaltokens,max(the longest sample), andover: how many samples are longer than eachmax_seq_lena job can pick (32768, 65536, 131072, 262144, 1048576; a dataset checked before a length was added has no count for it). Comparemaxandoverwith the model’smax_seq_lenfromclient.models()to see what would be truncated.estimated: true for a file over 50 MB. Its counts come from one sample in 100 (tokens[model].estimatedis true):totalandoverare scaled up,maxis the longest sample among those. The first job on a model measures every sample in that model’s tokens before it starts: it staysqueuedabout a minute for a few hundred MB (about ten for 7 GB), then starts, or fails with the reason if the exact lengths do not pass a check the estimate passed. After thattokens[model]is exact. Until thenjobs.estimatereturnssteps=Nonefor that model.converted_from: the format it was converted from, if any.datasets.download_url(id)gives the file exactly as training reads it.
val_dataset_id; upload it like the training set. One
with images or videos goes with a training set that has images (Images and videos). The
validation flag only marks the validation sets among the sample datasets and is false on your own uploads, which is
fine.
Limits: 50 datasets an account (delete old ones with datasets.delete), validation sets at most 5,000 samples. Sample
datasets (sample=True in datasets.list()) can be trained on by every account and cannot be deleted.
Images and videos
Samples may hold images and videos on some models: the format, limits, video settings and their cost are in Images and videos.Tool calls
A chat sample may use tools, in OpenAI’s chat format. One dataset trains any model that takes tools:nextron-cloud models lists them with "tools": true (Qwen4-35B-A3B, Qwen3.8 and Qwen3.5/3.6, DeepSeek-V4.1-Flash,
Olmo-3-7B except Think). A job on another model refuses a dataset with tool calls.
tools: every function a call names must be listed.argumentsis an object or a JSON string.- An assistant message may make several calls; a
toolmessage answers one, in order or bytool_call_id. - Training lays the sample out in the model’s own tool format (Qwen’s
<tool_call><function=...>, DeepSeek’s DSML, Olmo’s<function_calls>), exactly as its chat template does. Loss is on the assistant’s calls and answers, never on the tool results. - Converted on upload, as the other formats are: Ai2 / Dolci rows (
functionson the system message,function_callsas Python calls,environmentresults; Olmo trains on these exactly as written), ShareGPT tool rows (function_callandobservationturns, withtools) and Hermes rows (<tool_call>JSON in the assistant’s text, tools in the system’s<tools>...</tools>). - RFT prompts and DPO pairs take
toolsthe same way (on the models that take tools). The prompt may end with a tool’s result instead of the user’s turn, and a DPO reply may be an assistant message withtool_calls:{"tools": [...], "messages": [...], "chosen": {"role": "assistant", "tool_calls": [...]}, "rejected": "..."}. - A Serverless RL run takes tools in the prompts you sample (Serverless RL).
- Not yet: tools in samples with images or videos.