Skip to main content
ToolPotion
AI Advisor
Submit a Tool (Free)

SpanBERT

SpanBERT is an AI model focused on improving pre-training by representing and predicting spans. It offers pre-trained base and large cased models, compatible with HuggingFace BERT formats. The repository provides code for using and evaluating SpanBERT on various NLP tasks, including question answering and relation extraction.

View Repository
Share
View Repository
Share

SpanBERT is an advanced AI model developed by Facebook Research, designed to enhance pre-training techniques by focusing on the representation and prediction of text spans. This repository provides the necessary code and models for researchers and developers to utilize and evaluate SpanBERT's capabilities.

Read More

The project offers pre-trained models in both base and large cased versions. These models share the same configuration as BERT but incorporate distinct masking schemes and training objectives, as detailed in the accompanying paper. The SpanBERT (base & cased) model features a 12-layer architecture with 768 hidden units and 12 heads, totaling 110 million parameters. The larger SpanBERT (large & cased) model boasts a 24-layer architecture, 1024 hidden units, 16 heads, and 340 million parameters. These models are designed for seamless integration, adopting the format of HuggingFace BERT models, allowing for easy substitution.

This repository includes comprehensive code for fine-tuning SpanBERT on a variety of Natural Language Processing (NLP) tasks. Specific scripts are provided for fine-tuning on SQuAD 1.1 and SQuAD 2.0 question answering datasets, TACRED for relation extraction, and MRQA benchmarks which encompass datasets like NewsQA, TriviaQA, SearchQA, HotpotQA, and NaturalQuestions. Additionally, code for fine-tuning on GLUE tasks, such as RTE, is available. For coreference resolution tasks, a separate TensorFlow implementation is linked.

Performance benchmarks are presented, showcasing SpanBERT's superior results compared to BERT on SQuAD 1.1, SQuAD 2.0, Coref, and TACRED datasets. For instance, SpanBERT (large) achieves an F1 score of 94.6 on SQuAD 1.1 and 88.7 on SQuAD 2.0, outperforming BERT (large). The project also facilitates the download of fine-tuned models for downstream tasks, simplifying the adoption process for users.

SpanBERT is released under the CC-BY-NC 4.0 license, which applies to both the code and the pre-trained models. This makes it accessible for non-commercial research and development. The repository encourages contributions and provides contact information for inquiries and support.

  • CategoryAI Models & LLMs
  • Pricing ModelOpen source
  • DeploymentCloud, Self-hosted
  • PlatformsWeb

  • Pre-trained SpanBERT models (base and large, cased)

  • Code for using and evaluating SpanBERT

  • Fine-tuning scripts for SQuAD 1.1 and SQuAD 2.0

  • Fine-tuning scripts for TACRED relation extraction

  • Fine-tuning scripts for MRQA datasets (NewsQA, TriviaQA, etc.)

  • Fine-tuning scripts for GLUE tasks (RTE)

  • Compatibility with HuggingFace BERT model formats

  • Coreference resolution fine-tuning code available

  • Performance benchmarks against BERT

  • Downloadable fine-tuned models for downstream tasks

  • SpanBERT: Improving Pre-training by Representing and Predicting Spans paper implementation

  1. Access code: Clone the SpanBERT GitHub repository.

  2. Set up environment: Install required dependencies, including Apex (specific commit recommended).

  3. Load pre-trained models: Utilize provided scripts to load base or large cased SpanBERT models.

  4. Fine-tune models: Execute provided Python scripts for tasks like SQuAD, TACRED, MRQA, or GLUE.

  5. Integrate via API: Adapt model usage for custom applications, leveraging HuggingFace compatibility.

  6. Evaluate performance: Run evaluation scripts to assess model performance on specific NLP tasks.

  7. Download fine-tuned models: Use provided scripts to obtain pre-trained models for downstream tasks.

  • Question Answering
  • Relation Extraction
  • Coreference Resolution
  • Natural Language Understanding
  • Text Span Prediction
  • Research and Development
  • Benchmark Evaluation

Popular AI Tools Like SpanBERT

MPNet

AI GitHub Repos

MPNet is a novel pre-training method for language understanding tasks, improving upon BERT and XLNet. It offers a unified implementation for various pre-training models and…

AI Models & LLMs
View Tool

AI GitHub Repos

Novel pre-training method for language understanding tasks, improving upon BERT and XLNet. It offers a unified implementation for various pre-training models and…MPNet is a novel pre-training method for language understanding tasks, improving upon BERT and XLNet. It offers a unified implementation for various pre-training models and…

AI Models & LLMs
See the Top 250 AI GitHub Repos

ConvBERT

AI GitHub Repos

ConvBERT is an open-source AI model for pre-training language models, introducing a novel architecture with span-based dynamic convolution. This GitHub repository provides the…

AI Models & LLMs
View Tool

AI GitHub Repos

Open-source AI model for pre-training language models, introducing a novel architecture with span-based dynamic convolution. This GitHub repository provides the…ConvBERT is an open-source AI model for pre-training language models, introducing a novel architecture with span-based dynamic convolution. This GitHub repository provides the…

AI Models & LLMs
See the Top 250 AI GitHub Repos

DeBERTa is a large-scale pre-trained language model developed by Microsoft Research. It surpasses T5 11B models in performance and achieves human-level results on SuperGLUE…

AI Models & LLMs
View Tool

Large-scale pre-trained language model developed by Microsoft Research. It surpasses T5 11B models in performance and achieves human-level results on SuperGLUE…DeBERTa is a large-scale pre-trained language model developed by Microsoft Research. It surpasses T5 11B models in performance and achieves human-level results on SuperGLUE…

AI Models & LLMs
See the Top 5 AI Models

XLM-RoBERTa is a multilingual model pre-trained on 2.5TB of data across 100 languages. It excels in tasks like sequence classification and token classification, making it a…

AI Models & LLMs
View Tool

Multilingual model pre-trained on 2.5TB of data across 100 languages. It excels in tasks like sequence classification and token classification, making it a…XLM-RoBERTa is a multilingual model pre-trained on 2.5TB of data across 100 languages. It excels in tasks like sequence classification and token classification, making it a…

FeaturedAI Models & LLMs
See the Top 5 AI Models

DeepSeek-V3

AI GitHub Repos

DeepSeek-V3 is an open-weight Mixture-of-Experts language model from DeepSeek, with 671 billion total parameters and 37 billion activated per token. Pre-trained on 14.8 trillion…

AI Models & LLMs
View Tool

AI GitHub Repos

Open-weight Mixture-of-Experts language model from DeepSeek, with 671 billion total parameters and 37 billion activated per token. Pre-trained on 14.8 trillion…DeepSeek-V3 is an open-weight Mixture-of-Experts language model from DeepSeek, with 671 billion total parameters and 37 billion activated per token. Pre-trained on 14.8 trillion…

AI Models & LLMs
See the Top 250 AI GitHub Repos

BERT offers two multilingual models: Cased and Uncased, supporting over 100 languages. The Cased model is recommended for non-Latin alphabets and general use, while the Uncased…

AI Models & LLMs

Ranked #50 in LLMs

View Tool

Offers two multilingual models: Cased and Uncased, supporting over 100 languages. The Cased model is recommended for non-Latin alphabets and general use, while the Uncased…BERT offers two multilingual models: Cased and Uncased, supporting over 100 languages. The Cased model is recommended for non-Latin alphabets and general use, while the Uncased…

AI Models & LLMs
Ranked #50 in LLMs

BERT base model (uncased) is a pretrained transformer model designed for understanding the English language. It utilizes masked language modeling and next sentence prediction to…

Natural Language Processing Tools
View Tool

BERT base model (uncased) is a pretrained transformer model designed for understanding the English language. It utilizes masked language modeling and next sentence prediction to…

FeaturedNatural Language Processing Tools
See the Top 5 AI Models

The BigBird base model is a transformer that extends BERT to handle much longer sequences using block sparse attention. It is pre-trained on English text for masked language…

AI Models & LLMs
View Tool

The BigBird base model is a transformer that extends BERT to handle much longer sequences using block sparse attention. It is pre-trained on English text for masked language…

AI Models & LLMs
See the Top 5 AI Models
1 of 8