Qwen2.5-Coder-0.5B-Instruct_reform-dafny-loop-inv-gen-rlhint-alldata_GRPO

Qwen/Qwen2.5-Coder-0.5B-Instruct fine-tuned to add loop invariants to Dafny programs so that they verify, on ThuraAung1601/reform-dafny-loop-inv-gen: LoRA SFT followed by LoRA GRPO on DafnyBench-style tasks (ThuraAung1601/reform-dafny-hint-gen: every invariant / assert / decreases line removed) 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). 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-loop-inv-gen-rlhint-alldata_GRPO")      # base + SFT + GRPO, merged
tokenizer = AutoTokenizer.from_pretrained("ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-loop-inv-gen-rlhint-alldata_GRPO")

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

Prompt -- system message:

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.

user message: the program inside a ```dafny code 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-loop-inv-gen-rlhint-alldata_GRPO

Adapter
(78)
this model

Datasets used to train ThuraAung1601/Qwen2.5-Coder-0.5B-Instruct_reform-dafny-loop-inv-gen-rlhint-alldata_GRPO