点击“Start开始微调

发布时间:2025-06-24 17:13:51  作者:北方职教升学中心  阅读量:837


点击“Start开始微调。微调模型。

pip install -e .[metrics,modelscope,qwen]。

下载地址(魔塔):https://modelscope.cn/models/LLM-Research/Meta-Llama-3-8B-Instruct/files。

安装依赖。

可在dataset中选择预先准备好的数据集进行微调。

新建虚拟环境。

五、

一、

1.微调训练后,点击“Export选项卡�切换到导出功能区域!

2.点击“Refresh adapters按钮,刷新lora模型,在左下拉列表中选择新训练的模型!

3.在“Max shard size(GB)最大size࿱设置在每个拆分模型中b;

4.在“Export dir设置模型保存的路径;

5.点击“Export按钮,开始导出模型(等待#xff09需要时间;;

存储模型空白处右键,点击git bash here,将llama3模型下载到本地。

Set USE MODELSCOPE HUB=1。
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121。为LLaMA-Factory配置环境。

四、安装llama模型文件。

pip install tensorboard。
pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.2.post2-py3-none-win_amd64.whl。

将其下载到本地。

以微调为中文模型的例子󿀌在下拉选项中选择后缀为zh的数据集。

conda create -n llama_factory python=3.10 -y。

github:hiyouga/LLaMA-Factory: Unify Efficient Fine-Tuning of 100+ LLMs (github.com)。

三、

设置环境变量。

python src/webui.py。

激活虚拟环境。

conda activate llama_factory。

因为文件大󿀌所以这个过程比较长󿀌保持打开下载窗口,知道下一个命令行的出现意味着下载已经完成。

进入LLAMA-Factory目录,将cmd输入路径,

在“Model name选择“LLAMA3-8B”Model path“填写Metata中的路径-Llama-3-8B-Instruct文件夹路径。

点击下载模型󿀌复制git命令:

git clone https://www.modelscope.cn/LLM-Research/Meta-Llama-3-8B-Instruct.git。

六、运行LLAMA-Factorywebui.py。

若顺利,以下网页(初始界面)将被打开。导出模型。

安装tensorboard。

执行代码。

二、并将车辆返回到目录位置的终端。安装LLAMA-Factory。