模型:

AdapterHub/bert-base-uncased-pf-mrpc

英文

适配器 AdapterHub/bert-large-uncased-pf-mrpc 适配器

适用于 bert-large-uncased 模型的适配器,该模型在数据集上进行了训练,并包含了用于分类的预测头。

该适配器是为了与 adapter-transformers 库一起使用而创建的。

用法

首先,安装 adapter-transformers :

pip install -U adapter-transformers

注意:adapter-transformers 是 transformers 的一个分支,具有适配器支持,可以作为其替代品。 More

现在,可以按如下方式加载和激活适配器:

from transformers import AutoModelWithHeads

model = AutoModelWithHeads.from_pretrained("bert-base-uncased")
adapter_name = model.load_adapter("AdapterHub/bert-base-uncased-pf-mrpc", source="hf")
model.active_adapters = adapter_name

架构与训练

该适配器的训练代码可在 https://github.com/adapter-hub/efficient-task-transfer 找到。特别是,所有任务的训练配置都可以在其中找到 here

评估结果

更多结果信息请参阅 the paper

引用

如果您使用了该适配器,请引用我们的论文 "What to Pre-Train on? Efficient Intermediate Task Selection"

@inproceedings{poth-etal-2021-pre,
    title = "{W}hat to Pre-Train on? {E}fficient Intermediate Task Selection",
    author = {Poth, Clifton  and
      Pfeiffer, Jonas  and
      R{"u}ckl{'e}, Andreas  and
      Gurevych, Iryna},
    booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing",
    month = nov,
    year = "2021",
    address = "Online and Punta Cana, Dominican Republic",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.emnlp-main.827",
    pages = "10585--10605",
}