Skip to content
Other

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 q1c300 and q1c400) 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 q1c400 checkpoint (highest gain on the public test set) against d2c (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 2026
Read moreDetails
Base 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).
Discuss Telegram 0

Will it run?

Runs in BF16

Fits without quantisation.

  • BF16weights 18 GB · ready files20 GB
  • FP8 / INT8recommendedweights 9.1 GB11 GB
  • 4-bitweights 5.2 GB6.2 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 2080 Ti · BF16 — from RTX 4090

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

This is a LoRA: counted together with its base model Qwen3.5-9B.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # aichamzaic2026/zac2026-datamate-sqllora
    # ===== Tokens: paste yours between the quotes =====
    export HF_TOKEN=""        # huggingface.co/settings/tokens, for gated models
    # ==========================================
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download Qwen/Qwen3.5-9B --local-dir ~/models/Qwen3.5-9B
    hf download aichamzaic2026/zac2026-datamate-sqllora --local-dir ~/models/zac2026-datamate-sqllora
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to Qwen3.5-9B
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

Requires the base model

Qwen/Qwen3.5-9B

This model is a LoRA / adapter. Download the base model first, then load this one on top.

  1. Qwen3.5-9B-Basefamily root
  2. Qwen3.5-9B
  3. zac2026-datamate-sqllora

New posts about versions of Qwen3.5-9B-Base (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 12All on Hugging Face
Fine-tunes 12All on Hugging Face
LoRAs and adapters 6All on Hugging Face
Merges 1All on Hugging Face

About the model

aichamzaic2026/zac2026-datamate-sqllora
Author
aichamzaic2026
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments

Computer vision

HITCH

HITCH