Giter Club home page Giter Club logo

icecaps's Introduction

Overview

Microsoft Icecaps is an open-source toolkit for building neural conversational systems. Icecaps provides an array of tools from recent conversation modeling and general NLP literature within a flexible paradigm that enables complex multi-task learning setups.

Icecaps is currently on version 0.2.0. In this version we introduced several functionalities:

  • Personalization embeddings for transformer models
  • Early stopping variant for performing validation across all saved checkpoints
  • Implementations for both SpaceFusion and StyleFusion
  • New text data processing features, including sorting and trait grounding
  • Tree data processing features from JSON files using the new JSONDataProcessor

Please be aware that future versions of Icecaps will not guarantee backwards compatibility and may cause breaking changes.

Related repository (DialoGPT)

As an orthogonal repository of ICECAPS, we have released a conversational modeling repository based on pytorch-transformer, called DialoGPT. DialoGPT is an open-source large-scale pretrained response generation system trained on 147M multi-turn dialogue from Reddit discussion threads, yielding the state-of-the-art results on public dialogue generation challenges.

  • The repository is based on huggingface pytorch-transformer and OpenAI GPT-2. It contains data extraction script, model training code and pretrained small (117M) medium (345M) and large (762M) model checkpoint. The current version also contains the evaluation pipeline over DSTC-7 challenge.
  • The model is trained on 147M multi-turn dialogues from Reddit discussion threads. The largest model can be trained in several hours, with support for distributed training and FP16 option.
  • The system is easy to deploy by following the instructions, and you are welcome to try this out.

https://github.com/microsoft/dialogpt

Dependencies

Icecaps is intended for Python environments and is built on top of TensorFlow. We recommend using Icecaps in an Anaconda environment with Python 3.7. Once you have created an environment, run the following command to install all required dependencies:

pip install -r requirements.txt

If your machine has a GPU, we recommend you instead install from requirements-gpu.txt.

Tutorials

We have provided some scripts in the examples/ directory. These scripts will introduce you to Icecaps' architecture, and we encourage you to use them as templates.

examples/train_simple_example.py is our "Hello World" script: it builds a simple seq2seq training scenario while demonstrating the basic five-phase pattern that Icecaps scripts follow.

examples/train_persona_mmi_example.py presents a more complex system that introduces component chaining and multi-task learning, the core aspects of Icecaps' architecture.

Finally, examples/data_processing_example.py gives an example of how to convert a raw text dataset to TFRecord files, which Icecaps uses to feed its data pipelines during training.

We plan to publish more tutorials on other kinds of conversational scenarios in the future.

Pre-Trained Systems

We plan to add pre-trained systems based on cutting-edge conversational modeling literature to Icecaps in the future. We had hoped to include these systems with Icecaps at launch. However, given that these systems may produce toxic responses in some contexts, we have decided to explore improved content-filtering techniques before releasing these models to the public. Follow this repository to stay up to date with new pre-trained system releases.

Resources

Visit our homepage here: https://www.microsoft.com/en-us/research/project/microsoft-icecaps/

View our system demonstration paper from ACL 2019 here: https://www.aclweb.org/anthology/P19-3021

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

icecaps's People

Contributors

dependabot[bot] avatar dreasysnail avatar janithwanni avatar microsoft-github-policy-service[bot] avatar vishiv avatar

Stargazers

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

Watchers

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

icecaps's Issues

Pretrained personality embeddings

Hi all, thanks for the repo!

In the paper, you have mentioned you would provide pretrained personality embeddings that can be used for applications. May I ask if this indeed shared somewhere in the repo or if it can be shared with us via dropbox or gdrive? Thanks.

Where is the code for "Tree-based Transformer?"

In the paper "Novel positional encodings to enable tree-based transformers", this repo was referred to. But I didn't find the example code for this part, seems this repo for the chatbot work.

Could I know where is the repo for that paper?

Plans for TF2.0?

Are there any plans to add support for tf2? Migrating (into a new parallel branch maybe?) should not be super hard. I could work on a PR for some of the migrations if there are any plans to shift soon?

NameError: name 'DataProcessor' is not defined

I'm curious on this project and I am installing it within a container with all needed components. I have run into an error after entering a query at the query prompt. For awareness, I'm new to python and deep learning.

Query: Why do you error?
Traceback (most recent call last):
File "train_simple_example.py", line 71, in
tf.app.run()
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "train_simple_example.py", line 65, in main
decoding.cmd_decode(model, vocab, persona=True)
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 319, in cmd_decode
cmd_listener, model, vocab, sys.stdout, mmi_component, persona, max_len, lambda_balance, num_turns, eos_token)
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 313, in interactive_decode
return decode(model, input_fn_src, vocab, outstream=(None if mmi_component else outstream), hooks=[hook], save_all=(mmi_component is not None))
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 104, in decode
for pred in predictions:
File "/opt/conda/lib/python3.7/site-packages/icecaps/estimators/abstract_icecaps_estimator.py", line 296, in predict
checkpoint_path=(checkpoint_path or self.best_ckpt), yield_single_examples=yield_single_examples)
File "/opt/conda/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 627, in predict
hooks=all_hooks) as mon_sess:
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 934, in init
stop_grace_period_secs=stop_grace_period_secs)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 648, in init
self._sess = _RecoverableSession(self._coordinated_creator)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 1122, in init
_WrappedSession.init(self, self._create_session())
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 1127, in _create_session
return self._sess_creator.create_session()
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 812, in create_session
hook.after_create_session(self.tf_sess, self.coord)
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 249, in after_create_session
self._get_feed_dict())
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 226, in _get_feed_dict
features = self._input_fn(self, context)
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 309, in _fn_get_input
return convert_interactive_input(in_msg, context, vocab, pad_len=max_len)
File "/opt/conda/lib/python3.7/site-packages/icecaps/decoding/decoding.py", line 293, in convert_interactive_input
in_msg = AbstractDataProcessor.basic_preprocess(in_msg)
File "/opt/conda/lib/python3.7/site-packages/icecaps/data_io/abstract_data_processor.py", line 48, in basic_preprocess
line = DataProcessor.tokenize_punctuation(line)
NameError: name 'DataProcessor' is not defined

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.