XTuner - это простой, гибкий и полнофункциональный набор инструментов для тонкой настройки больших моделей (LLM, VLM) практически на всех GPU (от 7B LLM на 8 Gb VRAM до 70B+ на многоузловых GPU).
Обновление V0.1.22:
С учетом обновления XTuner поддерживает:
# It is recommended to build a Python-3.10 virtual environment using conda
conda create --name xtuner-env python=3.10 -y
conda activate xtuner-env
# Install XTuner from source
git clone https://github.com/InternLM/xtuner.git
cd xtuner
pip install -e '.[all]'
# Step 0, prepare the config
xtuner list-cfg
# Step 1, start fine-tuning
xtuner train ${CONFIG_NAME_OR_PATH}
# For example, we can start the QLoRA fine-tuning of InternLM2.5-Chat-7B with oasst1 dataset by
# On a single GPU
xtuner train internlm2_5_chat_7b_qlora_oasst1_e3 --deepspeed deepspeed_zero2
# On multiple GPUs
(DIST) NPROC_PER_NODE=${GPU_NUM} xtuner train internlm2_5_chat_7b_qlora_oasst1_e3 --deepspeed deepspeed_zero2
(SLURM) srun ${SRUN_ARGS} xtuner train internlm2_5_chat_7b_qlora_oasst1_e3 --launcher slurm --deepspeed deepspeed_zero2
# Step 2, convert the saved PTH model (if using DeepSpeed, it will be a directory) to Hugging Face model
xtuner convert pth_to_hf ${CONFIG_NAME_OR_PATH} ${PTH} ${SAVE_PATH}
@ai_machinelearning_big_data
#AI #FineTuning #LLM #XTuner #ML
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
👍23❤4🔥3