Reasoning Router v1
Model Name: AmirMohseni/reasoning-router-v1
Base Model: answerdotai/ModernBERT-large
(396M parameters)
Task: Binary classification β decide whether to use reasoning mode for a given text prompt.
π Overview
This model routes incoming prompts to one of two categories:
no_think
β Reasoning mode should not be used (fast, fewer tokens, lower cost).think
β Reasoning mode should be used (slower, more tokens, potentially higher accuracy).
It is designed to help reduce unnecessary reasoning calls in large language model pipelines, saving computation and cost while maintaining quality.
π Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "AmirMohseni/reasoning-router-v1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Inference function
def classify_text(text):
# Tokenize input
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
# Get logits
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class_id = logits.argmax(dim=-1).item()
predicted_label = model.config.id2label[predicted_class_id]
return predicted_label, logits.squeeze().tolist()
# Example usage
label, logits = classify_text("This is an example input.")
print("Predicted label:", label)
print("Logits:", logits)
π· Labels
Label | Meaning |
---|---|
no_think |
Reasoning mode should not be used. |
think |
Reasoning mode should be used. |
π Model Details
- Base Model:
answerdotai/ModernBERT-large
β a 396M parameter encoder model optimized for classification. - Training Objective: Supervised fine-tuning for binary routing classification.
- Intended Use: As part of an LLM routing system to decide whether to enable reasoning mode for a query.
- Languages: English (primary).
β οΈ Limitations & Bias
- The model is trained primarily on English data β performance may degrade on other languages.
- Predictions are probabilistic; borderline cases may require human validation in high-stakes use cases.
- May reflect biases present in the training data.
π Citation
If you use this model, please cite:
@misc{mohseni2025reasoningrouterv1,
title={Reasoning Router v1},
author={Amir Mohseni},
year={2025},
howpublished={\url{https://huggingface.co/AmirMohseni/reasoning-router-v1}}
}
- Downloads last month
- 6
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support
Model tree for AmirMohseni/reasoning-router-v1
Base model
answerdotai/ModernBERT-large