+
95
-

回答

完整的流程

安装依赖包

!pip install autotrain-advanced
!pip install huggingface_hub

800_auto如果是在 Google Colab上运行还要执行下面的命令

!autotrain setup --update-torch
HuggingFace 登录,获取token

800_auto

from huggingface_hub import notebook_login

notebook_login()

800_auto

输入token

最后微调命令!autotrain llm --train --project_name your_project_name --model TinyPixel/Llama-2-7B-bf16-sharded --data_path your_data_set --use_peft --use_int4 --learning_rate 2e-4 --train_batch_size 2 --num_train_epochs 3 --trainer sft --model_max_length 2048 --push_to_hub --repo_id your_repo_id -

800_auto

具体可以看:https://huggingface.co/autotrain

https://github.com/huggingface/autotrain-advanced

网友回复

我知道答案,我要回答