1⃣ Aletheia-Prover-0.5B
A micro-model for Lean 4 auditing and proofs
2 min readupdated
A compact, specialized 490M parameter LLM fine-tuned from Qwen/Qwen2.5-0.5B (merged LoRA weights into standard Qwen2ForCausalLM format). Built as part of The Aletheia Method project, it tackles two formal verification tasks (mathematical code correctness checking): it detects kernel workarounds and trust boundary violations in Lean 4 code, and generates theorem-proving tactics without sorry placeholders or Classical.choice axioms. Unlike the base Qwen2.5-0.5B, which fails every check in the test suite, this new model accurately catches vulnerabilities on novel templates and handles a portion of simple theorems. It is ideal for formal verification tool developers looking for an ultra-fast local first-stage filter before running heavier models.
Key features
- Recognizes 15 classes of Lean 4 kernel workarounds and trust boundary violations (
sorry,axiom,native_decide,unsafe,implemented_by, metaprogramming, etc.), returning responses in strict JSON. - Generates tactics for pure-Init Lean 4.36.0 for fast primary verification of simple statements when combined with a live Lean kernel.
- Built on Qwen/Qwen2.5-0.5B with 8.8 million fine-tuned parameters (rank 16 LoRA across all 168 linear projections) and merged into a standard checkpoint.
- Features high performance: code auditing on an RTX 3080 takes an average of 67.67 ms (215.17 tokens per second).
What you can do
- Integrate it into a formal verification pipeline as a primary Tier-1 filter to weed out incorrect proofs and "cheating" constructs in Lean 4 before passing tasks to larger LLMs.
- Use it for local, automated Lean code auditing against forbidden techniques and kernel workarounds without sending data to the cloud.
Example
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ahrazzle/aletheia-prover-0.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
Read more
DetailsAudit of R10+ workarounds on unseen templates (N=25): 25/25 (F1 = 1.0000 vs. 0.0000 for base Qwen2.5-0.5B).
Proof of new theorems verified in the Lean 4.36.0 kernel (N=24): 5/24 (20.83%, 0 false positives).
Limitation: due to its 0.5B size, the model struggles with complex multi-step algebraic proofs (19/24 rejected by the kernel) and is designed to work exclusively alongside a live Lean kernel and static scanner.
Trained on 270 examples (prover_train.jsonl); Apache-2.0 license.










Comments