LLaMA-Factory's draw is that you can fine-tune without writing code — a CLI and a Gradio web UI over more than a hundred supported models. The thing you do have to get right is registering your dataset, and that happens in one JSON file.
Everything goes through dataset_info.json
LLaMA-Factory does not infer your data's shape. Every dataset is registered in dataset_info.json under a name, and training refers to it by that name. The entry declares where the file is, which format it is in, and — crucially — how your column names map onto the ones the trainer expects.
This is more ceremony than Axolotl's inline YAML, and it buys the most explicit remapping system of any of these tools. The columns block accepts prompt, query, response, history, messages, system, tools, chosen, rejected, kto_tag, images, videos and audios.
The tags block then remaps the values inside a messages list — role_tag, content_tag, user_tag, assistant_tag, observation_tag, function_tag and system_tag. Between the two you can register almost any conversational data without touching the files.
{
"my_alpaca_data": {
"file_name": "train.json",
"columns": {
"prompt": "instruction",
"query": "input",
"response": "output",
"system": "system_prompt"
}
},
"my_chat_data": {
"file_name": "chats.jsonl",
"formatting": "sharegpt",
"columns": { "messages": "dialogue" },
"tags": {
"role_tag": "speaker",
"content_tag": "utterance",
"user_tag": "customer",
"assistant_tag": "agent"
}
},
"my_preference_data": {
"file_name": "prefs.json",
"ranking": true,
"columns": {
"prompt": "instruction",
"chosen": "good_answer",
"rejected": "bad_answer"
}
}
}
Preference and KTO data
Preference tuning needs "ranking": true on the dataset entry plus chosen and rejected columns. Without the ranking flag a DPO or reward-model run stops with a terse error — "The dataset is not applicable in the current training stage" — that never mentions the flag.
KTO data takes a different shape: a single completion per prompt plus a boolean in a column mapped to kto_tag. This is the cheaper annotation route — a thumbs up or down on one answer rather than a comparison between two — and worth considering if you are collecting feedback from real users, who will rate an answer far more readily than they will compare a pair.
Who it is for
The web UI is the real differentiator. If the people choosing hyperparameters are not the people who would write a training script, LLaMA-Factory lowers that barrier further than anything else in this category, and the breadth of supported model families is unusually wide.
Two practical notes. Check that the model you want is supported in the version you install rather than assuming the README's count covers it. And because configuration lives in a JSON registry rather than next to the run, keep that file in version control — it is the only record of how your data was interpreted.
Questions people ask
Can I load a dataset from the Hub instead of a local file?
Yes — use hf_hub_url in place of file_name in the registry entry. The column and tag mappings work identically, which is useful when a public dataset uses field names that do not match the defaults.
What happens if my column names already match the defaults?
You can omit the columns block entirely. An Alpaca-style file with instruction, input and output needs only file_name. The mapping layer exists for data you do not control.
Is the data portable to other frameworks?
The underlying files are, since they are ordinary JSON or JSONL — and because the mapping lives in the registry rather than in the data, nothing LLaMA-Factory-specific is baked in. The registry entry itself does not transfer; you would write the equivalent mapping in Axolotl's YAML or a formatting function for TRL.
Does it support multimodal data?
Yes — images, videos and audios columns are part of the mapping vocabulary, for the vision and audio language models among the supported families. Check the documentation for the exact per-row shape, which differs by model.