Giter VIP home page Giter VIP logo

response-aware-hybrid-response-generator's Introduction

Response-Aware-Hybrid-Response-Generator

Only for inference

Overall Architecture

Note
Not published yet

Datasets

Datasets Training Validation Testing
AI-Hub 656,332 28,361 28,464

Results of AI-Hub Dataset

Retrieval Model

Model Hit@10 Hit@100 MRR@10 MRR@100
Q-CanAns 14.80 29.29 7.56 8.13
Q-CanQue 28.03 46.61 16.15 16.53
QR'-CanQueAns 36.61 55.28 19.50 21.41

Hybrid Response Generator

Model BLEU-1 BLEU-2 BLEU-3 BLEU-4 Dist-1 Dist-2
NoRet 18.48 12.41 8.65 6.19 1.04 17.41
Q-CanAns 18.32 12.16 8.31 5.81 1.10 20.17
Q-CanQue 18.61 12.47 8.63 6.12 1.11 20.56
QR'-CanQueAns 19.96 13.72 9.84 7.31 1.16 22.12

API Inference

pip install -r requirements.txt
CUDA_VISIBLE_DEVICES=1 python main.py \
  --lang ko \
  --model hybrid \
  --corpus_v1 data/database_v1.tsv \
  --corpus_v2 data/database_v2.tsv \
  --retrieval_ckpt models/outputs/single_retrieval_model.pt \
  --generative_ckpt models/outputs/single_generative_model.pt \
  --retrieval_mode base \
  --num_centroids 64 \
  --n_beams 5 \
  --min_length 3 \
  --db_embedding_bsz 256 \
  --num_ks 3 \
  --max_len 80 
Hyperparameters
  • end_command: user inference시 대화 중단을 위한 command key
  • num_ks: 사용할 retrieved response 개수
  • ret_max_len: 검색시 최대 token 개수
  • mips: True는 maximum inner product 계산, False는 FAISS Lib 사용
  • num_centroids: FAISS centroids 개수
  • n_beams: 디코딩시 beam 개수
  • min_length: 디코딩시 출력 최소 token 개수
  • retrieval_ckpt: 검색 모델 checkpoint 위치
  • generative_ckpt: 생성 모델 checkpoint 위치

Demo with FastAPI


response-aware-hybrid-response-generator's People

Contributors

bm-k avatar

Stargazers

 avatar Seohyun avatar

Watchers

 avatar

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.