基于Pythorch的多任务和转移学习的最先进的自然语言处理工具包。
jiant的Python项目详细描述
我为什么要使用jiant
?
jiant
支持multitask learningjiant
支持transfer learningjiant
支持50+ natural language understanding tasksjiant
支持以下基准: 在jiant
是一个研究图书馆,鼓励用户扩展、改变和贡献以满足他们的需求!在
关于jiant
你可能想知道的其他一些事情:
jiant
是配置文件驱动的jiant
是用PyTorch生成的jiant
与{a13}集成以管理任务数据jiant
与{a14}集成以管理模型和标记器。在
入门
- 从一些简单的Examples开始
- 通过阅读我们的Guides,了解更多关于
jiant
的信息 - 请看我们的list of supported tasks
安装
要从源导入jiant
(建议研究人员使用):
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 exportPYTHONPATH=/path/to/jiant:$PYTHONPATH
如果您计划对jant有所贡献,请使用pip install -r requirements-dev.txt
安装其他依赖项。在
要从源安装jiant
(研究人员的替代方案):
要从pip安装jiant
(如果您只想训练/使用模型,建议这样做):
pip install jiant
我们建议您在虚拟环境或conda环境中安装jiant
。在
要检查jiant
是否正确安装,请运行simple example。在
快速介绍
下面的示例微调MRPC数据集上的RoBERTa模型。在
Python版本:
fromjiant.proj.simpleimportrunscriptasrunimportjiant.scripts.download_data.runscriptasdownloader# Download the Datadownloader.download_data(["mrpc"],"/content/data")# Set up the arguments for the Simple APIargs=run.RunConfiguration(run_name="simple",exp_dir="/path/to/exp",data_dir="/path/to/exp/tasks",model_type="roberta-base",tasks="mrpc",train_batch_size=16,num_train_epochs=3)# Run!run.run_simple(args)
Bash版本:
python jiant/scripts/download_data/runscript.py \ download \ --tasks mrpc \ --output_path /path/to/exp/tasks python jiant/proj/simple/runscript.py \ run \ --run_name simple \ --exp_dir /path/to/exp \ --data_dir /path/to/exp/tasks \ --model_type roberta-base \ --tasks mrpc \ --train_batch_size 16\ --num_train_epochs 3
更复杂的培训工作流程示例见here。在
贡献
jiant
项目的贡献指南可以在here找到。在
正在寻找jiant v1.3.2
?在
jiant v1.3.2
已移至jiant-v1-legacy,以支持图书馆正在进行的研究。jiant v2.x.x
比jiant v1.3.2
更模块化和可扩展性,其设计反映了当前NLP研究社区的需求。我们强烈建议任何新项目使用jiant v2.x.x
。在
jiant 1.x
已在多篇论文中使用。有关如何复制jiant
作者的论文的说明,这些作者向读者推荐本网站以获取文档(包括Tenney等人、Wang等人、Bowman等人、Kim等人、Warstadt等人),请参阅jiant-v1-legacy自述文件。在
引文
如果您在学术工作中使用jiant ≥ v2.0.0
,请直接引用:
@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}
}
如果你在学术工作中使用jiant ≤ v1.3.2
,请使用找到的引文here。在
致谢
- 这项工作的部分原因是埃里克和温迪·施密特向纽约大学捐款 通过施密特期货项目的推荐,以及Intuit公司的支持
- 我们非常感谢NVIDIA公司的支持,在这项工作中,纽约大学捐赠了Titan V GPU。在
- 开发人员jesseswanson得到了mooresloan数据科学环境的支持,这是纽约大学数据科学服务计划的一部分。在
许可证
jiant
在{a24}下释放。在
- 项目
标签: