Giter VIP home page Giter VIP logo

mlartist / intent-detection-using-xlm-roberta Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 97 KB

This repository is a comprehensive project that leverages the XLM-Roberta model for intent detection. This repository is a valuable resource for developers looking to build and fine-tune intent detection models based on state-of-the-art techniques.

Dockerfile 1.04% Jupyter Notebook 83.49% Python 15.47%
intent intent-classification intent-detection intent-prediction intent-recognition roberta-large xlm-roberta xlmroberta natural-language-processing natural-language-understanding

intent-detection-using-xlm-roberta's Introduction

Intent Detection using XLM-Roberta

Overview

This repository contains code and resources for building an Intent Detection model using the XLM-Roberta architecture. Intent detection is a common task in Natural Language Processing (NLP), where the goal is to determine the intent or purpose behind a user's input.

In this project, we leverage the power of the Hugging Face Transformers library to fine-tune an XLM-Roberta model for intent detection tasks. The model can be used for various applications, including chatbots, virtual assistants, and customer support systems.

Features

  • Preprocessing scripts for data preparation.
  • Fine-tuning scripts for training the XLM-Roberta model on your dataset.
  • Inference code for predicting intents using the trained model.
  • Example notebooks and usage instructions.

Getting Started

Prerequisites

Before getting started, ensure you have the following prerequisites:

  • Python 3.x
  • PyTorch
  • Hugging Face Transformers library
  • Other dependencies as specified in requirements.txt

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/MLArtist/intent-detection-using-XLM-Roberta.git
    cd intent-detection-using-XLM-Roberta
  2. Install the required dependencies:

    pip install -r requirements.txt

Usage

Option 1: Bare Metal

To perform inference on your local machine without using Docker, follow these steps:

  1. Download the fine-tuned model weights from the Google Drive.

  2. Place the downloaded files in the 'xlm-roberta-large-custom-trained' folder.

  3. Once you have completed these steps, run the inference server:

    python -m server --model xlm-roberta-large-custom-trained
  4. Test the inference server

    curl http://localhost:8080/ready
    curl -X POST -H "Content-Type: application/json" -d '{"text": "when is the next flight to new york"}' http://localhost:8080/intent

Option 2: Via Docker

To perform inference using Docker, follow these steps:

  1. Download the fine-tuned model weights from the Google Drive.

  2. Place the downloaded files in the 'xlm-roberta-large-custom-trained' folder.

  3. Build the Docker image:

    docker build -t my-roberta-app -f Dockerfile .
  4. Run the Docker container, mapping port 8080 (or your preferred port) and specifying the model:

    docker-compose -f docker-compose.yml up
  5. test the inference server

    curl http://localhost:8080/ready
    curl -X POST -H "Content-Type: application/json" -d '{"text": "when is the next flight to new york"}' http://localhost:8080/intent

Training Instructions

Use the example notebook Train.ipynb in the notebooks/ directory for detailed training and offline model evaluation.

Acknowledgments

Authors

For any inquiries or issues, please open an issue.

intent-detection-using-xlm-roberta's People

Contributors

mlartist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fofna

intent-detection-using-xlm-roberta's Issues

model

i didn't find .bin model i found the model.safetensors inted of this. Where is the .bin model

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.