From 21c4a43085095fe9b29d75d47b426662a5dfefd8 Mon Sep 17 00:00:00 2001 From: khazic Date: Sat, 13 Apr 2024 20:45:19 +0800 Subject: [PATCH 1/2] Added specimens for single-card full parameter prediction Former-commit-id: 47111ce506d2769bfa14b37b729d22b57796b26e --- examples/full_multi_gpu/predict.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/full_multi_gpu/predict.sh diff --git a/examples/full_multi_gpu/predict.sh b/examples/full_multi_gpu/predict.sh new file mode 100644 index 00000000..af94d0a8 --- /dev/null +++ b/examples/full_multi_gpu/predict.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +CUDA_VISIBLE_DEVICES=0 python ../../src/train_bash.py \ + --stage sft \ + --do_predict \ + --model_name_or_path meta-llama/Llama-2-7b-hf \ + --dataset alpaca_gpt4_en,glaive_toolcall \ + --dataset_dir ../../data \ + --template default \ + --finetuning_type full \ + --output_dir ../../saves/LLaMA2-7B/full/predict \ + --overwrite_cache \ + --overwrite_output_dir \ + --cutoff_len 1024 \ + --preprocessing_num_workers 16 \ + --per_device_eval_batch_size 1 \ + --max_samples 20 \ + --predict_with_generate From 652caa3cbd6ba1d6ce0a9bbb631318110567f800 Mon Sep 17 00:00:00 2001 From: khazic Date: Sat, 13 Apr 2024 20:50:49 +0800 Subject: [PATCH 2/2] Upgrade README.md Former-commit-id: fe5d3bb8f07902fbd3973a56dd73837a2c175a3d --- examples/README_zh.md | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/README_zh.md b/examples/README_zh.md index a77209b3..de4bc6e4 100644 --- a/examples/README_zh.md +++ b/examples/README_zh.md @@ -22,6 +22,7 @@ examples/ ├── full_multi_gpu/ │ ├── single_node.sh: 使用 DeepSpeed 进行单节点训练 │ └── multi_node.sh: 使用 DeepSpeed 进行多节点训练 +| └── predict.sh: 使用单卡做全参批量预测 ├── merge_lora/ │ ├── merge.sh: 将 LoRA 权重合并到预训练模型中 │ └── quantize.sh: 使用 AutoGPTQ 量化模型