Task Factory
Task Factory turns real, merged LLM inference and GPU kernel speedups into verified training tasks for coding agents, graded on real Android phones.
Core trick
Argon picks merged inference speedup commits, packages them as Harbor tasks, and red-team agents try to cheat the on-phone grader.
Description
Task Factory turns real, merged LLM inference and GPU kernel speedups into verified training tasks for coding agents, graded on real Android phones.
Each task gives an agent an on-device inference engine at the commit before a real optimization, for example an OpenCL GEMV or attention kernel rewrite that made SmolLM2 decode 1.5x faster on an Adreno GPU. The agent must make decode faster while producing exactly the same output tokens. Reward is the decode tokens/s measured on the phone.
The problem: RL tasks for kernel and inference optimization are written by hand, slowly, and their graders are easy to game. An agent can hardcode the expected tokens, fake its own benchmark timer, or skip compute outside the checked range, and still score full marks.
Task Factory automates the pipeline. Gemini 4 Argon reads a whole model port plus its git history in one call (592k tokens) and picks commits with real, measurable inference speedups. It writes and reviews a task proposal and packages it as a Harbor task. Then it tries to break the task before shipping it:
- Phone checks: unchanged code must score 0 and the real optimization must score 1, timed outside the binary on Pixel 5 GPUs.
- Red team: Argon managed agents try to cheat. In our first task, 2 of 4 attacks beat the grader (replaying output tokens and faking the timer). A fixer agent closed 4 holes, and the grader now scores both cheats 0.
- Rollouts: agents attempt the optimization to check its difficulty. Argon reaches 1.32-1.35x of a 1.44x target (reward 0.74-0.80): partially solved, which is the learning signal labs want.
Every step is in an append-only ledger, and a live monitor shows each stage, agent and phone run.
README excerpt
# Task Factory Task Factory turns real, merged speedup commits into verified Harbor tasks for training and evaluating coding agents. Before a task ships, it is timed on real Android phones and attacked by agents that try to cheat its grader. The source repo is [adreno-llms](https://github.com/a8nova/adreno-llms): OpenCL ports of small models for Qualcomm Adreno GPUs. A task gives an agent a port at the commit before a speedup, and the reward is the decode speed it reaches on a phone with exactly the reference's output tokens. ## How a task is made Each stage writes a verdict to `runs/ledger/<task>.jsonl`. A stage that fails or is returned goes back to its author with the findings (at most 2 revisions). The full contract is in [CONTRACT.md](CONTRACT.md). | Stages | What happens | Who | |---|---|---| | 1 Mine | Read one model port and its whole git history in one call; pick commits that can become tasks | Gemini 4 Argon | | 2–4 Propose | Write the task proposal; check it against the rules; review it | Argon, Flash-Lite, Argon | | 5 Implement | Write the Harbor package (instruction, scope rules, attack list) around the fixed harness in `harness/` | Argon | | 6–10 Checks | Static checks; no-op and baseline must score about 0 on the phone; audit; check-in review | scripts, Argon | | 11–14 Agents | Explore the task end to end; calibrate the target; red team tries to cheat and a fixer patches the grader; rollouts check the difficulty | Antigravity managed agents (Argon, Flash)