How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="whitedevil0089devil/roberta_base")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("whitedevil0089devil/roberta_base")
model = AutoModelForSequenceClassification.from_pretrained("whitedevil0089devil/roberta_base")
Quick Links

roberta_base

This is a fine-tuned RoBERTa model for question-answering classification tasks.

Model Details

  • Base Model: roberta-base
  • Model Type: Sequence Classification
  • Language: English
  • License: Apache 2.0

Model Information

  • Number of Classes: 5
  • Classification Type: grouped_classification
  • Class Names: Empty, Word, Short, Medium, Long

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained('whitedevil0089devil/roberta_base')
model = AutoModelForSequenceClassification.from_pretrained('whitedevil0089devil/roberta_base')

# Example usage
question = "Your question here"
inputs = tokenizer(question, return_tensors="pt", truncation=True, padding=True, max_length=384)

with torch.no_grad():
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
    predicted_class = torch.argmax(outputs.logits, dim=-1).item()
    confidence = predictions[0][predicted_class].item()

print(f"Predicted class: {predicted_class}")
print(f"Confidence: {confidence:.4f}")

Training Details

This model was fine-tuned using:

  • Framework: PyTorch + Transformers
  • Optimization: AdamW with learning rate scheduling
  • Training Strategy: Early stopping with validation monitoring
  • Hardware: Trained on Google Colab (T4 GPU)

Intended Use

This model is designed for question-answering classification tasks. It can be used to:

  • Classify questions into predefined categories
  • Provide automated responses based on question classification
  • Support Q&A systems and chatbots

Limitations

  • Model performance depends on the similarity between training data and inference data
  • May not generalize well to domains significantly different from training data
  • Classification accuracy may vary based on question complexity and length

Citation

If you use this model, please cite:

@misc{roberta-qa-model,
  title={Fine-tuned RoBERTa for Question-Answer Classification},
  author={Your Name},
  year={2024},
  url={https://huggingface.co/whitedevil0089devil/roberta_base}
}
Downloads last month
2
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for whitedevil0089devil/roberta_base

Finetuned
(2329)
this model