From 893745977776a9ef3fc9007411a3cd28641fcc3b Mon Sep 17 00:00:00 2001 From: Jasonqi146 Date: Fri, 13 Oct 2023 06:32:23 +0000 Subject: [PATCH] temporary save for switching disk region --- llm_ft/fastchat/train/train_lora.py | 4 +++- .../{mistral_qlora_train.sh => llama2-13b_qlora_train.sh} | 2 +- requirements.txt | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) rename llm_ft/{mistral_qlora_train.sh => llama2-13b_qlora_train.sh} (92%) diff --git a/llm_ft/fastchat/train/train_lora.py b/llm_ft/fastchat/train/train_lora.py index 40d50ac4..e138f73e 100644 --- a/llm_ft/fastchat/train/train_lora.py +++ b/llm_ft/fastchat/train/train_lora.py @@ -34,7 +34,7 @@ make_supervised_data_module, ) - +access_token = "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" @dataclass class TrainingArguments(transformers.TrainingArguments): @@ -137,6 +137,7 @@ def train(): ) if lora_args.q_lora else None, + token=access_token, ) lora_config = LoraConfig( r=lora_args.lora_r, @@ -176,6 +177,7 @@ def train(): model_max_length=training_args.model_max_length, padding_side="right", use_fast=False, + token=access_token, ) tokenizer.pad_token = tokenizer.unk_token diff --git a/llm_ft/mistral_qlora_train.sh b/llm_ft/llama2-13b_qlora_train.sh similarity index 92% rename from llm_ft/mistral_qlora_train.sh rename to llm_ft/llama2-13b_qlora_train.sh index 4356ab0c..2c90ffd6 100644 --- a/llm_ft/mistral_qlora_train.sh +++ b/llm_ft/llama2-13b_qlora_train.sh @@ -1,5 +1,5 @@ deepspeed fastchat/train/train_lora.py \ - --model_name_or_path ./Mistral-7B-v0.1 \ + --model_name_or_path meta-llama/Llama-2-13b-chat-hf \ --lora_r 8 \ --lora_alpha 16 \ --lora_dropout 0.05 \ diff --git a/requirements.txt b/requirements.txt index b49da7a8..e832163d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,4 +16,10 @@ datasets names together pydantic==1.10.12 -deepspeed \ No newline at end of file +deepspeed +bitsandbytes +scipy + +# for llama2 +sentencepiece +protobuf \ No newline at end of file