minima
Hybrid routing agent for benchmark tasks.
Why I built this
AMD's developer hackathon, track one. Build a hybrid routing agent that answers benchmark tasks using the fewest tokens possible while maintaining 80% accuracy. 2000 people entered. I placed 13th.
How it works
prompt → classifier → local solver / local model / hosted model → validator → responsetask_classifier.py applies ordered regex rules, checking code tasks before entity, date, or math cues. The runtime tries deterministic local solvers first, then a local model, then Fireworks. The client retries without reasoning_effort when a model rejects it. The eval suite compares model families on stress and holdout datasets.
Decisions
QLoRA
I fine-tuned a quantized model with LoRA to improve benchmark accuracy without the token cost of a full-size model.
Local-first pipeline
Hosted tokens count against the score, so deterministic solvers handle easy categories first.
Code categories checked first
Code structure is distinctive enough for regex and should not be misrouted as math or entity.
Threshold-tolerant architecture
The threshold moved between 50% and 80%; local-first still minimized tokens either way.