configscontains the deepspeed and accelerate configurations (modifialbe as per the system)loracontains the code for training model with LoRAseletktcontains the code for training model with SeleKT algorithm explained in our papersftcontains the code for training model with Full Supervised Finetuning
-
Download the both Instruction and Conversational variant dataset from huggingface
-
Run the
data_prep.pyscript with the corresponding data path for instruction-variant, this will fetch the commitpackft subset and create a complete dataset for instruction-tuningpython data_prep.py --commitpackft_mapping ../data/commitpackft_subset.csv --save_dir .This will save the final instruction dataset as
instruction_datasetwhich will be used in trainig for stage-1
- modify or replace the
general_acc.yamlfile as per the desired system configuration - set the
zero_optimization-stageto3andoverlap_commtofalseinds_configfor better memory optimizations - Add the respecitive variables like
MODEL_PATH,TRAIN_DATA,OUTPUT_DIRetc. in therun.shscript and run
bash ./sft/run.sh- modify or replace the
general_acc.yamlfile as per the desired system configuration - set the
zero_optimization-stageto2andoverlap_commtofalseinds_config - Add the respecitive variables like
MODEL_PATH,TRAIN_DATA,OUTPUT_DIRetc. in therun.shscript and run
bash ./lora/run.sh
lora/lora.pyusesuse_reentrant: Truefor gradient checkpointing, and this can allow using deepspeed zero-3 optimization for large models.
- modify or replace the
general_acc.yamlfile as per the desired system configuration - set the
zero_optimization-stageto3andoverlap_commtofalseinds_configfor better memory optimizations - Add the respecitive variables like
MODEL_PATH,TRAIN_DATA,OUTPUT_DIRetc. in therun.shscript and run
bash ./selekt/run.sh