News for hackers. Stuff that matters.
Re:QLoRA: Efficient Finetuning of Quantized LLMs by MacsHeadroom on Wednesday May 24, 2023 @11:09PM (#36066677)
load_in_4bit requires storing a fully unquantized model as well as having enough RAM to load the unquantized model.

If you're an enthusiast with 10 models downloaded, do you want that taking up 500GB or 150GB? Do you want to need 64GB of RAM to load a model, or just 16GB?

That's the main reason for the popularity of pre-quantization.

Re:QLoRA: Efficient Finetuning of Quantized LLMs by amilios on Thursday May 25, 2023 @07:39AM (#36069448)
Does it? I loaded Guanaco-65B on a 48GB graphics card using the new flag and it loaded just fine. I don't think the unquantized model fits on a 48GB card. So I'm not quite sure if this is true.
Re:QLoRA: Efficient Finetuning of Quantized LLMs by MacsHeadroom on Thursday May 25, 2023 @08:30AM (#36069926)
RAM, not VRAM. The model is fully loaded into (regular, system) RAM then quantized while being loaded into VRAM.

So you still need enough system RAM (or RAM+Swap) to load the unquantized model.

Re:QLoRA: Efficient Finetuning of Quantized LLMs by dTal on Thursday May 25, 2023 @04:48PM (#36076014)
Why would it need to be loaded fully into system RAM at once? Couldn't it be quantized on the fly, as it's being read from disk?
Re:QLoRA: Efficient Finetuning of Quantized LLMs by MacsHeadroom on Thursday May 25, 2023 @05:58PM (#36076825)
I'm not sure it could be for this complex quantization scheme. It's not a simple round to nearest quantization. Even if it is possible, it would require someone to develop that functionality. Currently it does load the entire unquantized model into RAM first.
Re:QLoRA: Efficient Finetuning of Quantized LLMs by emikulic on Friday May 26, 2023 @11:40PM (#36091887)
Last time I looked into this, the answer was "because huggingface transformers and torch.load are written to do it this way"

You could absolutely do something streaming, or mmap the weights instead of loading them into system RAM. Just the default interfaces don't.