Downloads · 30 days
7
30% of all-time downloads
paulbg/nebriq-model-classifier
nebriq-model-classifier is a text classification model from paulbg. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
7
30% of all-time downloads
All-time downloads
23
Public
Parameters
67M
536 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
nebriq-model-classifierModel name: nebriq-model-classifier
Model type: Transformer-based text classifier
Base model: DistilBERT (distilbert-base-uncased)
This model is designed to predict the semantic complexity of a user query and classify it into one of three categories:
simple — Simple, factual, or casual questionsmedium — Instructional, contextual, or practical requestsadvanced — Abstract, technical, or highly analytical queriesIt helps intelligently route user queries to the most appropriate LLM backend based on their complexity (e.g., GPT-4o-mini, Claude, DeepSeek).
This model is intended to be used in applications where automatic routing of prompts to different Large Language Models (LLMs) is necessary. It provides a way to determine the semantic complexity of user inputs, facilitating the selection of the most appropriate LLM based on the input's complexity.
Example Use Cases:
Training Data: The model was trained on a small, manually curated dataset of user-like prompts. It has been optimized to classify the following categories:
simplemediumadvancedTraining Framework: Hugging Face Transformers with the Trainer API
Tokenizer: The model uses the DistilBERT tokenizer (distilbert-base-uncased).
The model achieves reasonable performance on the validation set. Example queries and their corresponding predictions are as follows:
"What is a cat?"
simple"Explain how email works"
medium"Design a secure authentication system for a web app"
advancedNote: The model is most effective on queries that fall within the expected complexity range (simple, medium, advanced). For highly ambiguous or unclear inputs, performance may vary.
To use this model for inference, you can load it with the following code:
from transformers import pipeline
classifier = pipeline("text-classification", model="your-username/nebriq-model-classifier")
prompt = "Explain how HTTP requests work"
result = classifier(prompt)
print(result)
# Example output: [{'label': 'medium', 'score': 0.92}]