Web-UI
Currently, SWIFT already supports graphical training and inference. The parameters are the same as those supported in script training. After installing SWIFT, use the following command:
swift web-ui --lang zh/en
Enable interface training and inference.
The SWIFT web-ui is a high-level encapsulation of the command line. That is, tasks such as training and deployment launched on the interface will start an independent process in the system via the command line. The pseudocode is similar to:
import os
os.system('swift sft --model xxx --dataset xxx')
This brings several features to the web-ui:
Each hyperparameter description in the web-ui is marked with
--xxx, which is consistent with the content of command line arguments.The web-ui can start multiple training/deployment tasks in parallel on a multi-GPU machine
After the web-ui service is shut down, the background service still runs. This prevents the training process from being affected when the web-ui is turned off. If you need to shut down the background service, simply select the corresponding task and then click "Kill Service" in the
Runtimetab on the interface.After restarting the web-ui, if you need to display the running services, click
Recover Runtime Tasksin theRuntimetab.The training interface supports displaying the running log. Please manually click
Show Running Statusafter selecting a task. During training, the running status supports displaying training charts. The charts include basic indicators such as training loss, training accuracy, and learning rate. In the human alignment task, the interface charts show key indicators such as margin and logps.The training of web-ui does not support PPO. This process is relatively complex. It is recommended to directly run the shell script in examples.
If you need to use the share mode, please add the --share true parameter. Note: Please do not use this parameter in environments such as dsw and notebook.
Currently, ms-swift additionally supports the interface inference mode (i.e., Space deployment):
swift app --model '<model>' --studio_title My-Awesome-Space --stream true
# 或者
swift app --model '<model>' --adapters '<adapter>' --stream true
You can start an application with only the inference page. This application will deploy the model at startup and make it available for subsequent use.