jiant


Namejiant JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttps://github.com/nyu-mll/jiant
SummaryState-of-the-art Natural Language Processing toolkit for multi-task and transfer learning built on PyTorch.
upload_time2021-05-10 18:56:41
maintainer
docs_urlNone
authorNYU Machine Learning for Language Group
requires_python>=3.6.0
licenseMIT
keywords nlp deep learning transformer pytorch tensorflow bert gpt gpt-2 google nyu datasets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# `jiant` is an NLP toolkit
**The multitask and transfer learning toolkit for natural language processing research**

[![Generic badge](https://img.shields.io/github/v/release/nyu-mll/jiant)](https://shields.io/)
[![codecov](https://codecov.io/gh/nyu-mll/jiant/branch/master/graph/badge.svg)](https://codecov.io/gh/nyu-mll/jiant)
[![CircleCI](https://circleci.com/gh/nyu-mll/jiant/tree/master.svg?style=shield)](https://circleci.com/gh/nyu-mll/jiant/tree/master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

</div>

**Why should I use `jiant`?**
- `jiant` supports [multitask learning](https://colab.research.google.com/github/nyu-mll/jiant/blob/master/examples/notebooks/jiant_Multi_Task_Example.ipynb)
- `jiant` supports [transfer learning](https://colab.research.google.com/github/nyu-mll/jiant/blob/master/examples/notebooks/jiant_STILTs_Example.ipynb)
- `jiant` supports [50+ natural language understanding tasks](./guides/tasks/supported_tasks.md)
- `jiant` supports the following benchmarks:
    - [GLUE](./guides/benchmarks/glue.md)
    - [SuperGLUE](./guides/benchmarks/superglue.md)
    - [XTREME](./guides/benchmarks/xtreme.md)
- `jiant` is a research library and users are encouraged to extend, change, and contribute to match their needs!

**A few additional things you might want to know about `jiant`:**
- `jiant` is configuration file driven
- `jiant` is built with [PyTorch](https://pytorch.org)
- `jiant` integrates with [`datasets`](https://github.com/huggingface/datasets) to manage task data
- `jiant` integrates with [`transformers`](https://github.com/huggingface/transformers) to manage models and tokenizers.

## Getting Started

* Get started with some simple [Examples](./examples)
* Learn more about `jiant` by reading our [Guides](./guides)
* See our [list of supported tasks](./guides/tasks/supported_tasks.md)

## Installation

To import `jiant` from source (recommended for researchers):
```bash
git clone https://github.com/nyu-mll/jiant.git
cd jiant
pip install -r requirements.txt

# Add the following to your .bash_rc or .bash_profile 
export PYTHONPATH=/path/to/jiant:$PYTHONPATH
```
If you plan to contribute to jiant, install additional dependencies with `pip install -r requirements-dev.txt`.

To install `jiant` from source (alternative for researchers):
```
git clone https://github.com/nyu-mll/jiant.git
cd jiant
pip install . -e
```

To install `jiant` from pip (recommended if you just want to train/use a model):
```
pip install jiant
```

We recommended that you install `jiant` in a virtual environment or a conda environment.

To check `jiant` was correctly installed, run a [simple example](./examples/notebooks/simple_api_fine_tuning.ipynb).


## Quick Introduction
The following example fine-tunes a RoBERTa model on the MRPC dataset.

Python version:
```python
from jiant.proj.simple import runscript as run
import jiant.scripts.download_data.runscript as downloader

EXP_DIR = "/path/to/exp"

# Download the Data
downloader.download_data(["mrpc"], f"{EXP_DIR}/tasks")

# Set up the arguments for the Simple API
args = run.RunConfiguration(
   run_name="simple",
   exp_dir=EXP_DIR,
   data_dir=f"{EXP_DIR}/tasks",
   hf_pretrained_model_name_or_path="roberta-base",
   tasks="mrpc",
   train_batch_size=16,
   num_train_epochs=3
)

# Run!
run.run_simple(args)
```

Bash version:
```bash
EXP_DIR=/path/to/exp

python jiant/scripts/download_data/runscript.py \
    download \
    --tasks mrpc \
    --output_path ${EXP_DIR}/tasks
python jiant/proj/simple/runscript.py \
    run \
    --run_name simple \
    --exp_dir ${EXP_DIR}/ \
    --data_dir ${EXP_DIR}/tasks \
    --hf_pretrained_model_name_or_path roberta-base \
    --tasks mrpc \
    --train_batch_size 16 \
    --num_train_epochs 3
```

Examples of more complex training workflows are found [here](./examples/).


## Contributing
The `jiant` project's contributing guidelines can be found [here](CONTRIBUTING.md).

## Looking for `jiant v1.3.2`?
`jiant v1.3.2` has been moved to [jiant-v1-legacy](https://github.com/nyu-mll/jiant-v1-legacy) to support ongoing research with the library. `jiant v2.x.x` is more modular and scalable than `jiant v1.3.2` and has been designed to reflect the needs of the current NLP research community. We strongly recommended any new projects use `jiant v2.x.x`.

`jiant 1.x` has been used in in several papers. For instructions on how to reproduce papers by `jiant` authors that refer readers to this site for documentation (including Tenney et al., Wang et al., Bowman et al., Kim et al., Warstadt et al.), refer to the [jiant-v1-legacy](https://github.com/nyu-mll/jiant-v1-legacy) README.

## Citation

If you use `jiant ≥ v2.0.0` in academic work, please cite it directly:

```
@misc{phang2020jiant,
    author = {Jason Phang and Phil Yeres and Jesse Swanson and Haokun Liu and Ian F. Tenney and Phu Mon Htut and Clara Vania and Alex Wang and Samuel R. Bowman},
    title = {\texttt{jiant} 2.0: A software toolkit for research on general-purpose text understanding models},
    howpublished = {\url{http://jiant.info/}},
    year = {2020}
}
```

If you use `jiant ≤ v1.3.2` in academic work, please use the citation found [here](https://github.com/nyu-mll/jiant-v1-legacy).

## Acknowledgments

- This work was made possible in part by a donation to NYU from Eric and Wendy Schmidt made
by recommendation of the Schmidt Futures program, and by support from Intuit Inc.
- We gratefully acknowledge the support of NVIDIA Corporation with the donation of a Titan V GPU used at NYU in this work.
- Developer Jesse Swanson is supported by the Moore-Sloan Data Science Environment as part of the NYU Data Science Services initiative.

## License
`jiant` is released under the [MIT License](https://github.com/nyu-mll/jiant/blob/master/LICENSE).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nyu-mll/jiant",
    "name": "jiant",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6.0",
    "maintainer_email": "",
    "keywords": "NLP deep learning transformer pytorch tensorflow BERT GPT GPT-2 google nyu datasets",
    "author": "NYU Machine Learning for Language Group",
    "author_email": "bowman@nyu.edu",
    "download_url": "https://files.pythonhosted.org/packages/7c/68/7a7bf075d2d37e16cff893ff4ce8c24a2460212425faa008e0758ab0db31/jiant-2.2.0.tar.gz",
    "platform": "",
    "description": "<div align=\"center\">\n\n# `jiant` is an NLP toolkit\n**The multitask and transfer learning toolkit for natural language processing research**\n\n[![Generic badge](https://img.shields.io/github/v/release/nyu-mll/jiant)](https://shields.io/)\n[![codecov](https://codecov.io/gh/nyu-mll/jiant/branch/master/graph/badge.svg)](https://codecov.io/gh/nyu-mll/jiant)\n[![CircleCI](https://circleci.com/gh/nyu-mll/jiant/tree/master.svg?style=shield)](https://circleci.com/gh/nyu-mll/jiant/tree/master)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n</div>\n\n**Why should I use `jiant`?**\n- `jiant` supports [multitask learning](https://colab.research.google.com/github/nyu-mll/jiant/blob/master/examples/notebooks/jiant_Multi_Task_Example.ipynb)\n- `jiant` supports [transfer learning](https://colab.research.google.com/github/nyu-mll/jiant/blob/master/examples/notebooks/jiant_STILTs_Example.ipynb)\n- `jiant` supports [50+ natural language understanding tasks](./guides/tasks/supported_tasks.md)\n- `jiant` supports the following benchmarks:\n    - [GLUE](./guides/benchmarks/glue.md)\n    - [SuperGLUE](./guides/benchmarks/superglue.md)\n    - [XTREME](./guides/benchmarks/xtreme.md)\n- `jiant` is a research library and users are encouraged to extend, change, and contribute to match their needs!\n\n**A few additional things you might want to know about `jiant`:**\n- `jiant` is configuration file driven\n- `jiant` is built with [PyTorch](https://pytorch.org)\n- `jiant` integrates with [`datasets`](https://github.com/huggingface/datasets) to manage task data\n- `jiant` integrates with [`transformers`](https://github.com/huggingface/transformers) to manage models and tokenizers.\n\n## Getting Started\n\n* Get started with some simple [Examples](./examples)\n* Learn more about `jiant` by reading our [Guides](./guides)\n* See our [list of supported tasks](./guides/tasks/supported_tasks.md)\n\n## Installation\n\nTo import `jiant` from source (recommended for researchers):\n```bash\ngit clone https://github.com/nyu-mll/jiant.git\ncd jiant\npip install -r requirements.txt\n\n# Add the following to your .bash_rc or .bash_profile \nexport PYTHONPATH=/path/to/jiant:$PYTHONPATH\n```\nIf you plan to contribute to jiant, install additional dependencies with `pip install -r requirements-dev.txt`.\n\nTo install `jiant` from source (alternative for researchers):\n```\ngit clone https://github.com/nyu-mll/jiant.git\ncd jiant\npip install . -e\n```\n\nTo install `jiant` from pip (recommended if you just want to train/use a model):\n```\npip install jiant\n```\n\nWe recommended that you install `jiant` in a virtual environment or a conda environment.\n\nTo check `jiant` was correctly installed, run a [simple example](./examples/notebooks/simple_api_fine_tuning.ipynb).\n\n\n## Quick Introduction\nThe following example fine-tunes a RoBERTa model on the MRPC dataset.\n\nPython version:\n```python\nfrom jiant.proj.simple import runscript as run\nimport jiant.scripts.download_data.runscript as downloader\n\nEXP_DIR = \"/path/to/exp\"\n\n# Download the Data\ndownloader.download_data([\"mrpc\"], f\"{EXP_DIR}/tasks\")\n\n# Set up the arguments for the Simple API\nargs = run.RunConfiguration(\n   run_name=\"simple\",\n   exp_dir=EXP_DIR,\n   data_dir=f\"{EXP_DIR}/tasks\",\n   hf_pretrained_model_name_or_path=\"roberta-base\",\n   tasks=\"mrpc\",\n   train_batch_size=16,\n   num_train_epochs=3\n)\n\n# Run!\nrun.run_simple(args)\n```\n\nBash version:\n```bash\nEXP_DIR=/path/to/exp\n\npython jiant/scripts/download_data/runscript.py \\\n    download \\\n    --tasks mrpc \\\n    --output_path ${EXP_DIR}/tasks\npython jiant/proj/simple/runscript.py \\\n    run \\\n    --run_name simple \\\n    --exp_dir ${EXP_DIR}/ \\\n    --data_dir ${EXP_DIR}/tasks \\\n    --hf_pretrained_model_name_or_path roberta-base \\\n    --tasks mrpc \\\n    --train_batch_size 16 \\\n    --num_train_epochs 3\n```\n\nExamples of more complex training workflows are found [here](./examples/).\n\n\n## Contributing\nThe `jiant` project's contributing guidelines can be found [here](CONTRIBUTING.md).\n\n## Looking for `jiant v1.3.2`?\n`jiant v1.3.2` has been moved to [jiant-v1-legacy](https://github.com/nyu-mll/jiant-v1-legacy) to support ongoing research with the library. `jiant v2.x.x` is more modular and scalable than `jiant v1.3.2` and has been designed to reflect the needs of the current NLP research community. We strongly recommended any new projects use `jiant v2.x.x`.\n\n`jiant 1.x` has been used in in several papers. For instructions on how to reproduce papers by `jiant` authors that refer readers to this site for documentation (including Tenney et al., Wang et al., Bowman et al., Kim et al., Warstadt et al.), refer to the [jiant-v1-legacy](https://github.com/nyu-mll/jiant-v1-legacy) README.\n\n## Citation\n\nIf you use `jiant \u2265 v2.0.0` in academic work, please cite it directly:\n\n```\n@misc{phang2020jiant,\n    author = {Jason Phang and Phil Yeres and Jesse Swanson and Haokun Liu and Ian F. Tenney and Phu Mon Htut and Clara Vania and Alex Wang and Samuel R. Bowman},\n    title = {\\texttt{jiant} 2.0: A software toolkit for research on general-purpose text understanding models},\n    howpublished = {\\url{http://jiant.info/}},\n    year = {2020}\n}\n```\n\nIf you use `jiant \u2264 v1.3.2` in academic work, please use the citation found [here](https://github.com/nyu-mll/jiant-v1-legacy).\n\n## Acknowledgments\n\n- This work was made possible in part by a donation to NYU from Eric and Wendy Schmidt made\nby recommendation of the Schmidt Futures program, and by support from Intuit Inc.\n- We gratefully acknowledge the support of NVIDIA Corporation with the donation of a Titan V GPU used at NYU in this work.\n- Developer Jesse Swanson is supported by the Moore-Sloan Data Science Environment as part of the NYU Data Science Services initiative.\n\n## License\n`jiant` is released under the [MIT License](https://github.com/nyu-mll/jiant/blob/master/LICENSE).\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "State-of-the-art Natural Language Processing toolkit for multi-task and transfer learning built on PyTorch.",
    "version": "2.2.0",
    "split_keywords": [
        "nlp",
        "deep",
        "learning",
        "transformer",
        "pytorch",
        "tensorflow",
        "bert",
        "gpt",
        "gpt-2",
        "google",
        "nyu",
        "datasets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "b477f62669fb949e7e78519a00e65161",
                "sha256": "8ffe25faf90e4e075d3516e2b7f06b86d1a493165141f82110a1f3dbe93c27e7"
            },
            "downloads": -1,
            "filename": "jiant-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b477f62669fb949e7e78519a00e65161",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6.0",
            "size": 253045,
            "upload_time": "2021-05-10T18:56:39",
            "upload_time_iso_8601": "2021-05-10T18:56:39.341493Z",
            "url": "https://files.pythonhosted.org/packages/2d/6a/c6d3e80d7ea2b36d282739bcca39bb99bdeb49e423e9f712705fa2d01850/jiant-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "765ee98f15b86e8adba77bb3d2fae486",
                "sha256": "6355bcb185eab5c84fe9ceb8cf732efdabc121242cc8e5d61651fb290f4517fb"
            },
            "downloads": -1,
            "filename": "jiant-2.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "765ee98f15b86e8adba77bb3d2fae486",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.0",
            "size": 165264,
            "upload_time": "2021-05-10T18:56:41",
            "upload_time_iso_8601": "2021-05-10T18:56:41.366778Z",
            "url": "https://files.pythonhosted.org/packages/7c/68/7a7bf075d2d37e16cff893ff4ce8c24a2460212425faa008e0758ab0db31/jiant-2.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-10 18:56:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "nyu-mll",
    "error": "Could not fetch GitHub repository",
    "lcname": "jiant"
}
        
Elapsed time: 0.33910s