qlora merge and load requires that base model isn't loaded in 4 or 8 bit

This commit is contained in:
Wing Lian
2023-05-25 22:39:13 -04:00
parent 34c99f9812
commit 3f6017db9e

View File

@@ -24,7 +24,7 @@
## Quickstart ⚡ ## Quickstart ⚡
**Requirements**: Python 3.9. **Requirements**: Python 3.9.
```bash ```bash
git clone https://github.com/OpenAccess-AI-Collective/axolotl git clone https://github.com/OpenAccess-AI-Collective/axolotl
@@ -45,7 +45,7 @@ accelerate launch scripts/finetune.py examples/4bit-lora-7b/config.yml \
### Environment ### Environment
- Docker - Docker
```bash ```bash
docker run --gpus '"all"' --rm -it winglian/axolotl:main docker run --gpus '"all"' --rm -it winglian/axolotl:main
``` ```
@@ -332,7 +332,7 @@ seed:
### Accelerate ### Accelerate
Configure accelerate Configure accelerate
```bash ```bash
accelerate config accelerate config
@@ -363,12 +363,18 @@ Pass the appropriate flag to the train command:
### Merge LORA to base ### Merge LORA to base
Add below flag to train command above Add below flag to train command above (and using LoRA)
```bash ```bash
--merge_lora --lora_model_dir="./completed-model" --merge_lora --lora_model_dir="./completed-model"
``` ```
Add below flag to train command above (and using QLoRA)
```bash
--merge_lora --lora_model_dir="./completed-model" --load_in_8bit False --load_in_4bit False
```
## Common Errors 🧰 ## Common Errors 🧰
> Cuda out of memory > Cuda out of memory
@@ -383,7 +389,7 @@ Please reduce any below
Try set `fp16: true` Try set `fp16: true`
## Need help? 🙋‍♂️ ## Need help? 🙋‍♂️
Join our [Discord server](https://discord.gg/HhrNrHJPRb) where we can help you Join our [Discord server](https://discord.gg/HhrNrHJPRb) where we can help you
## Contributing 🤝 ## Contributing 🤝