Run this model with HF Jobs

Run jerru2007/QueryPatch-Qwen3.5-2B-SQLite on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/jerru2007/QueryPatch-Qwen3.5-2B-SQLite. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/jerru2007/QueryPatch-Qwen3.5-2B-SQLite on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/jerru2007/QueryPatch-Qwen3.5-2B-SQLite. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/jerru2007/QueryPatch-Qwen3.5-2B-SQLite. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

QueryPatch Qwen3.5-2B SQLite Repair

QueryPatch is a LoRA adapter trained to repair read-only SQLite 3 queries. Give it the schema, the intended result, the candidate query, and the SQLite error message if one is available. It returns a JSON object with status, corrected_sql, explanation, and error_type. When a required detail is missing, it can return needs_clarification with a null corrected_sql.

Training

The adapter was trained through Adaption AutoScientist for the HackCulture Adaptive Intelligence Challenge. The supervised training set contains 1,440 English instruction examples generated from 12 hand-authored SQLite repair templates. Training used the original controlled completions, with zero domain or diversity augmentation. LoRA rank was 16, alpha was 32, and training ran for three epochs at a learning rate of 0.00005.

The export recorded the training provider's base identifier as togethercomputer/Qwen3.5-2B without a revision. The release configuration points to the public Qwen checkpoint used for local inference. The released adapter weights match the Adaption export byte for byte (SHA-256 7c87f88fe292408faac1bbd08b9b0a6af729ee568ba797a896dad4799eb34549).

Evaluation

AutoScientist displayed a 79.8% gain for this run. That is the platform’s metric. The independent comparison uses identical prompts, deterministic decoding, and the same base revision for both model variants. The scorer validates the JSON response contract and compares query results with expected rows in fictional SQLite databases. The five-case held-out suite uses separately authored schema structures. The 288-case development suite shares templates with training. Explanation quality requires manual review.

Held-out SQLite cases Public Qwen base QueryPatch adapter
Correct result and valid response 1/5 2/5
Valid four-field JSON response 3/5 5/5

Both models preserved duplicate rows in the set-operation case. QueryPatch also fixed the Boolean-precedence case. Its window-partition and NULL-safe join repairs returned incorrect rows, and the recursive-query case exceeded the SQLite evaluator's instruction budget. These results apply to the five cases and the documented decoding configuration. Download the evaluation bundle for the prompts, raw outputs, scorer, and per-case reports.

Usage and limitations

Load the adapter alongside the public Qwen base with Transformers and PEFT. The evaluation used bfloat16, greedy decoding, thinking disabled, and a 512-token completion limit.

import torch
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoTokenizer

base = "Qwen/Qwen3.5-2B"
revision = "15852e8c16360a2fea060d615a32b45270f8a8fc"
tokenizer = AutoTokenizer.from_pretrained(base, revision=revision)
model = AutoModelForImageTextToText.from_pretrained(
    base, revision=revision, dtype=torch.bfloat16
)
model = PeftModel.from_pretrained(
    model, "jerru2007/QueryPatch-Qwen3.5-2B-SQLite"
).eval()

The adapter is intended for English instructions and SQLite 3. Review suggested SQL before using it with a live database. Training coverage is narrow, and a query can agree with the test fixtures while still failing on other data.

Project repository · Base model card and license · HackCulture challenge

Downloads last month
15
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jerru2007/QueryPatch-Qwen3.5-2B-SQLite

Finetuned
Qwen/Qwen3.5-2B
Adapter
(473)
this model