Upstage NLP competition dataset(dialogue summarization)
# clone project
git clone https://github.com/DimensionSTP/upstage-nlp.git
cd upstage-nlp
# [OPTIONAL] create conda environment
conda create -n myenv python=3.10 -y
conda activate myenv
# install requirements
pip install -r requirements.txtPROJECT_DIR={PROJECT_DIR}
CONNECTED_DIR={CONNECTED_DIR}
DEVICES={DEVICES}
HF_HOME={HF_HOME}
USER_NAME={USER_NAME}- end-to-end
python main.py mode=tune is_tuned=untuned num_trials={num_trials}- end-to-end
python main.py mode=train is_tuned={tuned or untuned} num_trials={num_trials}- end-to-end
python main.py mode=test is_tuned={tuned or untuned} num_trials={num_trials} epoch={ckpt epoch}- end-to-end
python main.py mode=predict is_tuned={tuned or untuned} num_trials={num_trials} epoch={ckpt epoch}
python merge_predictions.py is_tuned={tuned or untuned} num_trials={num_trials} epoch={ckpt epoch}
python decode_predictions.py is_tuned={tuned or untuned} num_trials={num_trials} epoch={ckpt epoch}- full preprocessing
bash scripts/preprocess.sh- dataset preprocessing
bash scripts/preprocess_dataset.sh- train
bash scripts/train.sh- predict
bash scripts/predict.sh- pure decoder based LLM QLoRA 4-bit quantization option
quantization_type={origin or quantization} - pure decoder based LLM LoRA or QLoRA PEFT option
peft_type={origin or lora}- for LLM fine-tuning in multi-GPU, recommended
strategy={deepspeed_stage_2 or deepspeed_stage_2_offload or deepspeed_stage_3 or deepspeed_stage_3_offload}- upload user name and model name at HuggingFace Model card
upload_user={upload_user}
model_type={model_type}- Set data and target max length for model training and generation
data_max_length={data_max_length}
target_max_length={target_max_length} If you want to change main config, use --config-name={config_name}.
Also, you can use --multirun option.
You can set additional arguments through the command line.