ParlAI README

The project's README from github.com/facebookresearch/ParlAI. As one markdown file: README.md.

CircleCI CircleCI Coverage GitHub contributors Twitter


ParlAI (pronounced “par-lay”) is a python framework for sharing, training and testing dialogue models, from open-domain chitchat, to task-oriented dialogue, to visual question answering.

Its goal is to provide researchers:

ParlAI is described in the following paper: “ParlAI: A Dialog Research Software Platform", arXiv:1705.06476 or see these more up-to-date slides.

Follow us on Twitter and check out our Release notes to see the latest information about new features & updates, and the website http://parl.ai for further docs. For an archived list of updates, check out NEWS.md.

Interactive Tutorial

For those who want to start with ParlAI now, you can try our Colab Tutorial.

Installing ParlAI

Operating System

ParlAI should work as inteded under Linux or macOS. We do not support Windows at this time, but many users report success on Windows using Python 3.8 and issues with Python 3.9. We are happy to accept patches that improve Windows support.

Python Interpreter

ParlAI currently requires Python3.8+.

Requirements

ParlAI supports Pytorch 1.6 or higher. All requirements of the core modules are listed in requirements.txt. However, some models included (in parlai/agents) have additional requirements.

Virtual Environment

We strongly recommend you install ParlAI in a virtual environment using venv or conda.

End User Installation

If you want to use ParlAI without modifications, you can install it with:

cd /path/to/your/parlai-app
python3.8 -m venv venv
venv/bin/pip install --upgrade pip setuptools wheel
venv/bin/pip install parlai

Developer Installation

Many users will want to modify some parts of ParlAI. To set up a development environment, run the following commands to clone the repository and install ParlAI:

git clone https://github.com/facebookresearch/ParlAI.git ~/ParlAI
cd ~/ParlAI
python3.8 -m venv venv
venv/bin/pip install --upgrade pip setuptools wheel
venv/bin/python setup.py develop

Note Sometimes the install from source maynot work due to dependencies (specially in PyTorch related packaged). In that case try building a fresh conda environment and running the similar to the following: conda install pytorch==2.0.0 torchvision torchaudio torchtext pytorch-cuda=11.8 -c pytorch -c nvidia. Check torch setup documentation for your CUDA and OS versions.

All needed data will be downloaded to ~/ParlAI/data. If you need to clear out the space used by these files, you can safely delete these directories and any files needed will be downloaded again.

Documentation

Examples

A large set of scripts can be found in parlai/scripts. Here are a few of them. Note: If any of these examples fail, check the installation section to see if you have missed something.

Display 10 random examples from the SQuAD task

parlai display_data -t squad

Evaluate an IR baseline model on the validation set of the Personachat task:

parlai eval_model -m ir_baseline -t personachat -dt valid

Train a single layer transformer on PersonaChat (requires pytorch and torchtext). Detail: embedding size 300, 4 attention heads, 2 epochs using batchsize 64, word vectors are initialized with fasttext and the other elements of the batch are used as negative during training.

parlai train_model -t personachat -m transformer/ranker -mf /tmp/model_tr6 --n-layers 1 --embedding-size 300 --ffn-size 600 --n-heads 4 --num-epochs 2 -veps 0.25 -bs 64 -lr 0.001 --dropout 0.1 --embedding-type fasttext_cc --candidates batch

Code Organization

The code is set up into several main directories:

Support

If you have any questions, bug reports or feature requests, please don't hesitate to post on our Github Issues page. You may also be interested in checking out our FAQ and our Tips n Tricks.

Please remember to follow our Code of Conduct.

Contributing

We welcome PRs from the community!

You can find information about contributing to ParlAI in our Contributing document.

The Team

ParlAI is currently maintained by Moya Chen, Emily Dinan, Dexter Ju, Mojtaba Komeili, Spencer Poff, Pratik Ringshia, Stephen Roller, Kurt Shuster, Eric Michael Smith, Megan Ung, Jack Urbanek, Jason Weston, Mary Williamson, and Jing Xu. Kurt Shuster is the current Tech Lead.

Former major contributors and maintainers include Alexander H. Miller, Margaret Li, Will Feng, Adam Fisch, Jiasen Lu, Antoine Bordes, Devi Parikh, Dhruv Batra, Filipe de Avila Belbute Peres, Chao Pan, and Vedant Puri.

Citation

Please cite the arXiv paper if you use ParlAI in your work:

@article{miller2017parlai,
  title={ParlAI: A Dialog Research Software Platform},
  author={{Miller}, A.~H. and {Feng}, W. and {Fisch}, A. and {Lu}, J. and {Batra}, D. and {Bordes}, A. and {Parikh}, D. and {Weston}, J.},
  journal={arXiv preprint arXiv:{1705.06476}},
  year={2017}
}

License

ParlAI is MIT licensed. See the LICENSE file for details.

ParlAI (facebookresearch/ParlAI)

Searching Database…

10.6K ·GitHub
archived
What is this?ParlAI is a Python framework from Facebook (Meta) AI Research for sharing, training, and evaluating dialogue AI models, covering everything from open-domain chitchat to task-oriented dialogue and visual question answering, with over 100 datasets available through one unified API.
Is this a standalone app or a framework I build on?It's a Python framework and library, not a standalone application. You write training/evaluation scripts that call into ParlAI's core, agents, and tasks modules, many of which live in parlai/scripts.
How do I install ParlAI?If you just want to use it as-is, install it with pip as an end user. If you plan to modify the code, clone the repository and run the developer install inside a virtual environment created with venv or conda.
What do I need before installing it?You need Python 3.8 or higher and PyTorch 1.6 or higher; some models bundled in parlai/agents pull in their own extra requirements on top of that.
Is this project still actively maintained?No — the GitHub repository has been archived, which means it's no longer being actively developed or updated with fixes, even though it still has a large user base and pretrained model zoo.
Does it run on Windows?Officially no — ParlAI is only supported on Linux and macOS, though the README notes some users have gotten it running on Windows with Python 3.8 and run into issues with 3.9.
What's in the ParlAI model zoo?It offers a large collection of pretrained dialogue models ready to run off-the-shelf, from retrieval baselines to Transformer-based agents, so you don't have to train your own from scratch.
Can ParlAI connect models to real humans for data collection?Yes — it integrates with Amazon Mechanical Turk for crowdsourced data collection and human evaluation, and with Facebook Messenger so agents can chat directly with people.
How many datasets does ParlAI support?Over 100 popular dialogue and QA datasets, including PersonaChat, DailyDialog, SQuAD, HotpotQA, VQA, and VisDial, all accessible through the same unified API.
Is there a paper behind ParlAI?Yes, the framework is described in the arXiv paper 'ParlAI: A Dialog Research Software Platform' (arXiv:1705.06476).
What are similar projects?jeeves, bert, MSA, pyod, flex-pi, spaCy, SolarWM, fairseq
Size
145.7 MB
Stars
10.6K
Age
9y
Commits · 90 Days