forked from hiyouga/ChatGLM-Efficient-Tuning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Fix the bug that occurred when enabling quantization during RM tra…
…ining that caused a compliance requirement 2. downgrade torch version to 1.13.1 to avoid unnecessary Installation 3. add some useful comments in readme 4. add a finetune example which enables quant and uses local base model
- Loading branch information
Showing
5 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
CUDA_VISIBLE_DEVICES=0 python ../src/finetune.py \ | ||
--do_train \ | ||
--dataset alpaca_gpt4_zh \ | ||
--dataset_dir ../data \ | ||
--finetuning_type lora \ | ||
--output_dir path_to_checkpoint \ | ||
--overwrite_cache \ | ||
--per_device_train_batch_size 4 \ | ||
--gradient_accumulation_steps 4 \ | ||
--lr_scheduler_type cosine \ | ||
--logging_steps 10 \ | ||
--save_steps 1000 \ | ||
--learning_rate 5e-5 \ | ||
--num_train_epochs 1.0 \ | ||
--fp16 \ | ||
--quantization_bit 8 \ | ||
--model_name_or_path path_to_base_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
torch>=2.0.0 | ||
torch>=1.13.1 | ||
protobuf | ||
cpm_kernels | ||
sentencepiece | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters