FastLoRAChat 项目安装与使用教程

FastLoRAChat 项目安装与使用教程

FastLoRAChatInstruct-tune LLaMA on consumer hardware with shareGPT data项目地址:https://gitcode.com/gh_mirrors/fa/FastLoRAChat

1. 项目目录结构及介绍

FastLoRAChat 项目的目录结构如下:

FastLoRAChat/
├── finetune_fastchat_lora.sh
├── finetune_lora.sh
├── generate.sh
├── lengths.ipynb
├── pyproject.toml
├── requirements.txt
├── README.md
└── ...

目录结构介绍

  • finetune_fastchat_lora.sh: 用于微调 Fastchat 模型的脚本。
  • finetune_lora.sh: 用于微调 LORA 模型的脚本。
  • generate.sh: 用于生成模型的脚本。
  • lengths.ipynb: 用于处理数据长度的 Jupyter Notebook。
  • pyproject.toml: 项目的配置文件,定义了项目的依赖和构建工具。
  • requirements.txt: 项目的依赖文件,列出了项目所需的所有 Python 包。
  • README.md: 项目的说明文件,包含了项目的介绍、安装和使用方法。

2. 项目的启动文件介绍

FastLoRAChat 项目的主要启动文件是 finetune_fastchat_lora.shfinetune_lora.sh。这两个脚本分别用于微调 Fastchat 和 LORA 模型。

finetune_fastchat_lora.sh

该脚本用于微调 Fastchat 模型,具体步骤如下:

  1. 克隆 Fastchat 项目:

    git clone https://github.com/lm-sys/FastChat.git
    cd FastChat
    
  2. 切换到指定分支:

    git checkout 4732169b937acc1b0ecb3f88656f9097f33ae841
    
  3. 安装依赖:

    pip install -e .
    
  4. 克隆 transformers 项目:

    git clone https://github.com/huggingface/transformers.git
    cd transformers
    
  5. 切换到指定分支:

    git checkout 41a2f3529c6b56866c317031375ffd3e7b8bea01
    
  6. 安装依赖:

    pip install -e .
    

finetune_lora.sh

该脚本用于微调 LORA 模型,具体步骤与 finetune_fastchat_lora.sh 类似,主要区别在于使用的模型和数据集。

3. 项目的配置文件介绍

FastLoRAChat 项目的主要配置文件是 pyproject.tomlrequirements.txt

pyproject.toml

该文件定义了项目的依赖和构建工具,内容如下:

[tool.poetry]
name = "FastLoRAChat"
version = "0.0.1"
description = "LLama finetune using LORA with ShareGPT dataset"
authors = ["Shadow Walker <shadow.walker@example.com>"]

[tool.poetry.dependencies]
python = "^3.8"
fastchat = "^0.0.1"
transformers = "^4.0.0"

[tool.poetry.dev-dependencies]
pytest = "^5.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

requirements.txt

该文件列出了项目所需的所有 Python 包,内容如下:

fastchat==0.0.1
transformers==4.0.0
pytest==5.2

通过以上配置文件,可以确保项目在不同环境中的一致性和可重复性。

FastLoRAChatInstruct-tune LLaMA on consumer hardware with shareGPT data项目地址:https://gitcode.com/gh_mirrors/fa/FastLoRAChat

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

云含荟Gilbert

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值