ZAC 2026 DataMate SQL-LoRA
veto adapters for verifying SQL outputs
2 min readupdated
A set of LoRA adapters (lightweight add-ons for a base model) for Qwen3.5-9B, built for the DataMate text agent in the ZAC 2026 competition. These adapters act as a veto mechanism when generating arbitrary SQL queries: the system compares outputs from the standalone base model against those generated with the adapter, switching to abstain mode if they disagree. This protects against wrong-answer penalties, since the task metric deducts a point for incorrect answers while abstaining costs nothing. It is built for developers working on text-to-SQL systems and agent pipelines where accuracy and minimizing database hallucinations are critical.
Key features
- Three adapter variants included: two SFT-trained versions (checkpoints
q1c300andq1c400) and one fine-tuned with DPO + SFT (d2c). - Ready for vLLM: the adapters use rank 16, and weight keys are already renamed to match the VL checkpoint architecture (
base_model.model.model.language_model.layers.*). - Lower cost of errors: when mixing samples (generating 2 out of 4 SQL voting candidates via LoRA), conflicting outputs are filtered out through
veto_merge.py. - Validation gains: adding the veto phase yields a +3.75 to +6.1 question improvement on the public split over the baseline run (baseline average score +0.870, final end-to-end with
q1c300— +0.874).
What you can do
- Integrate into a vLLM text-to-SQL pipeline: load a chosen folder as a LoRA adapter alongside Qwen/Qwen3.5-9B to cross-check generated queries before executing them against a database.
- Compare SFT and DPO strategies on your own data: benchmark the
q1c400checkpoint (highest gain on the public test set) againstd2c(best balance on the synthetic gate) in self-consistency voting setups.
Example
To run this in the DataMate pipeline, place one of the adapter folders into the models/datamate/sqllora/ directory next to the Qwen/Qwen3.5-9B base model. Launch the inference server with the following vLLM flags:
vllm serve Qwen/Qwen3.5-9B --enable-lora --max-lora-rank 16 --seed 2026Read more
DetailsBase model: Qwen/Qwen3.5-9B (revision c202236235762e1c871ad0ccb60c8ee5ba337b9a).
Metrics (veto gain): q1c300 adds +4.25 questions (gate veto net: +1 / +1), q1c400 adds +6.1 questions (-1 / 0), d2c adds +3.75 questions (+4 / +1).
SFT training: rank 16, lr 1e-4, 1 epoch, curated from valid SQL samples generated by the base model with no public test data leakage.
DPO training (d2c): rank 16, lr 1e-4, beta 0.1, SFT weight 0.2, 1 epoch, up to 1,200 pairs (chosen valid vs. rejected invalid SQL output per prompt).










Comments