更新:截至2021/10/17,不再積極地維護jiant項目。這意味著將沒有計劃向新圖書館添加新模型,任務或功能或更新支持。
jiant是NLP工具包自然語言處理研究的多任務和轉移學習工具包
我為什麼要使用jiant ?
jiant支持多任務學習jiant支持轉移學習jiant支持50多種自然語言理解任務jiant支持以下基準:jiant是一個研究圖書館,鼓勵用戶擴展,更改和為滿足他們的需求而做出貢獻!您可能想了解的有關jiant的其他一些事情:
jiant是配置文件驅動的jiant是由Pytorch建造的jiant與datasets集集成以管理任務數據jiant與transformers集成在一起,以管理模型和引物器。 jiant的更多信息從來源進口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
export PYTHONPATH=/path/to/jiant: $PYTHONPATH如果您打算為Jiant做出貢獻,請使用pip install -r requirements-dev.txt安裝其他依賴關係。
從Source安裝jiant (研究人員的替代方案):
git clone https://github.com/nyu-mll/jiant.git
cd jiant
pip install . -e
要安裝PIP的jiant (建議您只想訓練/使用型號):
pip install jiant
我們建議您在虛擬環境或CONDA環境中安裝jiant 。
要正確安裝jiant ,請運行一個簡單的示例。
下面的示例微調MRPC數據集上的Roberta模型。
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版本:
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這裡可以找到更複雜的培訓工作流程的示例。
可以在此處找到jiant項目的貢獻指南。
jiant v1.3.2 ? jiant v1.3.2已轉移到Jiant-V1-Legacy,以支持圖書館正在進行的研究。 jiant v2.xx比jiant v1.3.2更模塊化和可擴展性,並且旨在反映當前NLP研究社區的需求。我們強烈建議任何新項目都使用jiant v2.xx
jiant 1.x已在幾篇論文中使用。有關如何重現jiant作者的論文的說明,這些論文將讀者推薦給本網站以獲取文檔(包括Tenney等,Wang等,Wang等,Bowman等,Kim等,Warstadt等),請參閱Jiant-V1-legacy-legacy Readme。
如果您在學術工作中使用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 ,請使用此處的引用。
jiant根據MIT許可發布。