ZJU-DAILY/PromptEM

★ 27⑂ 5

Code for the paper "PromptEM: Prompt-tuning for Low-resource Generalized Entity Matching". VLDB 2023.

About ZJU-DAILY/PromptEM

ZJU-DAILY/PromptEM is an open-source project on GitHub, mainly written in Python. Code for the paper "PromptEM: Prompt-tuning for Low-resource Generalized Entity Matching". VLDB 2023. It currently holds 27 stars and 5 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository ZJU-DAILY/PromptEM · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

PromptEM: Prompt-tuning for Low-resource Generalized Entity Matching

PromptEM is a novel low-resource GEM (Generalized Entity Matching) solution powered by prompt-tuning and self-training. To address the gap between pre-training and fine-tuning, we cast GEM as a cloze-style task and design the GEM-specific prompt-tuning, which can stimulate the rich knowledge distributed in LMs. To select high-quality pseudo-labels, we develop a lightweight uncertainty-aware self-training method to boost performance. To further avoid expensive self-training, we prune useless training data dynamically using the proposed MC-EL2N, making the self-training process more lightweight and efficient.

For more technical details, see PromptEM: Prompt-tuning for Low-resource Generalized Entity Matching.

The illustration of fine-tuning and prompt-tuning.

Datasets

We use eight real-world benchmark datasets with different structures from Machamp and Geo-ER.

Quick Start

To train and evaluate with PromptEM.

python main.py [] [-h | --help]

e.g.

python main.py -d=rel-heter -k=0.1 -st -dd=8 -ur=0.05 -er=0.05

The meaning of the flags:

Reproduction

All the experiments are conducted on an Ubuntu Server with an Intel Xeon Silver 4216 CPU and an NVIDIA A100 GPU.

Initial the environment

conda create -n promptem python=3.7
const activate promptem
pip install torch==1.10.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install transformers==4.16.2
pip install scikit-learn==1.0.2

Note that you do not need to install OpenPrompt by pip manually.

We notice that the best hyper-parameters can be sensitive to your server environment and package version. If you do not have the same environment, we highly recommend you run the search for hyper-parameters in your environment.

We provide an example search script in search.sh

Download the PLM [Optional]

We use RoBERTa-base as the backbone structure of our model in all the experiments.

You can download the pre-trained checkpoint from huggingface manually.

Reproduce the result

You can train the model using the best hyper-parameters we provided in low_configs.json.

We also provide the corresponding logs in logs.

See Quick Start for more details of training parameters.

GitHub Stars & Activity

27Stars
5Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars27
Forks5
Open issues0
Primary languagePython
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related AI Projects

1

Significant-Gravitas / AutoGPT

Python★ 187,469⑂ 46,006▲ 27 stars
2

docling-project / docling

Python★ 67,466⑂ 4,869▲ 585 stars
3

openai / openai-python

Python★ 31,666⑂ 5,904▲ 6 stars
4

harvard-edge / cs249r_book

Python★ 28,390⑂ 3,591▲ 28 stars
5

browser-use / browser-harness

Python★ 17,893⑂ 1,750▲ 87 stars
6

FareedKhan-dev / train-llm-from-scratch

Python★ 10,474⑂ 1,450▲ 265 stars
7

zhouxiaoka / autoclip

Python★ 7,934⑂ 1,551▲ 395 stars
8

More AI Rankings