michiyasunaga / LinkBERT-large

huggingface.co
Total runs: 3.2K
24-hour runs: 0
7-day runs: 30
30-day runs: 264
Model's Last Updated: March 31 2022
text-classification

Introduction of LinkBERT-large

Model Details of LinkBERT-large

LinkBERT-large

LinkBERT-large model pretrained on English Wikipedia articles along with hyperlink information. It is introduced in the paper LinkBERT: Pretraining Language Models with Document Links (ACL 2022) . The code and data are available in this repository .

Model description

LinkBERT is a transformer encoder (BERT-like) model pretrained on a large corpus of documents. It is an improvement of BERT that newly captures document links such as hyperlinks and citation links to include knowledge that spans across multiple documents. Specifically, it was pretrained by feeding linked documents into the same language model context, besides a single document.

LinkBERT can be used as a drop-in replacement for BERT. It achieves better performance for general language understanding tasks (e.g. text classification), and is also particularly effective for knowledge-intensive tasks (e.g. question answering) and cross-document tasks (e.g. reading comprehension, document retrieval).

Intended uses & limitations

The model can be used by fine-tuning on a downstream task, such as question answering, sequence classification, and token classification. You can also use the raw model for feature extraction (i.e. obtaining embeddings for input text).

How to use

To use the model to get the features of a given text in PyTorch:

from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained('michiyasunaga/LinkBERT-large')
model = AutoModel.from_pretrained('michiyasunaga/LinkBERT-large')
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)
last_hidden_states = outputs.last_hidden_state

For fine-tuning, you can use this repository or follow any other BERT fine-tuning codebases.

Evaluation results

When fine-tuned on downstream tasks, LinkBERT achieves the following results.

General benchmarks ( MRQA and GLUE ):

HotpotQA TriviaQA SearchQA NaturalQ NewsQA SQuAD GLUE
F1 F1 F1 F1 F1 F1 Avg score
BERT-base 76.0 70.3 74.2 76.5 65.7 88.7 79.2
LinkBERT-base 78.2 73.9 76.8 78.3 69.3 90.1 79.6
BERT-large 78.1 73.7 78.3 79.0 70.9 91.1 80.7
LinkBERT-large 80.8 78.2 80.5 81.0 72.6 92.7 81.1
Citation

If you find LinkBERT useful in your project, please cite the following:

@InProceedings{yasunaga2022linkbert,
  author =  {Michihiro Yasunaga and Jure Leskovec and Percy Liang},
  title =   {LinkBERT: Pretraining Language Models with Document Links},
  year =    {2022},  
  booktitle = {Association for Computational Linguistics (ACL)},  
}

Runs of michiyasunaga LinkBERT-large on huggingface.co

3.2K
Total runs
0
24-hour runs
0
3-day runs
30
7-day runs
264
30-day runs

More Information About LinkBERT-large huggingface.co Model

More LinkBERT-large license Visit here:

https://choosealicense.com/licenses/apache-2.0

LinkBERT-large huggingface.co

LinkBERT-large huggingface.co is an AI model on huggingface.co that provides LinkBERT-large's model effect (), which can be used instantly with this michiyasunaga LinkBERT-large model. huggingface.co supports a free trial of the LinkBERT-large model, and also provides paid use of the LinkBERT-large. Support call LinkBERT-large model through api, including Node.js, Python, http.

michiyasunaga LinkBERT-large online free

LinkBERT-large huggingface.co is an online trial and call api platform, which integrates LinkBERT-large's modeling effects, including api services, and provides a free online trial of LinkBERT-large, you can try LinkBERT-large online for free by clicking the link below.

michiyasunaga LinkBERT-large online free url in huggingface.co:

https://huggingface.co/michiyasunaga/LinkBERT-large

LinkBERT-large install

LinkBERT-large is an open source model from GitHub that offers a free installation service, and any user can find LinkBERT-large on GitHub to install. At the same time, huggingface.co provides the effect of LinkBERT-large install, users can directly use LinkBERT-large installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

LinkBERT-large install url in huggingface.co:

https://huggingface.co/michiyasunaga/LinkBERT-large

Url of LinkBERT-large

Provider of LinkBERT-large huggingface.co

michiyasunaga
ORGANIZATIONS

Other API from michiyasunaga