Postgres Professional has developed Slonik, an AI model specialized in PostgreSQL kernel development. The project aims to create a model capable of performing at the level of open frontier models in database-specific tasks, such as writing C code that adheres to database invariants and community coding standards.
The training pipeline, which takes approximately one week using eight NVIDIA H200 GPUs, consists of three stages: Continual Pre-Training (CPT), Supervised Fine-Tuning (SFT), and Reinforcement Learning (RL). The team utilized Qwen3.5-9B and Qwen3.8-27B as base models.
During CPT, the model was trained on 0.5 billion tokens of PostgreSQL documentation and mailing lists. SFT involved 725 successful agent trajectories totaling 17.2 million tokens. For RL, the team implemented the DAPO algorithm, using a binary reward system based on passing regression tests.
The model's performance was evaluated using benchmarks including PG17, PG18, Apache AGE, SWE-bench Verified, and Terminal-Bench 2.0. On the PostgreSQL 17 benchmark, the success rate (pass@1) increased from 32.6% after CPT to 39.1% after SFT, with RL adding another 10.7 percentage points.
The results indicate that skills acquired during domain-specific training transfer to general software development tasks. In SWE-bench Verified, the median number of steps taken by the agent decreased from 34 to 21, while the proportion of attempts where the model successfully modified the target file rose from 76.3% to 94.0%.
The Slonik technical report and model weights are available on Hugging Face. The initial findings from this research were accepted for presentation at AAAI 2027.






