SkillAgentSearch skills...

PNPT

PNPT: Prototypical Network with Prompt Template for Few-Shot Relation Extraction

Install / Use

/learn @bebujoie/PNPT
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

PNPT

The code for the paper "PNPT: Prototypical Network with Prompt Template for Few-shot Relation Extraction".

Environments

  • python 3.8
  • PyTorch 1.12.0
  • transformers 4.24.0

Code

Put all data in the data folder, CP pretrained model in the CP_model folder (you can download CP model from https://github.com/thunlp/RE-Context-or-Names/tree/master/pretrain or Google Drive), and then you can simply use script: run_main.sh for train, evaluation and test.

Set the corresponding parameter values in the script, and then run:

sh run_main.sh
View on GitHub
GitHub Stars5
CategoryDevelopment
Updated1y ago
Forks0

Languages

Python

Security Score

55/100

Audited on Oct 18, 2024

No findings