Skip to content

gsni30/patchwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conda environment

conda create -n patchwork-env python=3.10 -y conda activate patchwork-env conda deactivate

Install packages

pip install -r requirements.txt

Download dataset:

https://drive.google.com/file/d/1S0SmU0WEw5okW_XvP2Ns0URflNzZq6sV/view

Fine-tune model

Edit the train_replay.sh

model_name_or_path: Path where model is placed.
data_path: Path of dataset.
dataset_name: List of tasks on which you want to fine-tune the model. output_dir: Path where you want to save the model.

Run:
cd fine-tuning bash train_replay.sh

To evaluate the fine-tuned models

Edit the infer_seq.sh.

data_path: Path to test dataset.
inference_tasks: Tasks on which you want to run ineference.
model_name_or_path: Path where model is placed.
inference_model_path: Path where model is placed.
tokenizer_model_path: Path where tokenizer is placed.
inference_output_path: Path where you want to save the ineference results.

Run bash infer_seq.sh

To evaluate the quantized fine-tuned models

Edit the infer_test.sh.

data_path: Path to test dataset.
inference_tasks: Tasks on which you want to run ineference.
model_name_or_path: Path where model is placed.
inference_model_path: Path where model is placed.
tokenizer_model_path: Path where tokenizer is placed.
inference_output_path: Path where you want to save the ineference results.

Run bash infer_test.sh

Quantizing the model

cd GPTQ In the quantize_gptq.py file Set pretrained_model_dir to the path of model you want to quantize.
Set quantized_model_dir to the path where the model should be saved.

Calculate delta compression

cd Delta_Compression
Run the patchwork_demo.ipynb notebook to calculate the delta between 2 models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors