SupraLabs/Supra-Router-51M
Summary
SupraLabs releases Supra-Router-51M, a 51.7M parameter micro-LLM for multi-task infrastructure routing, designed to decide whether to process prompts locally on edge or send them to cloud-hosted models. Fine-tuned on a small dataset, it uses multi-task sequence generation for robust routing.
View Cached Full Text
Cached at: 07/09/26, 07:38 PM
SupraLabs/Supra-Router-51M · Hugging Face
Source: https://huggingface.co/SupraLabs/Supra-Router-51M
Supra-Router-51M · Multi-Task Infrastructure Routing Model
About the Model
Supra-Router-51Mis an ultra-lightweight, high-speed infrastructure traffic controller optimized for localized edge orchestration. With only51.7 million parameters, this micro-LLM acts as a defensive gateway for multi-model ecosystems, accurately determining when user requests can be processed locally by an Edge SLM or when they must be triaged to a cloud-hosted frontier intelligence layer.
The model was built by fine-tuning a pre-trained 51M base on theSupraLabs/Prompt\-Routing\-Dataset(992 rows). Rather than acting as a naive binary classifier, the model usesMulti-Task Sequence Generationto map out the underlying properties of a prompt before predicting the final routing token, anchoring its attention heads to robust language and structural logic features.
https://huggingface.co/SupraLabs/Supra-Router-51M#multi-task-decision-sequenceMulti-Task Decision Sequence
To run inference, wrap your user query inside the structural framing tokens used during training (Task: \[Prompt\]\\nAnalysis:). The model will output a deterministic, pipe-separated string containing the full telemetry of the prompt’s cognitive requirements:
https://huggingface.co/SupraLabs/Supra-Router-51M#expected-output-target-schemaExpected Output Target Schema:
Domain: [Semantic Field] | Complexity: [1-5] | Math: [True/False] | Code: [True/False] | Route: [small model/big model] | Justification: [Rule-driven infrastructure reasoning]
https://huggingface.co/SupraLabs/Supra-Router-51M#why-this-worksWhy this works:
By forcing a sub-100M parameter model to calculate the semantic domain, structural complexity, and technical flags before it emits the final Route token, the network effectively runs an internal feature-activation map. This multi-task sequence prevents localized weight collapse and guarantees stable routing boundaries.
https://huggingface.co/SupraLabs/Supra-Router-51M#training-telemetry–optimizationTraining Telemetry & Optimization
- Dataset Source: SupraLabs/Prompt-Routing-Dataset (992 samples)
- Training Duration: 5 Epochs
- Checkpoint Selection: Peak generalization was reached during Epoch 3 (eval_loss: 0.1342). To eliminate late-stage micro-model memorization and validation drift, the training state was automatically rewound and saved at this numerical peak.
- Precision: bfloat16
- Hardware Footprint: Optimized sequence processing length of 3840 tokens, ensuring rapid inference execution with negligible CPU/GPU overhead (sub-millisecond generation speeds).
https://huggingface.co/SupraLabs/Supra-Router-51M#inference–gateway-implementationInference & Gateway Implementation
Use this direct script to test or wrap the model inside a live production orchestrator or FastAPI gateway. It enforces greedy decoding (do_sample=False) for maximum decision stability.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "SupraLabs/Supra-Router-51M"
print("[*] Initializing local infrastructure router...")
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
dtype=torch.bfloat16,
device_map="auto"
)
model.eval()
# Example prompt showcasing keyword-trap evasion
user_prompt = "Write a movie script about a chef who gets lost at sea."
# Format to match internal SFT attention alignment
formatted_input = f"Task: {user_prompt}\nAnalysis: "
inputs = tokenizer(formatted_input, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=128,
do_sample=False,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id
)
generated_ids = outputs[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(generated_ids, skip_special_tokens=True).strip())
https://huggingface.co/SupraLabs/Supra-Router-51M#proven-benchmarks–defensive-boundariesProven Benchmarks & Defensive Boundaries
During edge validation testing, Supra-Router-51M demonstrated robust resilience against adversarial prompt strings:
- Keyword Trap Evasion: Successfully identifies semantic context rather than matching tokens. Prompts containing words like “script” or “calculus” are correctly parsed as creative writing (not programming/math code) and routed locally to the small model when complexity is low.
- Complexity-Driven Safety Net: In instances where programming syntax or technical boundaries are ambiguous (e.g., complex regex or architectural database frames), the model naturally scales its evaluation metrics to Complexity: 3, automatically triggering a big model route override.
- Deterministic Offloading: Safely captures multi-step logic paths, calculus concepts, and code generation scripts, instantly assigning them to cloud-scale frontier endpoints.
Similar Articles
[RELEASE] Supra-Router-51M - a tiny prompt routing model/orchestrator
SupraLabs releases Supra-Router-51M, a tiny 51M parameter model for routing prompts to appropriate larger or smaller models, enabling low-latency orchestration. A companion dataset is also released.
LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers
LLMRouter presents a unified formulation of LLM routing as a sequential decision process, along with an open-source infrastructure and benchmark (xRouteBench) for developing, evaluating, and deploying LLM routers. Empirical results show learned routers achieve 14.6% relative improvement over the strongest fixed-model baseline.
Pro-Router: Token-Aware Progressive Model Routing with Adaptive Edge-Cloud Collaboration for Efficient Multimodal LLM Inference
Pro-Router introduces a token-aware progressive model routing method for efficient multimodal LLM inference, leveraging adaptive edge-cloud collaboration to improve throughput and reduce costs.
@HarshalsinghCN: introducing tinyrouter i reverse engineered the routing architecture behind Skana AI's Fugu and built replication for o…
TinyRouter is a tiny 10K-parameter LLM router that learns to route each question to the best specialist model from a pool of open-source LLMs, using evolutionary training. It achieves performance matching or exceeding individual models on MMLU and math benchmarks.
[RELEASE] SupraBrain-50M-v0.1
SupraLabs releases SupraBrain-50M, a hybrid language model combining Gated DeltaNet, Sliding-Window Attention, and Surprise-Gated mechanisms, achieving near-parity with Supra-Base-50M despite training on far fewer tokens.
