WebUI¶
LLaMA-Factory supports zero-code fine-tuning of large language models through WebUI. After completing installation, you can enter the WebUI with the following command:
llamafactory-cli webui
The WebUI is mainly divided into four interfaces: Training, Evaluation & Prediction, Chat, and Export.
Training¶
Before starting to train the model, the parameters you need to specify include:
Model name and path
Training stage
Fine-tuning method
Training dataset
Training parameters such as learning rate, number of training epochs
Fine-tuning parameters and other parameters
Output directory and configuration path
Then, you can click the Start button to begin training the model.
Note
About checkpoint resumption: Adapter checkpoints are saved in the output_dir directory. Please specify the adapter path to load the checkpoint and continue training.
If you need to use a custom dataset, please add the custom dataset description in data/data_info.json and ensure the dataset format is correct, otherwise training may fail.
Evaluation, Prediction, and Chat¶
After model training is complete, you can evaluate on a specified dataset by specifying the paths of the model and adapter in the Evaluation & Prediction interface.
You can also observe the effect by specifying the model, adapter, and inference engine in the Chat interface, then entering dialogue content to chat with the model.
Export¶
If you are satisfied with the model’s performance and need to export the model, you can export it by clicking the Export button after specifying parameters such as model, adapter, chunk size, export quantization level and calibration dataset, export device, export directory in the Export interface.