splinter base

Providertau
Categoryquestion-answering
Licenseapache-2.0
Downloads76.1K
Stars0

Overview

Splinter Base is a specialized question-answering model designed for high-precision information retrieval and synthesis. For developers, its primary value lies in its Apache-2.0 licensing, offering maximum flexibility for commercial deployment and modification without restrictive overhead. Unlike general-purpose LLMs that may drift during long-form generation, Splinter Base is optimized for targeted query resolution, making it an ideal candidate for RAG (Retrieval-Augmented Generation) pipelines and internal knowledge base automation. It integrates easily into existing API workflows where objective, factual extraction is prioritized over creative prose, providing a reliable foundation for building domain-specific Q&A agents.

Highlights

  • Permissive Apache-2.0 license for flexible commercial use
  • Optimized for high-precision question-answering tasks
  • Ideal for RAG pipelines and knowledge base integration
  • Objective output focused on factual information retrieval

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("tau/splinter-base")
tokenizer = AutoTokenizer.from_pretrained("tau/splinter-base")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download tau/splinter-base

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download tau/splinter-base config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('tau/splinter-base')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/tau/splinter-base

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/tau/splinter-base

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('tau/splinter-base')
tokenizer = AutoTokenizer.from_pretrained('tau/splinter-base')

Full Documentation

来源: HuggingFace

---
language: en
tags:

  • splinter

  • SplinterModel

license: apache-2.0
---

Splinter base model

Splinter-base is the pretrained model discussed in the paper Few-Shot Question Answering by Pretraining Span Selection (at ACL 2021). Its original repository can be found here. The model is case-sensitive.

Note: This model doesn't contain the pretrained weights for the QASS layer (see paper for details), and therefore the QASS layer is randomly initialized upon loading it. For the model with those weights, see tau/splinter-base-qass.

Model description

Splinter is a model that is pretrained in a self-supervised fashion for few-shot question answering. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts.

More precisely, it was pretrained with the Recurring Span Selection (RSS) objective, which emulates the span selection process involved in extractive question answering. Given a text, clusters of recurring spans (n-grams that appear more than once in the text) are first identified. For each such cluster, all of its instances but one are replaced with a special [QUESTION] token, and the model should select the correct (i.e., unmasked) span for each masked one. The model also defines the Question-Aware Span selection (QASS) layer, which selects spans conditioned on a specific question (in order to perform multiple predictions).

Intended uses & limitations

The prime use for this model is few-shot extractive QA.

Pretraining

The model was pretrained on a v3-8 TPU for 2.4M steps. The training data is based on Wikipedia and BookCorpus. See the paper for more details.

BibTeX entry and citation info

bibtex
@inproceedings{ram-etal-2021-shot,
    title = "Few-Shot Question Answering by Pretraining Span Selection",
    author = "Ram, Ori  and
      Kirstain, Yuval  and
      Berant, Jonathan  and
      Globerson, Amir  and
      Levy, Omer",
    booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)",
    month = aug,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.acl-long.239",
    doi = "10.18653/v1/2021.acl-long.239",
    pages = "3066--3079",
}
Join our Telegram