The Adapter-Bot: All-In-One Controllable Conversational Model

Overview

The Adapter-Bot: All-In-One Controllable Conversational Model

This is the implementation of the paper: The Adapter-Bot: All-In-One Controllable Conversational Model. Zhaojiang Lin, Andrea Madotto, Yejin Bang, Pascale Fung AAAI-DEMO [PDF]

Citation:

If you find this paper and code useful, please cite our paper:

@article{madotto2020adapter,
  title={The Adapter-Bot: All-In-One Controllable Conversational Model},
  author={Madotto, Andrea and Lin, Zhaojiang and Bang, Yejin and Fung, Pascale},
  journal={arXiv preprint arXiv:2008.12579},
  year={2020}
}

Basic Installation

In this repository, we release the trained model, the knowledge retriever, and the interactive script (both via termial and the UI) of the adapter-bot.

Download models

To download the pretrained model run the following commands:

## pip install gdown
import gdown
import zipfile
import os


url = 'https://drive.google.com/uc?id=1JQZex-AD-sa5WUT5U4lIn1K2sPW-us8a/'
output = 'models.zip'
gdown.download(url, output, quiet=False)
with zipfile.ZipFile(output, 'r') as zip_ref:
    zip_ref.extractall()
os.remove(output)

Download and install knowledge retriever (KG and Wiki)

To download and install the knowledge retrievers you can have to follow the step in the retriever folder. Specifically, for the knowledge graph follow the read me at:

https://github.com/HLTCHKUST/adapterbot/tree/main/retriever/graphdb#installing-neo4j

which provides instructions to install neo4j and load opendialoKG. For the wikipedia knowledge, we use DrQA. Also in this case follow the read me at:

https://github.com/HLTCHKUST/adapterbot/tree/main/retriever/doc_ret

which provides a simple script for download the wikidump and train the tf-idf retriever.

Run the interactive script

To interact with the model via command line use the following script:

>>> python interact_adapter.py --interact
Comments
  • hi,the url of the models shows 404

    hi,the url of the models shows 404

    hi,when i visite the models ulr:https://drive.google.com/uc?id=1JQZex-AD-sa5WUT5U4lIn1K2sPW-us8a/ the page shows 404. is there any other url that i can download the models?

    opened by 1973sir 1
  • google drive link doesn't seem to work

    google drive link doesn't seem to work

    running the model downloading code gives an error:

    Permission denied: https://drive.google.com/uc?id=1JQZex-AD-sa5WUT5U4lIn1K2sPW-us8a/ Maybe you need to change permission over 'Anyone with the link'?

    opened by tomyoung903 1
  • Training details

    Training details

    Hi, this is really nice work!

    I would like to know the training details of the dialog manager mentioned in the paper? Or do you have any open source related code?

    Thank u.

    opened by leileilin 0
  • test data

    test data

    Thank you for interesting work.

    To reproduce the results of the paper, I would like to run 'interact_adapter.py --eval' using the pre-trained model you shared, but I could not find 'data/dialKG/test.json'. (and no official split is provided in opendialkg dataset)

    Could you share the test data you used to build your model?

    opened by ka-furumai 0
  • Permission denied for googledrive link

    Permission denied for googledrive link

    Hi there! I opened a fork to begin attempting to create python packaging for your repository.

    I'm not able to download your pre-trained model from google drive. Here's what I see on my end:

    image

    Any help would be appreciated!

    opened by rcox771 2
  • How to input persona for the persona adapter?

    How to input persona for the persona adapter?

    For the demo (https://adapterbot.emos.ai/) or the pretrained model (with persona adapter), how do we input a few sentences as the persona for the bot?

    opened by jhlau 0
  • graph.db is unavailable

    graph.db is unavailable

    On Ubuntu 18.04 with neo4j 4.2.3 the graph_db part of the code doesn't use with the following error:

    neo4j.exceptions.TransientError: {code: Neo.TransientError.Database.DatabaseUnavailable} {message: Database 'graph.db' is unavailable.}

    opened by StrangeTcy 0
  • Training code

    Training code

    Hi, this is really nice work!

    I was wondering if it'd be possible to train our own residual adapters as mentioned in the paper on custom datasets and finally connect them with the DialogGPT through the BERT dialogue manager.

    If you can point me to the code for training/steps to go about it, it'd be really helpful.

    Thanks!

    opened by bakszero 1
Owner
CAiRE
CAiRE
FaceVerse: a Fine-grained and Detail-controllable 3D Face Morphable Model from a Hybrid Dataset (CVPR2022)

FaceVerse FaceVerse: a Fine-grained and Detail-controllable 3D Face Morphable Model from a Hybrid Dataset Lizhen Wang, Zhiyuan Chen, Tao Yu, Chenguang

Lizhen Wang 219 Dec 28, 2022
《K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapters》(2020)

K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapters This repository is the implementation of the paper "K-Adapter: Infusing Knowledge

Microsoft 118 Dec 13, 2022
Code for the ACL2021 paper "Lexicon Enhanced Chinese Sequence Labelling Using BERT Adapter"

Lexicon Enhanced Chinese Sequence Labeling Using BERT Adapter Code and checkpoints for the ACL2021 paper "Lexicon Enhanced Chinese Sequence Labelling

null 274 Dec 6, 2022
A Python framework for conversational search

Chatty Goose Multi-stage Conversational Passage Retrieval: An Approach to Fusing Term Importance Estimation and Neural Query Rewriting Installation Ma

Castorini 36 Oct 23, 2022
PyTorch implementation for ACL 2021 paper "Maria: A Visual Experience Powered Conversational Agent".

Maria: A Visual Experience Powered Conversational Agent This repository is the Pytorch implementation of our paper "Maria: A Visual Experience Powered

Jokie 22 Dec 12, 2022
This is the repo for our work "Towards Persona-Based Empathetic Conversational Models" (EMNLP 2020)

Towards Persona-Based Empathetic Conversational Models (PEC) This is the repo for our work "Towards Persona-Based Empathetic Conversational Models" (E

Zhong Peixiang 35 Nov 17, 2022
NUANCED is a user-centric conversational recommendation dataset that contains 5.1k annotated dialogues and 26k high-quality user turns.

NUANCED: Natural Utterance Annotation for Nuanced Conversation with Estimated Distributions Overview NUANCED is a user-centric conversational recommen

Facebook Research 18 Dec 28, 2021
ICLR 2021: Pre-Training for Context Representation in Conversational Semantic Parsing

SCoRe: Pre-Training for Context Representation in Conversational Semantic Parsing This repository contains code for the ICLR 2021 paper "SCoRE: Pre-Tr

Microsoft 28 Oct 2, 2022
Facestar dataset. High quality audio-visual recordings of human conversational speech.

Facestar Dataset Description Existing audio-visual datasets for human speech are either captured in a clean, controlled environment but contain only a

Meta Research 87 Dec 21, 2022
Code, Data and Demo for Paper: Controllable Generation from Pre-trained Language Models via Inverse Prompting

InversePrompting Paper: Controllable Generation from Pre-trained Language Models via Inverse Prompting Code: The code is provided in the "chinese_ip"

THUDM 101 Dec 16, 2022
STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech

STYLER: Style Factor Modeling with Rapidity and Robustness via Speech Decomposition for Expressive and Controllable Neural Text to Speech Keon Lee, Ky

Keon Lee 114 Dec 12, 2022
Changing the Mind of Transformers for Topically-Controllable Language Generation

We will first introduce the how to run the IPython notebook demo by downloading our pretrained models. Then, we will introduce how to run our training and evaluation code.

IESL 20 Dec 6, 2022
Code for Pose-Controllable Talking Face Generation by Implicitly Modularized Audio-Visual Representation (CVPR 2021)

Pose-Controllable Talking Face Generation by Implicitly Modularized Audio-Visual Representation (CVPR 2021) Hang Zhou, Yasheng Sun, Wayne Wu, Chen Cha

Hang_Zhou 628 Dec 28, 2022
The official pytorch implemention of the CVPR paper "Temporal Modulation Network for Controllable Space-Time Video Super-Resolution".

This is the official PyTorch implementation of TMNet in the CVPR 2021 paper "Temporal Modulation Network for Controllable Space-Time VideoSuper-Resolu

Gang Xu 95 Oct 24, 2022
This is the PyTorch implementation of GANs N’ Roses: Stable, Controllable, Diverse Image to Image Translation

Official PyTorch repo for GAN's N' Roses. Diverse im2im and vid2vid selfie to anime translation.

null 1.1k Jan 1, 2023
Official implementation of FCL-taco2: Fast, Controllable and Lightweight version of Tacotron2 @ ICASSP 2021

FCL-Taco2: Towards Fast, Controllable and Lightweight Text-to-Speech synthesis (ICASSP 2021) Paper | Demo Block diagram of FCL-taco2, where the decode

Disong Wang 39 Sep 28, 2022
source code for https://arxiv.org/abs/2005.11248 "Accelerating Antimicrobial Discovery with Controllable Deep Generative Models and Molecular Dynamics"

Accelerating Antimicrobial Discovery with Controllable Deep Generative Models and Molecular Dynamics This work will be published in Nature Biomedical

International Business Machines 71 Nov 15, 2022
An implementation for `Text2Event: Controllable Sequence-to-Structure Generation for End-to-end Event Extraction`

Text2Event An implementation for Text2Event: Controllable Sequence-to-Structure Generation for End-to-end Event Extraction Please contact Yaojie Lu (@

Roger 153 Jan 7, 2023
The source code of the ICCV2021 paper "PIRenderer: Controllable Portrait Image Generation via Semantic Neural Rendering"

The source code of the ICCV2021 paper "PIRenderer: Controllable Portrait Image Generation via Semantic Neural Rendering"

Ren Yurui 261 Jan 9, 2023