Downloads · 30 days
0
JamesQuartz/aenea-pinta-1.1-mini
aenea-pinta-1.1-mini is a machine learning model from JamesQuartz. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
50M-parameter semantic router for edge dispatch. Pinta-1.1 Mini Beta is the lightweight counterpart to AENEA Pinta-1.1, trading ~3% accuracy for a 4.5× parameter reduction and sub-15 ms CPU inference on commodity hard…
Downloads · 30 days
0
Access
Public
Updated Sep 21, 2026
Repo size
319 MB
Likes
0
Public
Click a slice to open those files.
.data210 MB · 66%
From the Hugging Face model README
50M-parameter semantic router for edge dispatch. Pinta-1.1 Mini Beta is the lightweight counterpart to AENEA Pinta-1.1, trading ~3% accuracy for a 4.5× parameter reduction and sub-15 ms CPU inference on commodity hardware. Designed for always-on classification in agent swarms, CLI sidecars, and edge dispatch — where latency matters more than peak accuracy.
Beta notice. This is a Beta release. The routing head carries a measurable class prior from SFT imbalance (~+12 logit spike on
<|reserved_27|>Architecture) and requires calibration at inference time. Apply the supplied bias file with scale 0.60 before softmax. See Calibration below.
Pinta-1.1 Mini is not a generative language model. It is a semantic router that classifies incoming prompts into one of nine dispatch domains and emits a routing token that downstream systems can use to select the appropriate expert model or tool:
| Class | Token | Dispatch to |
|---|---|---|
| Formatting | <|reserved_23|> | Template engines, formatters |
| Code | <|reserved_24|> | Code-specialized models |
| Creative | <|reserved_25|> | Creative writing models |
| RAG | <|reserved_26|> | Retrieval-augmented pipelines |
| Architecture | <|reserved_27|> | System design experts |
| Math | <|reserved_28|> | Math/reasoning models |
| Knowledge | <|reserved_29|> | General knowledge / fallback |
| Law | <|reserved_30|> | Legal domain models |
| Conversational | <|reserved_31|> | Chat-optimized models |
The router is trained to predict which token a full generative model would emit next, but does so in a single forward pass without generating any text.
| Component | Specification |
|---|---|
| Parameters | 50M |
| Layers | 20 (Cartan) |
| Hidden size | 512 |
| Attention heads | 8 |
| Orthogonal attention | Block Householder, 8 reflections, block_size 64 |
| Vocabulary | 9,216 (QT-Cittern-1.0 tokenizer) |
| Context window | 2,048 tokens |
| Precision | bf16 / ONNX fp32 |
| Routing head | Causal [B, S, V] with 9 reserved token slice |
Evaluated on the Pinta Gold benchmark (1,020 prompts across 8 scored domains + adversarial immunity suite):
| Metric | Pinta-1.1 (226M) | Pinta-1.1 Mini (50M) |
|---|---|---|
| Strict accuracy | 79.22% | 72.50% |
| Flexible accuracy | 82.35% | 75.49% |
| Adversarial immunity | 94.12% | 91.18% |
| Latency (p50, 4 threads, CPU) | ~45 ms | ~14 ms |
| Latency (p95, 4 threads, CPU) | ~52 ms | ~16 ms |
| Model size (ONNX) | 452 MB | 98 MB |
The Mini trades ~3% strict accuracy for 4.5× faster inference and 4.6× smaller footprint. For edge deployment where latency budgets are tight, this is a worthwhile trade.
pip install onnxruntime numpy tokenizers onnx
Download pinta_router.py, tokenizer.json, and eval_prompts_large.chatml.bias.npy from this repository, then:
import numpy as np
from pinta_router import PintaONNXRouter
router = PintaONNXRouter(
"aenea_pinta_1.1_mini.onnx",
"tokenizer.json",
routing_bias=np.load("eval_prompts_large.chatml.bias.npy"),
bias_scale=0.60, # calibrated for chatml template
template="chatml"
)
class_id, confidence, latency_ms = router.route("Reverse a linked list in Python.")
token = router.class_to_token(class_id)
print(f"Route to: {token} (confidence: {confidence:.3f})")
# Output: Route to: <|reserved_24|> (confidence: 0.486)
The wrapper includes a confidence gate (default threshold 0.35). If the model's max probability falls below threshold, it automatically falls back to <|reserved_29|> (Knowledge) rather than emitting a low-confidence misroute:
class_id, confidence, _ = router.route("What is the capital of France?")
# confidence: 0.188 → below threshold → fallback to Knowledge
This prevents silent misroutes on ambiguous prompts.
aenea-pinta-1.1-mini/
├── pinta_router.py # Python router wrapper with calibration
├── tokenizer.json # QT-Cittern-1.0 tokenizer (9,216 vocab)
├── eval_prompts_large.chatml.bias.npy # Calibrated bias vector (scale 0.60)
├── aenea_pinta_1.1_mini.onnx # ONNX model (fp32, ~210 MB)
├── aenea_pinta_1.1_mini.onnx.data # External weight data
├── pinta_router.cpp # C++ daemon (edge deployment)
├── README.md # This file
└── LICENSE # Apache 2.0
Integration Note: Unlike Pinta-1.1 (226M), which ships with a full FastAPI-based routing engine (pinta_engine.py), Pinta-1.1 Mini provides only the classification wrapper. This design allows Mini to integrate seamlessly into existing dispatch systems, agent swarms, or custom CLI sidecars. For a complete out-of-the-box routing engine with async dispatch to Ollama/vLLM/OpenAI endpoints, use the full Pinta-1.1 (226M).
The routing head carries a baked-in class prior from SFT training imbalance. The supplied eval_prompts_large.chatml.bias.npy file contains the estimated prior vector (9 floats, one per class). Apply it with bias_scale=0.60 before softmax:
logits = logits - bias_vector * 0.60
probs = softmax(logits)
Do not skip calibration. Without it, the model will route ~60% of prompts to Architecture (<|reserved_27|>) regardless of input. The scale factor 0.60 was determined by sweeping 0.0→1.0 on a 40-prompt labeled eval set and selecting the optimum accuracy (72.5%) while maintaining acceptable confidence margins.
If you have a labeled prompt set (format: prompt<TAB>label where label is 23-31 or 0-8), you can re-estimate the bias:
python pinta_router.py --model aenea_pinta_1.1_mini.onnx \
--tokenizer tokenizer.json \
--calibrate my_prompts.txt \
--template chatml
This writes my_prompts.chatml.bias.npy. Then sweep to find the optimal scale:
python pinta_router.py --model aenea_pinta_1.1_mini.onnx \
--tokenizer tokenizer.json \
--bias my_prompts.chatml.bias.npy \
--template chatml \
--sweep-scale \
--calibrate my_prompts.txt
The script will print accuracy at each scale and recommend the optimum.
Pinta-1.1 Mini is designed for:
Not intended for:
This is a Beta release. The routing accuracy is ~3% below the full Pinta-1.1 (226M) model. Calibration is required.
C++ Daemon: The included pinta_router.cpp provides a baseline CLI runner for edge deployment. Extended C++ daemon bindings and production socket wrappers will follow in the next minor release.
On the 40-prompt eval set, some prompts (especially factual queries like "What is the capital of France?") fall below the 0.35 confidence threshold even after calibration. These correctly trigger the Knowledge fallback, but may indicate that the 50M model genuinely struggles with borderline cases.
The SFT training data had uneven class distribution, resulting in the ~+12 logit bias on Architecture. Calibration removes this, but the underlying imbalance means some classes may be under-represented in edge cases.
The model was trained with ChatML formatting. Using raw prompts or other templates will degrade accuracy. Always wrap prompts with <|im_start|>user\n{prompt}<|im_end|>.
Pinta-1.1 Mini was trained using a two-stage pipeline on consumer-grade hardware, utilizing a STEM-focused corpus with a heavy emphasis on mathematics, code, and technical reasoning.
The base Cartan-50M model was pre-trained on a STEM-heavy corpus:
english_stem_corpus.txt (500M pretokenized tokens from the STEM corpus above)If you use Pinta-1.1 Mini in your research or production systems, please cite:
@misc{pinta-mini-2026,
title={AENEA Pinta-1.1 Mini: A 50M-Parameter Semantic Router for Edge Dispatch},
author={Your Name},
year={2026},
howpublished={\url{https://huggingface.co/JamesQuartz/aenea-pinta-1.1-mini-beta}},
}
Apache 2.0. See LICENSE file for details.