stochasticai / xTuring

Build, customize and control you own LLMs. From data pre-processing to fine-tuning, xTuring provides an easy way to personalize open-source LLMs. Join our discord community: https://discord.gg/TgHXuSJEk6
https://xturing.stochastic.ai
Apache License 2.0
2.6k stars 206 forks source link

Quickstart script abruptly terminating #173

Closed exwhyz closed 1 year ago

exwhyz commented 1 year ago

Running on Windows 11, WSL2 (Intel Core i7 CPU)

Downloaded and unzipped the alpaca dataset in ./ptds folder

When running the quickstart script:

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

dataset = InstructionDataset("./ptds/alpaca_data")
model = BaseModel.create("llama_lora")
model.finetune(dataset=dataset)
output = model.generate(texts=["Why LLM models are becoming so important?"])
model.save("llama_lora_finetuned")

It processes the alpaca data set successfully, and then after some time ends abruptly with the following messages:

WARNING: CUDA is not available, using CPU instead, can be very slow
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████| 33/33 [00:19<00:00,  1.70it/s]
trainable params: 4194304 || all params: 6742609920 || trainable%: 0.06220594176090199
trainable params: 4194304 || all params: 6742609920 || trainable%: 0.06220594176090199
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Killed
Toan-Do commented 1 year ago

Hi @exwhyz ,

The log shows that you are using CPU to fine-tune LLaMA LoRA model and your RAM is not enough then it crashes. You should use GPU machine to do the fine-tuning experiments.