Environment Setup
Environment Setup
CUDA Installation (Skip if already installed; version 12.4 or higher is required): LLaMA Factory
It is recommended to use
uv
to install dependencies — it’s a very fast Python environment manager. After installinguv
, you can create a new Python environment and install the dependencies using the following command (note: this does not include dependencies for audio cloning functionality):
Tip
If you want to fine-tune using the latest models, you need to manually install the latest version of LLaMA Factory: At the same time, other dependencies may also need to be updated, such as
vllm
,pytorch
, andtransformers
.
Copy the configuration file template and rename it to
settings.jsonc
. All subsequent configuration changes should be made in this file.
Note Training and inference-related configurations are all managed in the
settings.jsonc
file.
Use the following command to test whether the CUDA environment is properly configured and recognized by PyTorch (not required for Mac):
(Optional) Install FlashAttention to accelerate training and inference:
Last updated