Giter Club home page Giter Club logo

kaggle-squad2-albert-qa's Introduction

Kaggle-SQuAD2-Albert-QA

This repository contains the code to train a Question-Answering (QA) model based on the ALBERT language model. The training and evaluation is done on the Stanford Question Answering Dataset (SQuAD) version 2.0. The model is designed to answer questions based on a given context and has been fine-tuned for this specific task.

Key Features

  1. Environment Setup: The code includes the setup for the Python environment, including the installation of necessary libraries and dependencies using pip.
  2. Data Preparation: It provides functions for parsing and preparing the SQuAD 2.0 dataset, including reading JSON files and modifying answer contexts for better alignment.
  3. Custom Dataset: The code defines a custom dataset class for DataLoader, allowing efficient data loading and processing for training and validation.
  4. Model Configuration: It configures the ALBERT model for Question Answering, setting hyperparameters such as learning rate, batch sizes, and number of epochs.
  5. Training: The repository includes the training loop for the QA model, along with logging and metrics tracking. It utilizes PyTorch Lightning for streamlined training.
  6. Learning Rate Finder: There is code to run a learning rate finder, which helps identify an optimal learning rate for training the model.
  7. Model Checkpointing: It implements model checkpointing, saving the best model based on validation loss.
  8. Testing: The code includes an example of how to use the trained model to answer questions from a given context.
  9. Model Saving: It saves the trained model, tokenizer, and training arguments for future use.

kaggle-squad2-albert-qa's People

Contributors

adamcodd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.