AMD Developer Hackathon · ACT II — Track 1

Hybrid Token-Efficient
Routing Agent

Complete every task with the fewest Fireworks tokens possible — by answering locally instead of calling the cloud.

  local_only  =  0 Fireworks tokens Dockerized · linux/amd64 Local Qwen2.5-3B + deterministic solvers
ghcr.io/asdsyd/amd-track1:v1-local-only  ·  github.com/asdsyd/amd-track1
0
FIREWORKS TOKENS
The challenge

Two axes decide the leaderboard

AXIS 1 — GATE
Output accuracy

Answers must stay above the accuracy gate. Local-model answers count fully.

AXIS 2 — RANK
Fireworks tokens

Ranked ascending — fewer is better. Only inference through FIREWORKS_BASE_URL counts.

Raw compute is free. Routing intelligence wins — the cheapest path that still clears the gate.

Track 1 · Hybrid Token-Efficient Routing Agent
02
Our strategy

Answer locally, spend nothing

Local models count fully toward accuracy but cost zero Fireworks tokens.

So we run everything in-container: deterministic solvers first, then a bundled Qwen2.5-3B.

local_only mode is the floor of the token axis — the game becomes clearing the gate.

0
tokens is unbeatable
A hybrid fallback exists — but only escalates genuinely uncertain tasks in one batched call.
Track 1 · Hybrid Token-Efficient Routing Agent
03
How it works

A cost ladder, cheapest rung first

INPUT
/input/
tasks.json
ROUTER · 0 tokens
Classify
8 categories
SOLVE · 0 tokens
Deterministic tools
+ local Qwen2.5-3B (GGUF · llama.cpp)
VALIDATE
Sanity-check
answer shape
OUTPUT
/output/
results.json

Hybrid mode (optional): only genuinely low-confidence tasks are escalated — batched into one Fireworks call, targeting < 1,500 tokens. In local_only, nothing leaves the box.

Track 1 · Hybrid Token-Efficient Routing Agent
04
Coverage

One purpose-built solver per task type

Math
safe-AST eval · 0 tokens
Logic
permutation solver
Code debug
sandboxed execution
Code gen
exec-verified
NER
verbatim-validated
Sentiment
lexicon + local LLM
Summarization
constraint-checked
Factual
local Qwen2.5-3B

Green = provable at zero cost · Blue = local model, still zero Fireworks tokens. Deterministic-first; the cloud is never touched in local_only.

Track 1 · Hybrid Token-Efficient Routing Agent
05
Results

Clears the gate at the token floor

0
Fireworks tokens
(local_only)
8/8
practice tasks correct
in-container
~87.5%
56-task local eval
accuracy
86/86
unit tests
passing

Runs comfortably in budget: full task set finishes well under the 10-minute cap on 2 vCPU / 4 GB — a 540 s internal deadline shrinks per-task budgets as time runs low.

Track 1 · Hybrid Token-Efficient Routing Agent
06
Engineering

Built to always return a valid answer

Crash-safe by construction

A valid answer is pre-seeded for every task and flushed atomically after each one — a kill or timeout never loses completed work.

Graceful degradation

If the local model can't load, deterministic solvers carry the run. The container still exits 0 with valid JSON.

Portable amd64 image

Multi-stage build, model baked in. llama.cpp is compiled from source (glibc, AVX2) so it loads on the judging hardware.

Deadline manager

A 540 s internal budget keeps the run under the 10-minute cap and writes results incrementally throughout.

Track 1 · Hybrid Token-Efficient Routing Agent
07
Run it

Pull the public image and go

# grader-style run — 4 GB / 2 vCPU, mounted I/O
docker run --rm --platform linux/amd64 --memory 4g --cpus 2 \
  -v "$PWD/input:/input:ro" -v "$PWD/output:/output" \
  ghcr.io/asdsyd/amd-track1:v1-local-only
Image   ghcr.io/asdsyd/amd-track1:v1-local-only Repo   github.com/asdsyd/amd-track1 public · linux/amd64 · ~2 GB

Writes a valid results.json for every task, exits 0, and spends 0 Fireworks tokens — the floor of the token axis.

AMD Developer Hackathon · ACT II — Track 1
08