AMD Developer Hackathon · ACT II · Track 1

Cascade Router: Local-First AI Agent

A hybrid routing agent that answers every task locally at zero counted tokens first, and escalates to Fireworks AI only when the local answer can't be trusted — across all 8 required task categories.

How it routes

Task in 1. Classify (regex, 0 tok) 2. Solve locally (Qwen3 1.7B, 0 tok) 3. Verify (category-specific checks, 0 tok) 4. Escalate to Fireworks (only if unsafe) 5. Return answer

Verification is deterministic per category — a locally-generated Python expression cross-checks math, an AST parse validates code, entity-union catches missing NER labels, a label-consistency vote guards sentiment. Escalation only fires when local verification cannot confirm a safe answer, so most tasks never touch a counted token.

Measured results (internal 64-task benchmark, LLM-judge graded)

92.2%
Judge accuracy
2,146
Total remote tokens
6 / 8
Practice tasks solved at 0 tokens
<12s
Max latency per task (30s limit)

Internal benchmark against our own judge model — not a leaderboard score. Measured on a 2 vCPU / 4 GB simulated judging environment.

8 task categories, each with its own local safeguard

CategoryLocal safeguard
Factual KnowledgeComplete-answer hint, two-part question detection
Math ReasoningLocal counter-calculation (Python expression, cross-checked)
SentimentLabel-majority vote across local runs
SummarisationFormat/length gate + local retry on violation
Named Entity RecognitionEntity union + name/date normalization
Code DebuggingAST syntax check + identical-code rejection
Logic PuzzlesEscalated by policy (local model unreliable here)
Code GenerationAST syntax check + local retry on prose-only answers

Stack