In a specialized research experiment titled QORL, a 4-billion-parameter model—a distillation of Qwen 3.8—was trained to optimize database query planning, achieving a 1.81x speedup over Postgres and a 44.7 percent reduction in summed workload latency on the Join Order Benchmark (IBP). The training process cost approximately $1,200, comprising $800 for 95 hours of 2x H100 node rentals and $400 in API fees for generating teacher trajectories from a frontier model. The resulting artifact was a 21.2-million-parameter LoRA adapter weighing 42.5 MB. Methodologically, the researcher utilized supervised fine-tuning on 100 trajectories to stabilize the model's tool harness, followed by reinforcement learning using a modified GRPO algorithm. This RL approach utilized a reward signal derived from measured execution times, incorporating a custom modification where unsuccessful rollouts receive negative advantage to prevent drifting toward the group mean. While Postgres relies on statistical estimates that can fail during complex multi-table joins, the small model learned to navigate the massive search space of the Join Order Benchmark more efficiently. The experiment demonstrates that domain-specific performance gains depend less on massive compute investments—such as the Philippines' $34.4 billion infrastructure roadmap—and more on the construction of precise benchmarks and verifiable reward signals.

Read original