重要声明

当时尝试微调模型是为了了解【特定领域模型微调的实际工作流程】,在进行实际的微调工作时,为了方便和网友交流,因此 jupyter notebook 中均使用英文。但遣词造句均比较基础,如果阅读实在困难,可以使用翻译插件。就改回来了,实在实在厌恶重复工作。

 

准备工作

首先声明一些重要且必须要做的准备基础工作如下。且需要注意,在安装软件时,需要严格注意【软件版本】,之前试过由于软件版本不同导致的计算数值差异:

  1. Nvidia Driver and Cuda toolkit: choose a proper driver for your Nvidia GPU and installcuda 12.4 toolkit
  2. Anaconda: we need this to create virtual environment with python3.10, and install PyTorch and Unsloth
  3. git and cmake: when we save finetuned model into gguf format, we need to callsave_pretrained_gguf()method and the method will clonellama.cppfrom github and compile it. you can download it from thegit offical siteandcmake offical siteand append their bin folders after windows'path
  4. ollama and Page Assist: we use ollama to run finetuned model and Page Assist for a friendly UI. You can download ollama ->hereand install Page Assist from ->here
  5. Triton wheel for python 3.10: if you are using a windows pc, you will need to download thetriton-windows-buildsand install it later viapip install triton-3.0.0-cp310-cp310-win_amd64.whl

 

Jupyter Note 笔记内容:

笔记下载: Download

我在笔记中已经写得非常详细,具体内容请【展开】后详细阅读: