Giter VIP home page Giter VIP logo

fine-tuning-distilbert-for-natural-language-inference's Introduction

Fine-Tuning DistilBERT for Natural Language Inference

Comp 545 - Natural Language Processing

Description

This project involves fine-tuning a DistilBERT model, a lighter version of BERT, to accurately predict text entailment in natural language inference tasks. Utilizing the Hugging Face transformers library, the model learns from a dataset where the objective is to determine if one sentence logically follows from another.

Objectives:

  • Implement a custom neural network module integrating DistilBERT for binary classification.
  • Utilize advanced features of PyTorch and the transformers library for efficient model training and evaluation.
  • Explore and implement techniques like prompt tuning to enhance model input processing and improve prediction accuracy.
  • Benchmark the model's performance using F1 scores and analyze the impact of various tuning techniques.

Technologies Used:

  • Programming Languages: Python
  • Frameworks/Libraries: PyTorch, Hugging Face Transformers, NumPy
  • Tools: Jupyter Notebook, Kaggle

Features:

  • Model Customization: Setup of a custom DistilBERT model within a PyTorch framework to handle specific preprocessing and prediction tasks.
  • Prompt Engineering: Implementation of soft prompts to refine inputs and enhance model responsiveness to nuanced textual features.
  • Performance Evaluation: Use of advanced metrics like F1 score to quantitatively assess model accuracy and effectiveness.
  • Model Training and Tuning: Detailed process documentation for training the model, adjusting parameters, and evaluating performance under different configurations.

Results:

Train and Validation Accuracy of DistilBERT: alt text

Comparison between different models: alt text

alt text

How to Use:

  • Clone the GitHub repository.
  • Ensure all dependencies are installed as listed in requirements.txt.
  • Run the training script code.py to fine-tune the model, followed by the evaluation Jupyter notebooks to assess performance.

fine-tuning-distilbert-for-natural-language-inference's People

Contributors

lauralad 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.