Skip to content
nju-websoftPublic

About

Finetuning Generative Large Language Models with Discrimination Instructions for Knowledge Graph Completion, ISWC 2024

Resources

Stars

35 stars

Watchers

2 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

DIFT

Finetuning Generative Large Language Models with Discrimination Instructions for Knowledge Graph Completion, ISWC 2024

requirements

pytorch==2.1.0
bitsandbytes==0.40.0
transformers==4.31.0
peft==0.4.0
accelerate==0.21.0
einops==0.6.1
evaluate==0.4.0
scikit-learn==1.2.2
sentencepiece==0.1.99
wandb==0.15.3

Dataset

download from here, extract the files, and move them to the corresponding folders.

Finetuning

FB15K237

bash script/train_fb.sh {TransE|SimKGC|CoLE}

WN18RR

bash script/train_wn.sh {TransE|SimKGC|CoLE}

Inference

bash script/eval.sh {FB15K237|WN18RR} {TransE|SimKGC|CoLE} {checkpoint_dir}

checkpoint_dir is the path of the folder to save the PEFT model, like "./output/FB15K237/2024xxxx-xxxxxx/checkpoint-xxxx/adapter_model"

checkpoints of the reported results are also provided.

About

Finetuning Generative Large Language Models with Discrimination Instructions for Knowledge Graph Completion, ISWC 2024

Resources

Stars

35 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages