electra base de squad2

deutsche-telekom

Introduction

The electra-base-de-squad2 is a German Question Answering model developed by Deutsche Telekom. It is fine-tuned using the deQuAD dataset, which includes 130,000 training and 11,000 test question-answer pairs. The model is based on electra-base-german-uncased and is optimized for question answering tasks in the German language.

Architecture

This model utilizes the electra-base-german-uncased architecture, which is part of the ELECTRA model family. ELECTRA is known for its efficiency and effectiveness in natural language processing tasks, particularly for tasks involving the German language.

Training

The model was trained using the deQuAD2.0 dataset, which is approximately 42MB for training and 4MB for evaluation. The training infrastructure involved 8 V100 GPUs to achieve optimal performance. The model was benchmarked against other German language models, outperforming them in Exact Match and F1 scores.

Guide: Running Locally

To use this model locally, follow these steps:

  1. Install Transformers Library:

    pip install transformers
    
  2. Load the Model in a Pipeline:

    from transformers import pipeline
    
    qa_pipeline = pipeline(
        "question-answering",
        model="deutsche-telekom/electra-base-de-squad2",
        tokenizer="deutsche-telekom/electra-base-de-squad2"
    )
    
  3. Prepare Context and Questions:

    contexts = ['Your context goes here']*2
    questions = ["Your question here", "Another question here"]
    
  4. Execute the Pipeline:

    answers = qa_pipeline(context=contexts, question=questions)
    
  5. Output: The pipeline will return the answers with their confidence scores.

For enhanced performance, consider using cloud GPUs such as AWS EC2 instances with GPU options or Google Cloud Platform's AI Platform.

License

This model is licensed under the MIT License. It was developed by Fang Xu and Deutsche Telekom AG in 2021.

More Related APIs in Question Answering