模型:

AdapterHub/bert-base-uncased-pf-emotion

英文

适配器 AdapterHub/bert-base-uncased-pf-emotion 对bert-base-uncased的适配器

这是一个对bert-base-uncased模型的适配器,该模型是在 emotion 数据集上训练的,并包含用于分类的预测头。

此适配器适用于 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-emotion", 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",
}