
TernRoute is a highly efficient, production-grade task routing framework engineered specifically for Track 1 of the AMD Developer Hackathon: ACT II, focusing on maximizing inference accuracy while drastically minimizing token consumption across the judging proxy. Unlike traditional routing architectures that rely on LLM-based judges or semantic embedding lookups to classify workloads—which introduces a steep, compounding token tax before the primary task is ever handled—TernRoute implements a local-first, zero-token engineering paradigm that processes incoming natural-language batches entirely on the edge. By utilizing low-overhead keyword trees, regex matching, and structural syntax fingerprinting in native Python space, the system maps diverse user requests to precise task clusters, matching them against a fallback ring of allowed Fireworks AI models grouped into Small, Medium, and Large operational tiers. To secure maximum leaderboard efficiency, TernRoute dynamically applies rigid output token constraints (max_tokens), automatically strips conversational fluff using distilled system prompts, programmatically scrubs inline <think> reasoning blocks during post-processing, and performs atomic, schema-validated file mutations directly to /output/results.json, creating an incredibly robust, zero-exit-code execution loop optimized for headless hackathon evaluation environments.
13 Jul 2026