Closed keviddles closed 6 months ago
On this line of the notebook:
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)
Remove the torch_dtype=torch.float16
part:
model = AutoModelForCausalLM.from_pretrained(model_name)
However, training on CPU is going to be very slow most likely unless you're working with a small model (like GPT-2-small or something). If you're using a modern model, I'd recommend using a cloud GPU service to train the vector, then exporting it to a .gguf
with the export_gguf
method and using it locally with a quantized model via llama.cpp (see https://github.com/ggerganov/llama.cpp/pull/5970). You can use any cloud GPU service like Colab Pro or Runpod, I use Runpod personally, renting a 3090 from them is $0.44/hr, so it shouldn't cost more than a couple dollars to train as many vectors as you need.
Appreciate the response and the feedback, @vgel ! Cheers.
I'm running through the
emotion.ipynb
notebook, running on the CPU.At cell
I see:
Some light googling indicates it may be related to running on CPU and using
float16
s but I've no idea where I'd update this.