Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

deepset
/
roberta-base-squad2

Question Answering
Transformers
PyTorch
google-tensorflow TensorFlow
JAX
Rust
Safetensors
English
roberta
Eval Results (legacy)
Model card Files Files and versions
xet
Community
35

Instructions to use deepset/roberta-base-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use deepset/roberta-base-squad2 with Transformers:

    # Use a pipeline as a high-level helper
    # Warning: Pipeline type "question-answering" is no longer supported in transformers v5.
    # You must load the model directly (see below) or downgrade to v4.x with:
    # pip install "transformers<5.0.0"
    from transformers import pipeline
    
    pipe = pipeline("question-answering", model="deepset/roberta-base-squad2")
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForQuestionAnswering
    
    tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2")
    model = AutoModelForQuestionAnswering.from_pretrained("deepset/roberta-base-squad2", device_map="auto")
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
roberta-base-squad2
457 kB
Ctrl+K
Ctrl+K
  • 17 contributors
History: 2 commits
system's picture
system HF Staff
Update merges.txt
bc24f6c over 6 years ago
  • .gitattributes
    345 Bytes
    initial commit over 6 years ago
  • merges.txt
    456 kB
    Update merges.txt over 6 years ago