Instructions to use dhanushnehru/tachyroute-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dhanushnehru/tachyroute-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="dhanushnehru/tachyroute-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dhanushnehru/tachyroute-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
TachyRoute Base - routing prototype
TachyRoute is a Python prototype for structured decisions over text. It routes requests to an existing Transformers zero-shot classifier, returns a label and confidence, and adds simple routing and evidence fields. This repository currently contains a model card, not TachyRoute-trained weights. It cannot be loaded with AutoModel.from_pretrained("dhanushnehru/tachyroute-base") or used through a Hugging Face inference widget as a standalone model.
Try the live demo · Source and issues · Open the Colab notebook
What runs today
The tachyroute Python package wraps a Transformers zero-shot-classification pipeline. The router chooses an existing model by a text heuristic: non-ASCII input uses joeddav/xlm-roberta-large-xnli, short ASCII input (fewer than 15 words) uses cross-encoder/nli-deberta-v3-small, and other input uses facebook/bart-large-mnli. Models load on demand unless preloaded. This is a heuristic, not measured optimal routing; the quantized-fast branch name does not establish that the model is quantized.
For each question, the engine classifies among candidate labels. choice, score, and boolean questions have code paths. The reported exit_layer is assigned from confidence thresholds (6 if above 0.9, 12 if above 0.7, otherwise 24). It does not actually stop a transformer at that layer or measure compute saved. The evidence field is the first five words of input, not an attention-derived explanation or verified rationale. The measured latency_ms covers this Python call and depends on environment and whether a model must first load.
Try it
Use the interactive Space for a text-to-department routing example. Free ZeroGPU capacity may cause cold starts or transient errors. To run the source package locally instead of downloading weights from this repo:
pip install 'git+https://github.com/DhanushNehru/tachyroute.git'
from tachyroute import Router
router = Router(preload=False)
result = router.predict(
"My invoice was charged twice. Can I get a refund?",
{
"department": {
"type": "choice",
"instructions": "Which department should handle this?",
"criteria": {
"billing": "invoices, payments, refunds",
"technical": "bugs, outages, system errors",
},
}
},
)
print(result["answers"]["department"]["answer"])
print(result["answers"]["department"]["evidence"])
print(result["routing"])
The code downloads a third-party classifier on first use; it does not load weights from this repository. Results may vary with dependencies and labels.
Evaluation and limits
No reproducible benchmark or independently evaluated accuracy/latency results are published here. Existing performance, multilingual, early-exit and attention-rollout claims in the source repository README should be read as unverified claims, not measured properties of this prototype. In particular, do not infer a 15 ms latency target, accuracy parity, or compute savings from this card.
This demo is best for exploring the API and testing candidate labels. It is not validated for production, multilingual quality, high-stakes decisions, or faithful explanations. Classifier output can be wrong or biased; review outputs before acting. Text supplied to the public demo should not include sensitive information.
Data, weights, and attribution
TachyRoute has no custom training dataset, checkpoint, or evaluation dataset in this model repository. The underlying classifiers are separate models with their own cards, licenses, training data and limitations: cross-encoder/nli-deberta-v3-small, facebook/bart-large-mnli, and joeddav/xlm-roberta-large-xnli. The source package declares Apache-2.0 in its project metadata; that does not relicense the third-party classifiers.
Contributions and reproducible measurements are welcome through GitHub issues.