xturing —— LLM 个性化微调工具

500次阅读
没有评论

xturing 为 LLM 提供了快速、高效和简单的微调,如 LLaMA、GPT-J、GPT-2、OPT、Cerebras-GPT、Galactica 等。通过提供一个易于使用的界面,再根据你自己的数据和应用来个性化 LLM,xTuring 使构建和控制 LLM 变得简单。整个过程可以在你的电脑内或在你的私有云中完成,确保数据的隐私和安全。

通过 xturing,你可以:

  • 从不同的来源摄取数据,并将其预处理成 LLM 可以理解的格式
  • 从单个 GPU 扩展到多个 GPU,以便更快地进行微调
  • 利用内存效率高的技术(即 LoRA 微调)来减少你的硬件成本,最多可减少 90% 的时间。
  • 探索不同的微调方法,并以它们为基准,找到性能最好的模型
  • 在明确定义的指标上评估微调模型,进行深入分析

CLI

xturing —— LLM 个性化微调工具

UI

xturing —— LLM 个性化微调工具

安装

pip install xturing

快速开始

from xturing.datasets import InstructionDataset
from xturing.models import BaseModel

# Load the dataset
instruction_dataset = InstructionDataset(“./alpaca_data”)

# Initialize the model
model = BaseModel.create(“llama_lora”)

# Finetune the model
model.finetune(dataset=instruction_dataset)

# Perform inference
output = model.generate(texts=[“Why LLM models are becoming so important?”])

print(“Generated output by the model: {}”.format(output))

 

 

Read More 

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 
评论(没有评论)
Generated by Feedzy