X L M Roberta Alexa Intents Classification
qanastekIntroduction
The XLMRoberta-Alexa-Intents-Classification model is a multilingual intent classification model designed for natural language understanding tasks. It leverages the XLM-RoBERTa architecture to predict user intents from voice assistant queries, supporting over 50 languages. This model is particularly geared towards applications like smart home automation, music control, and general interaction tasks in intelligent voice assistants.
Architecture
The model is based on the XLM-RoBERTa architecture, a transformer-based model pre-trained for multilingual tasks. It facilitates natural language understanding by classifying text into predefined intents. The architecture supports multiple languages, enabling robust performance across diverse linguistic inputs.
Training
The model is trained on the MASSIVE dataset, which includes over 1 million utterances across 51 languages. This dataset annotates utterances for tasks like intent prediction and slot annotation, covering 60 intents and 55 slot types. The training process involves fine-tuning the transformer model on this dataset to optimize intent classification accuracy.
Guide: Running Locally
-
Installation: Ensure that Python and pip are installed. Then, install the
transformers
library using:pip install transformers
-
Model Loading:
from transformers import AutoTokenizer, AutoModelForSequenceClassification, TextClassificationPipeline model_name = 'qanastek/XLMRoberta-Alexa-Intents-Classification' tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSequenceClassification.from_pretrained(model_name) classifier = TextClassificationPipeline(model=model, tokenizer=tokenizer)
-
Inference:
res = classifier("réveille-moi à neuf heures du matin le vendredi") print(res) # Output: [{'label': 'alarm_set', 'score': 0.9998375177383423}]
For optimal performance, consider using cloud GPUs such as those available from AWS, Google Cloud, or Azure to handle the computational load of processing large datasets or real-time queries.
License
The model is released under the CC-BY-4.0 license, allowing for sharing and adaptation with appropriate credit. Users are free to use, distribute, and build upon the model, provided they adhere to the terms of the license.