View on huggingface.co

model = AutoAdapterModel.from_pretrained("bert-base-uncased")
model.load_adapter("domadapter/joint_dt_fiction_government", source="hf")

Description

Adapter domadapter/joint_dt_fiction_government for bert-base-uncased

An adapter for the bert-base-uncased model that was trained on the nli/multinli dataset and includes a prediction head for classification.

This adapter was created for usage with the adapter-transformers library.

Usage

First, install adapter-transformers:

pip install -U adapter-transformers

Note: adapter-transformers is a fork of transformers that acts as a drop-in replacement with adapter support. More

Now, the adapter can be loaded and activated like this:

from transformers import AutoAdapterModel

model = AutoAdapterModel.from_pretrained("bert-base-uncased")
adapter_name = model.load_adapter("domadapter/joint_dt_fiction_government", source="hf", set_active=True)

Architecture & Training

Evaluation results

Citation

Properties

Pre-trained model
bert-base-uncased
Adapter type
Prediction Head
  Yes
Task
Natural Language Inference
Dataset

Architecture

{
  "adapter_residual_before_ln": false,
  "cross_adapter": false,
  "factorized_phm_W": true,
  "factorized_phm_rule": false,
  "hypercomplex_nonlinearity": "glorot-uniform",
  "init_weights": "bert",
  "inv_adapter": null,
  "inv_adapter_reduction_factor": null,
  "is_parallel": false,
  "learn_phm": true,
  "leave_out": [],
  "ln_after": false,
  "ln_before": false,
  "mh_adapter": false,
  "non_linearity": "relu",
  "original_ln_after": true,
  "original_ln_before": true,
  "output_adapter": true,
  "phm_bias": true,
  "phm_c_init": "normal",
  "phm_dim": 4,
  "phm_init_range": 0.0001,
  "phm_layer": false,
  "phm_rank": 1,
  "reduction_factor": 16,
  "residual_before_ln": true,
  "scaling": 1.0,
  "shared_W_phm": false,
  "shared_phm_rule": true,
  "use_gating": false
}

Citations

Task
@misc{williams2017broadcoverage,
  title={A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference},
  author={Adina Williams and Nikita Nangia and Samuel R. Bowman},
  year={2017},
  eprint={1704.05426},
  archivePrefix={arXiv},
  primaryClass={cs.CL}
}