Package: jiant
jiantis an NLP toolkitThe multitask and transfer learning toolkit for natural language processing researchWhy should I usejiant?jiantsupportsmultitask learningjiantsupportstransfer learningjiantsupports50+ natural language understanding tasksjiantsupports the following benchmarks:GLUESuperGLUEXTREMEjiantis 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 aboutjiant:jiantis configuration file drivenjiantis built withPyTorchjiantintegrates withdatasetsto manage task datajiantintegrates withtransformersto manage models and tokenizers.Getting StartedGet started with some simpleExamplesLearn more aboutjiantby reading ourGuidesSee ourlist of supported tasksInstallationTo importjiantfrom source (recommended for researchers):gitclonehttps://github.com/nyu-mll/jiant.gitcdjiant
pipinstall-rrequirements.txt# Add the following to your .bash_rc or .bash_profileexportPYTHONPATH=/path/to/jiant:$PYTHONPATHIf you plan to contribute to jiant, install additional dependencies withpip install -r requirements-dev.txt.To installjiantfrom source (alternative for researchers):git clone https://github.com/nyu-mll/jiant.git
cd jiant
pip install . -eTo installjiantfrom pip (recommended if you just want to train/use a model):pip install jiantWe recommended that you installjiantin a virtual environment or a conda environment.To checkjiantwas correctly installed, run asimple example.Quick IntroductionThe following example fine-tunes a RoBERTa model on the MRPC dataset.Python version:fromjiant.proj.simpleimportrunscriptasrunimportjiant.scripts.download_data.runscriptasdownloaderEXP_DIR="/path/to/exp"# Download the Datadownloader.download_data(["mrpc"],f"{EXP_DIR}/tasks")# Set up the arguments for the Simple APIargs=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:EXP_DIR=/path/to/exp

pythonjiant/scripts/download_data/runscript.py\download\--tasksmrpc\--output_path${EXP_DIR}/tasks
pythonjiant/proj/simple/runscript.py\run\--run_namesimple\--exp_dir${EXP_DIR}/\--data_dir${EXP_DIR}/tasks\--hf_pretrained_model_name_or_pathroberta-base\--tasksmrpc\--train_batch_size16\--num_train_epochs3Examples of more complex training workflows are foundhere.ContributingThejiantproject's contributing guidelines can be foundhere.Looking forjiant v1.3.2?jiant v1.3.2has been moved tojiant-v1-legacyto support ongoing research with the library.jiant v2.x.xis more modular and scalable thanjiant v1.3.2and has been designed to reflect the needs of the current NLP research community. We strongly recommended any new projects usejiant v2.x.x.jiant 1.xhas been used in in several papers. For instructions on how to reproduce papers byjiantauthors 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 thejiant-v1-legacyREADME.CitationIf you usejiant ≥ v2.0.0in 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 usejiant ≤ v1.3.2in academic work, please use the citation foundhere.AcknowledgmentsThis 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.Licensejiantis released under theMIT License.