DeBERTa-v3-base Prompt Complexity Classifier

A high-performance, lightweight prompt complexity classifier built by fine-tuning microsoft/deberta-v3-base. This model categorizes incoming user queries into 3 distinct complexity tiers to power intelligent prompt routing, optimizing latency and cost in custom AI gateways.

πŸ“Š Complexity Tiers

  • TIER_0 (Low Complexity): Simple direct lookups, basic factual queries, typos corrections, or short conversational greetings. (Routed to fast, lightweight models).
  • TIER_1 (Medium Complexity): Standard coding tasks, boilerplate generation, scoped bug fixes, or moderate multi-step reasoning. (Routed to balanced mid-tier models).
  • TIER_2 (High Complexity): Advanced software architecture design, deep multi-file debugging, heavy concurrent systems analysis, or complex agentic planning. (Routed to frontier models).

πŸš€ Quick Start (Python)

You can easily load and use this model for inference using the Hugging Face transformers library:

from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

# Load model and tokenizer
model_id = "rohitMukhi/deberta-v3-prompt-complexity-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)

# Test prompt
prompt = "Design a multi-tenant microservices architecture with Redis clustering and strict database isolation."

# Tokenize and predict
inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
    logits = model(**inputs).logits
    predicted_class = torch.argmax(logits, dim=1).item()

tier_labels = {0: "TIER_0 (Low)", 1: "TIER_1 (Medium)", 2: "TIER_2 (High)"}
print(f"Predicted Complexity: {tier_labels[predicted_class]}")
Downloads last month
-
Safetensors
Model size
0.2B params
Tensor type
F16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support