mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-02 03:32:50 +08:00
add examples
Former-commit-id: 76f31b18eb4d3724f96ea1bad10073677daee36d
This commit is contained in:
parent
eeb34e5696
commit
8cf9842f7a
5
examples/lora_single_gpu/README.md
Normal file
5
examples/lora_single_gpu/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
Usage:
|
||||
|
||||
- `pretrain.sh`
|
||||
- `sft.sh` -> `reward.sh` -> `ppo.sh`
|
||||
- `sft.sh` -> `dpo.sh` -> `predict.sh`
|
3
examples/merge_lora/README.md
Normal file
3
examples/merge_lora/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
Usage:
|
||||
|
||||
- `merge.sh` -> `quantize.sh`
|
10
examples/merge_lora/merge.sh
Normal file
10
examples/merge_lora/merge.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
python ../../src/export_model.py \
|
||||
--model_name_or_path meta-llama/Llama-2-7b-hf \
|
||||
--adapter_name_or_path ../../saves/LLaMA2-7B/lora/sft \
|
||||
--template default \
|
||||
--finetuning_type lora \
|
||||
--export_dir ../../models/llama2-7b-sft \
|
||||
--export_size 2 \
|
||||
--export_legacy_format False
|
10
examples/merge_lora/quantize.sh
Normal file
10
examples/merge_lora/quantize.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
python ../../src/export_model.py \
|
||||
--model_name_or_path ../../models/llama2-7b-sft \
|
||||
--template default \
|
||||
--export_dir ../../models/llama2-7b-sft-int4 \
|
||||
--export_quantization_bit 4 \
|
||||
--export_quantization_dataset ../../data/c4_demo.json \
|
||||
--export_size 2 \
|
||||
--export_legacy_format False
|
Loading…
x
Reference in New Issue
Block a user