add examples

This commit is contained in:
hiyouga 2024-03-05 03:16:35 +08:00
parent 9e56eaf2d3
commit 76f31b18eb
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,5 @@
Usage:
- `pretrain.sh`
- `sft.sh` -> `reward.sh` -> `ppo.sh`
- `sft.sh` -> `dpo.sh` -> `predict.sh`

View File

@ -0,0 +1,3 @@
Usage:
- `merge.sh` -> `quantize.sh`

View 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

View 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