Home

Awesome

ProtoQA-GPT2 Baseline

This repo contains the GPT2 baselines in the ProtoQA paper.

Requirments

Following the install.sh in the repo will create a conda environment named protoqa, with corresponding libraries installed. Note: protoqa-evaluater is included.

Download fine-tuned GPT2 model and generate answers

Colab notebook demo: Open In Colab

python run_generation.py \
--model_type=gpt2 \
--model_name_or_path='./models/large_outputb_1e_1gu_8' \
--length=10 \
--num_samples=300 \
--temperature=0.69 \
--input_file='./data/dev/dev.crowdsourced.jsonl \
--output='./'

This will generate ranked_answer.jsonl under the same directionary.

protoqa_evaluator evaluate --similarity_function exact_match ./data/dev/dev.crowdsourced.jsonl ranked_list.jsonl

Fine tune GPT2