Fix warning for qlora (#2438)

This commit is contained in:
Forkoz 2023-05-30 09:09:18 -05:00 committed by GitHub
parent 0db4e191bd
commit 9ab90d8b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,7 +237,7 @@ def do_train(lora_name: str, always_override: bool, save_steps: int, micro_batch
yield "LoRA training with GPTQ models requires loading with `--monkey-patch`" yield "LoRA training with GPTQ models requires loading with `--monkey-patch`"
return return
elif not shared.args.load_in_8bit and shared.args.wbits <= 0: elif not (shared.args.load_in_8bit or shared.args.load_in_4bit) and shared.args.wbits <= 0:
yield "It is highly recommended you use `--load-in-8bit` for LoRA training. *(Will continue anyway in 2 seconds, press `Interrupt` to stop.)*" yield "It is highly recommended you use `--load-in-8bit` for LoRA training. *(Will continue anyway in 2 seconds, press `Interrupt` to stop.)*"
logger.warning("It is highly recommended you use `--load-in-8bit` for LoRA training.") logger.warning("It is highly recommended you use `--load-in-8bit` for LoRA training.")
time.sleep(2) # Give it a moment for the message to show in UI before continuing time.sleep(2) # Give it a moment for the message to show in UI before continuing