|
#!/bin/bash |
|
|
|
|
|
source /media/nmitchko/NVME/text-generation-webui/venv/bin/activate |
|
CURRENTDATEONLY=`date +"%b %d %Y"` |
|
|
|
|
|
sudo nvidia-smi -i 1 -pl 250 |
|
sudo nvidia-smi -i 0 -pl 250 |
|
|
|
export CUDA_VISIBLE_DEVICES=0,1 |
|
|
|
accelerate launch --num_processes 2 qlora.py \ |
|
--ddp_find_unused_parameters False \ |
|
--model_name_or_path /media/nmitchko/NVME/text-generation-webui/models/codellama_CodeLlama-34b-hf \ |
|
--output_dir /media/ai/blk/loras/i2b2training \ |
|
--logging_steps 100 \ |
|
--save_strategy steps \ |
|
--data_seed 42 \ |
|
--save_steps 200 \ |
|
--save_total_limit 40 \ |
|
--evaluation_strategy steps \ |
|
--eval_dataset_size 1024 \ |
|
--max_eval_samples 1000 \ |
|
--per_device_eval_batch_size 2 \ |
|
--per_device_train_batch_size 2 \ |
|
--trust_remote_code True \ |
|
--use_auth_token False \ |
|
--max_new_tokens 32 \ |
|
--dataloader_num_workers 2 \ |
|
--group_by_length \ |
|
--logging_strategy steps \ |
|
--remove_unused_columns False \ |
|
--do_train \ |
|
--lora_r 64 \ |
|
--lora_alpha 16 \ |
|
--lora_modules all \ |
|
--double_quant \ |
|
--quant_type nf4 \ |
|
--bf16 \ |
|
--bits 4 \ |
|
--legacy=False \ |
|
--warmup_ratio 0.03 \ |
|
--lr_scheduler_type constant \ |
|
--gradient_checkpointing \ |
|
--dataset="i2b2.json" \ |
|
--dataset_format alpaca \ |
|
--trust_remote_code=True \ |
|
--source_max_len 16 \ |
|
--target_max_len 512 \ |
|
--per_device_train_batch_size 2 \ |
|
--gradient_accumulation_steps 16 \ |
|
--max_steps 4500 \ |
|
--eval_steps 1000 \ |
|
--learning_rate 0.0001 \ |
|
--adam_beta2 0.999 \ |
|
--max_grad_norm 0.3 \ |
|
--lora_dropout 0.05 \ |
|
--weight_decay 0.0 \ |
|
--seed 0 > "${CURRENTDATEONLY}-finetune-i2b2.log" & |
|
|
|
|
|
|
|
|
|
|
|
deactivate |
|
|