模型:

AdapterHub/roberta-base-pf-squad_v2

英文

适配器 AdapterHub/roberta-base-pf-squad_v2 适用于 roberta-base

一个适用于 roberta-base 模型的适配器,该模型在 qa/squad2 数据集上进行了训练,并包含一个用于问答的预测头。

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

用法

首先,安装 adapter-transformers :

pip install -U adapter-transformers

注意:adapter-transformers 是 transformers 的一个分支,它作为支持适配器的一个可替换组件。 More

现在,可以这样加载和激活适配器:

from transformers import AutoModelWithHeads

model = AutoModelWithHeads.from_pretrained("roberta-base")
adapter_name = model.load_adapter("AdapterHub/roberta-base-pf-squad_v2", 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",
}