Awesome Open Source
Awesome Open Source

KnowQA

knowQA Source Code by RUCIR

Baseline, BERTfine-tuning, F10.35

Preinstallation

Before launch the script install these packages in your Python3 environment:

  • pytorch >= 1.4
  • transformers 4.2.0

Conda :)

 conda create -n knowqa -c pytorch python=3.6 pytorch
 conda activate knowqa
 pip install transformers==4.2.0 tqdm -i https://pypi.tuna.tsinghua.edu.cn/simple

Huggingface BERT-base-uncasedpytorch_model.bin, ./models/bert/

git clone https://github.com/zhengyima/knowqa.git knowqa
cd knowqa
wget -O ./models/bert/pytorch_model.bin https://mirrors.tuna.tsinghua.edu.cn/hugging-face-models/bert-base-cased-pytorch_model.bin

Launch the script

. ./output/score.txt,

 python runBert.py

: ./data/:(

Experimental Results

inferencedecode(argparsemode)

mode=1: top5termmask

mode=2(): term mask, term1, term

Models F1 on testset
Official baseline 0.172
Ours (mode=1) 0.2574
Ours (mode=2) 0.3536

Links


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,141,333
Machine Learning (31,692
Deep Learning (23,680
Pytorch (11,591
Artificial Intelligence (5,558
Natural Language Processing (4,742
Transformer (1,679
Bert (1,164
Question Answering (587
Knowledge (437
Pretrained Models (324
Huggingface (185
Fine Tuning (137
Pre Training (76
Related Projects