Code Monkey home page Code Monkey logo

moviechats's Introduction

MovieChats

Training Inference-1 Inference-2

Dataset & Model Download

MovieData

chitchat_pretrain_model

fine-tuned model

Preprocessing:

Each dialogue turn will be represented as a sequence, which contains previous user/system turns, dialog act, knowledge(None), and response

[context][user]你觉得血色身材这部电影好看吗?[system]我觉得简直是太精彩了,[user]是吗?[system]就要讲述的故事,一环扣一环,剧情特别的惊心动魄,[user]是不是给人一种特别的紧张感?[system]简直你说的太实在了,[user]是吧,我觉得这部电影算是精品吧,[system]我觉得是精品中的精品,[user]怎么你对这部片儿的评价很高呀?[system]是啊,因为我喜欢看这一种嘛,简直是太好看了,[endofcontext][action][endofaction][knowledge][endofknowledge]
[response]行,那以后我要是有这种电影的话,我还推荐给你[endofresponse]

Usage

unzip ul_model_best.zip unzip pretrain_model.zip unzip movie_data.zip

Requirements

  • python 2.7+
  • transformers==2.1.1

Run

./train_ul_best.sh

train the model

python ./train_ul_best.py --epochs 8 --batch_size 64 --pretrained_model ./pretrain_model/pytorch_model.bin  

hyper-parameter settings

{
  "initializer_range": 0.02,
  "layer_norm_epsilon": 1e-05,
  "n_ctx": 300,
  "n_embd": 768,
  "n_head": 12,
  "n_layer": 12,
  "n_positions": 300,
  "vocab_size": 13317
}

Reference

@inproceedings{su2020moviechats,
  title={MovieChats: Chat like Humans in a Closed Domain},
  author={Su, Hui and Shen, Xiaoyu and Xiao, Zhou and Zhang, Zheng and Chang, Ernie and Zhang, Cheng and Niu, Cheng and Zhou, Jie},
  booktitle={Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  pages={6605--6619},
  year={2020}
} 

Thanks

GPT2-chitchat(https://github.com/yangjianxin1/GPT2-chitchat) CDial-GPT(https://github.com/thu-coai/CDial-GPT)

moviechats's People

Contributors

chin-gyou avatar suhui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fangzheng354

moviechats's Issues

知识类相关信息会提供出来吗

你好,我看数据集里没有包含知识信息,因为知识类信息的抓取和对齐会比较麻烦,特别是评论方面的对齐,不知道后续会不会提供出来呢,谢谢~

pretrain model has some problems

I have downloaded the chitchat_pretrain_model from the google drive. while running the GPT2LMHeadModel.from_pretrained, raise that "RuntimeError: unexpected EOF, expected 5249182 more bytes. The file might be corrupted."

测试疑问

作者你好,很高兴你们提出了一个end2end的框架来进行知识驱动的对话生成,并提供了更自然更大的数据集。但是对文中模型那块有点不理解。Movie Tracker、Intent Prediction、Knowledge Retrieval、Text Generation这四个子任务是串行运行的吗?先预测出movie tracker然后填到相应的位置进行intent的预测?因为不太明白这一点,所以对代码进行阅读,但是测试代码中对于Movie Tracker、Intent Prediction、Knowledge Retrieval这部分内容好像没有涉及?期待您的回复,万分感谢!

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.