Training a 4B model to produce 81% faster query plans than Postgres
A 4B model beating the Postgres planner on its own benchmark, for $1,200 total. Rohan Bansal fine-tuned Qwen 3.8 4B with LoRA and agentic RL to emit planner hints, and on the Join Order Benchmark got a 1.81x geomean speedup with 44.7% less summed latency — 68 of 113 queries improved by more than 5%. Read the caveats too: it’s tuned to IMDb and aimed at repeated workloads, not one-offs. Code is open.