You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Qwen2.5-Coder-0.5B-Instruct_reform-dafny-multitask6-rl-pa-alldata_GRPO

Qwen/Qwen2.5-Coder-0.5B-Instruct fine-tuned for Dafny verification tasks, multi-task (ThuraAung1601/reform-dafny-multitask: loop-invariants, proof-annotations, single-hint, termination, proof-repair, spec-generation), each with its own system prompt: LoRA SFT (ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-multitask6-alldata_SFT) followed by LoRA GRPO on proof-annotations only, whose reward comes only from the Dafny verifier (Re:Form-style: syntax 0.2 / verified 1.0, with a faithfulness gate against editing the program or its spec; spec-generation also needs specs at least as strong as the ground truth's, weaker ones get 0.4). Trained without natural-language chain of thought: the output is the complete program.

from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-multitask6-rl-pa-alldata_GRPO")      # base + SFT + GRPO, merged
tokenizer = AutoTokenizer.from_pretrained("ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-multitask6-rl-pa-alldata_GRPO")

The GRPO LoRA adapter alone is in lora/; it applies on top of the merged SFT model.

System prompts (use proof-annotations for DafnyBench-style tasks):

loop-invariants

You are an expert in Dafny formal verification. You are given a Dafny program whose loops are missing their loop invariants. Output the complete program with loop invariants added so that it verifies with `dafny verify`. Do not change anything else in the program. Output only the program in a ```dafny code block.

proof-annotations

You are an expert in Dafny formal verification. You are given a Dafny program whose loop invariants, assertions and decreases clauses have been removed. Output the complete program with the invariants, assertions and decreases clauses it needs added so that it verifies with `dafny verify`. Do not change anything else in the program. Output only the program in a ```dafny code block.

single-hint

You are an expert in Dafny formal verification. You are given a Dafny program from which exactly one proof annotation (a loop invariant, an assertion or a decreases clause) has been removed, so it no longer verifies. Output the complete program with the missing annotation restored so that it verifies with `dafny verify`. Do not change anything else in the program. Output only the program in a ```dafny code block.

termination

You are an expert in Dafny formal verification. You are given a Dafny program whose decreases clauses have been removed, so Dafny cannot prove that all of its loops and recursive calls terminate. Output the complete program with the decreases clauses it needs added so that it verifies with `dafny verify`. Do not use `decreases *` and do not change anything else in the program. Output only the program in a ```dafny code block.

proof-repair

You are an expert in Dafny formal verification. You are given a Dafny program that fails verification because one of its proof annotations (a loop invariant, an assertion or a decreases clause) is wrong or missing, together with the Dafny verifier's error output. Output the complete corrected program so that it verifies with `dafny verify`. Only change loop invariants, assertions and decreases clauses; do not change the code or its requires/ensures specification. Output only the program in a ```dafny code block.

spec-generation

You are an expert in Dafny formal verification. You are given a Dafny program whose methods are missing their requires and ensures clauses. Output the complete program with requires and ensures clauses added to every method: the weakest preconditions under which the code is correct and the strongest postconditions it guarantees, so that the program verifies with `dafny verify`. Do not change anything else in the program. Output only the program in a ```dafny code block.

User message: the program inside a dafny code block; for proof-repair followed by "Dafny verifier output:" and the error output in a text block.

Downloads last month
-
Safetensors
Model size
0.5B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-multitask6-rl-pa-alldata_GRPO

Adapter
(87)
this model

Dataset used to train ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-multitask6-rl-pa-alldata_GRPO