Engineers shipping AI-written code
Potential fit for teams in finance, infrastructure, embedded software, and security, where a spec violation can be expensive.
DAFNY CODE GENERATION · QWEN3-8B-BASE
AI can write code that looks right and still break its spec. I’m building Proof-Pilot: an open 8B model for Dafny that aims to return code with a machine-checked proof. A developer tool and API are the product direction.
Open weights and local use are the goal. Dafny decides which outputs count as verified.
GitHub profileThe model proposes a Dafny method and proof. Dafny checks the candidate against the original specification and reports failed proof obligations.
Defines what the program must satisfy.
Proposes a Dafny program and proof.
Checks the candidate against the spec.
Accepted only when Dafny confirms it.
method CountTo(n: nat) returns (i: nat)
ensures i == n
{
i := 0;
// loop candidates below
}
while i < n
invariant i < n
{
i := i + 1;
}
Not maintainedAfter the last iteration i = n, so i < n fails. It also fails at entry when n = 0.
while i < n
invariant i <= n
{
i := i + 1;
}
Holds throughout; at exit, !(i < n) and i <= n imply i == n.
Generated code can look convincing and still violate its spec. A proof checked by a machine gives teams a concrete correctness check alongside tests and review.
The first focus is Dafny programs where correctness can be stated and checked.
Potential fit for teams in finance, infrastructure, embedded software, and security, where a spec violation can be expensive.
Writing proofs takes time. This project tests whether an 8B model can reduce that effort. Dafny has been used in AWS’s formally verified authorization engine. Read the case study
The release target is model weights, training code, evaluation logs, and a reproducible benchmark harness.
PRODUCT DIRECTIONOpen model first. Then a developer tool and API.
Open weights give teams more control over where a model runs. Dafny gives the project a concrete way to check its output.
The release target includes weights so teams can inspect the model and run it in their own environment.
A program counts as verified only when the checker accepts it against the original specification.
Start from Qwen3-8B-Base and focus training and evaluation on Dafny programs with proofs.
How we’ll train and measure it. The evaluation protocol, budget, and results will be documented for reproduction.
8B open-weight starting point
DafnyBench + MBPP-DFY, before training
1–8 × RTX PRO 6000 or comparable H100-class GPUs
Measure each phase before moving to the next
Weights, verifier logs, ablations, and benchmark results
Dafny/Z3 verification runs on CPU workers and is budgeted separately.
The planning budget totals about 1,000 H100-equivalent GPU-hours. Compute is not allocated; the estimate assumes 1–8 RTX PRO 6000 or comparable GPUs.
Freeze task IDs, splits, prompts, and tool versions. Report accepted programs, sample counts, and verifier outcomes.
Provisional H100-equivalent GPU-hour estimate, not measured throughput. Start with the canary; continue to SFT/RL based on results.
Measure and publish the base-model baseline before SFT or RL.
Report pass@1/8/32 and the number of programs accepted by Dafny.
Record task splits, samples, prompts, model checkpoints, and Dafny/Z3 versions for reproducibility.
Compare unique verified programs per GPU-hour across training stages.
Runs exceed the estimate. Prioritize complete baseline coverage and report the exact sample budget.
Training data overlaps evaluation tasks. Freeze public splits and exclude test tasks before SFT.
RL exploits verifier feedback. Check accepted outputs against original specifications and publish ablations.
Training does not beat the baseline. Publish the baseline and negative result; stop the next phase.
Measure the base model before fine-tuning.
| Benchmark | Task | Starting performance | Next step |
|---|---|---|---|
| DafnyBench ↗750+ Dafny files · TMLR 2025 | Add the annotations and proofs a program needs to verify | Not measured | Full protocol, pass@1/8/32 |
| MBPP-DFY ↗Dafny version of the MBPP test set · FSE 2024 | Write a verified Dafny method from a description and its spec | Not measured | Full protocol, pass@1/8/32 |
Only programs Dafny verifies against the original spec count. Report the exact task and sample count; label any partial run as a subset measurement. Save full pass@1/8/32 reporting for runs that complete the benchmark protocol. DafnyBench protocol
AlphaVerus studies verifier-guided translation to Verus with a 70B model. Proof-Pilot tests direct Dafny generation from an 8B base. Verifier-feedback training is an approach to evaluate here, not a novelty claim. AlphaVerus paper
The release target includes model weights and the files needed to inspect training and reproduce the evaluation.
Follow the work or get in touch.
Email to follow the build and hear when a testable version is available.
7 on the waitlist