feat: remove need to add load_in* during merge (#1017)
Browse files- README.md +2 -2
- src/axolotl/cli/merge_lora.py +9 -1
README.md
CHANGED
@@ -996,7 +996,7 @@ When you include these tokens in your axolotl config, axolotl adds these tokens
|
|
996 |
### Inference Playground
|
997 |
|
998 |
Axolotl allows you to load your model in an interactive terminal playground for quick experimentation.
|
999 |
-
The config file is the same config file used for training.
|
1000 |
|
1001 |
Pass the appropriate flag to the inference command, depending upon what kind of model was trained:
|
1002 |
|
@@ -1027,7 +1027,7 @@ Please use `--sample_packing False` if you have it on and receive the error simi
|
|
1027 |
Add below flag to train command above
|
1028 |
|
1029 |
```bash
|
1030 |
-
python3 -m axolotl.cli.merge_lora examples/your_config.yml --lora_model_dir="./completed-model"
|
1031 |
```
|
1032 |
|
1033 |
If you run out of CUDA memory, you can try to merge in system RAM with
|
|
|
996 |
### Inference Playground
|
997 |
|
998 |
Axolotl allows you to load your model in an interactive terminal playground for quick experimentation.
|
999 |
+
The config file is the same config file used for training.
|
1000 |
|
1001 |
Pass the appropriate flag to the inference command, depending upon what kind of model was trained:
|
1002 |
|
|
|
1027 |
Add below flag to train command above
|
1028 |
|
1029 |
```bash
|
1030 |
+
python3 -m axolotl.cli.merge_lora examples/your_config.yml --lora_model_dir="./completed-model"
|
1031 |
```
|
1032 |
|
1033 |
If you run out of CUDA memory, you can try to merge in system RAM with
|
src/axolotl/cli/merge_lora.py
CHANGED
@@ -18,7 +18,15 @@ def do_cli(config: Path = Path("examples/"), **kwargs):
|
|
18 |
return_remaining_strings=True
|
19 |
)
|
20 |
parsed_cli_args.merge_lora = True
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
do_merge_lora(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
24 |
|
|
|
18 |
return_remaining_strings=True
|
19 |
)
|
20 |
parsed_cli_args.merge_lora = True
|
21 |
+
|
22 |
+
parsed_cfg = load_cfg(
|
23 |
+
config,
|
24 |
+
merge_lora=True,
|
25 |
+
load_in_8bit=False,
|
26 |
+
load_in_4bit=False,
|
27 |
+
flash_attention=False,
|
28 |
+
**kwargs
|
29 |
+
)
|
30 |
|
31 |
do_merge_lora(cfg=parsed_cfg, cli_args=parsed_cli_args)
|
32 |
|