Edit model card

distilbert-finetuned-squad

This model is a fine-tuned version of distilbert-base-uncased for the question-answering task. The model has been adapted to extract answers from context passages based on input questions.

Model description

distilbert-finetuned-squad is a distilled version of BERT that has been fine-tuned on a question-answering dataset. The distillation process makes the model smaller and faster while retaining much of the original model's performance. This fine-tuned variant is specifically adapted for tasks that involve extracting answers from given context passages.

Intended uses & limitations

Intended Uses

  • Question Answering: This model is designed to answer questions based on a given context. It can be used in applications such as chatbots, customer support systems, and interactive question-answering systems.
  • Information Retrieval: The model can help extract specific information from large text corpora, making it useful for applications in search engines and content summarization.

Example Usage

Here is a code snippet to load the fine-tuned model and perform question answering:

from transformers import pipeline

# Load the fine-tuned model for question answering
model_checkpoint = "Ashaduzzaman/distilbert-finetuned-squad"

question_answerer = pipeline(
    "question-answering",
    model=model_checkpoint,
)

# Perform question answering on the provided question and context
question = "What is the capital of France?"
context = "The capital of France is Paris."
result = question_answerer(question=question, context=context)

print(result['answer'])

This code demonstrates how to load the model using the transformers library and perform question answering with a sample question and context.

Limitations

  • Dataset Bias: The model's performance is dependent on the quality and diversity of the dataset it was fine-tuned on. Biases in the dataset can affect the model's predictions.
  • Context Limitation: The model may struggle with very long context passages or contexts with complex structures.
  • Generalization: While the model is fine-tuned for question-answering, it may not perform well on questions that require understanding beyond the provided context or involve reasoning over multiple contexts.

Training and evaluation data

The specific dataset used for fine-tuning is not disclosed. However, the model was trained on a dataset typically used for question-answering tasks, which includes a wide range of questions and contexts. Details about the dataset include:

  • Type: Question-Answering
  • Source: Information not specified
  • Size: Information not specified

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 1
  • mixed_precision_training: Native AMP

Training results

The performance metrics and evaluation results of the fine-tuned model are not specified. It is recommended to evaluate the model on your specific use case to determine its effectiveness.

Framework versions

  • Transformers: 4.42.4
  • Pytorch: 2.3.1+cu121
  • Datasets: 2.21.0
  • Tokenizers: 0.19.1
Downloads last month
4
Safetensors
Model size
66.4M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for ashaduzzaman/distilbert-finetuned-squad

Finetuned
(6753)
this model

Dataset used to train ashaduzzaman/distilbert-finetuned-squad