Giter VIP home page Giter VIP logo

korquad-question-generation's Introduction

Question Generation(QG) Model with KorQuAD

학습된 SKT-AI/KoGPT2 모델을 기반으로 질문 생성 QG(Question Generation) 모델을 만들었습니다. QG 모델을 만들기 위해 Question Answering 데이터셋인 KorQuAD v1.0을 사용하였습니다.

사용 방법

데이터 준비

학습/평가/생성을 위해서 KorQuAD v1.0 데이터셋을 다운 받습니다.

make prepare-dataset

학습

다음 커맨드를 이용해서 학습을 수행할 수 있습니다.

python -m scripts.run_fine_tune --train-batch-size 16 --eval-batch-size 16 --epochs 5

성능 평가 (dev 셋 PPL 측정)

MODEL_PATH = "artifacts/gpt2_xxxxxxxx/gpt2_step_x.pth"
python -m scripts.run_evaluation --model-path $MODEL_PATH --batch-size 50

질문 생성 (dev 셋에 대해서 질문 생성)

Decoding 결과

Question Generation POC 스프레드 시트: KorQuAD v1.0 dev 셋에 대해서 decoding 한 결과 입니다.

beam-search 를 기반으로 decoding 되었으며, beam_size 는 5를 사용하였습니다.

MODEL_PATH = "artifacts/gpt2_xxxxxxxx/gpt2_step_x.pth"
python -m scripts.run_generate --model-path $MODEL_PATH --output-path decoded.tsv

학습된 QG 모델 다운로드

Author

by Junseong Kim (Scatter Lab, Pingpong AI) [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.