Instructions to use hmzprover/hpsearch-rerank-4b-state-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hmzprover/hpsearch-rerank-4b-state-v2 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hmzprover/hpsearch-rerank-4b-state-v2") model = AutoModelForCausalLM.from_pretrained("hmzprover/hpsearch-rerank-4b-state-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
hpsearch-rerank-4b-state-v2
hmzprover/hpsearch-rerank-4b-state (Qwen3-Reranker-4B)
fine-tuned further (LoRA r=16, merged) to judge whether a premise helps a Lean proof state (optionally followed by
an English description of the next step), for hpsearch's modes accurate
and best. Same prompt as Qwen3-Reranker (instruction: Given a Lean 4 proof state, retrieve Mathlib lemmas that help prove its goal). Listwise loss over a gold premise and 7 hard negatives mined by a state query tower trained on the same data (without intents), 48,000 training states.
Training data
Public training splits only:
- LeanDojo Benchmark 4 (v10)
random/train: each traced tactic's state paired with the premises it uses; - LeanStateSearch (
ruc-ai4math/mathlib_handler_benchmark_410)random/train, the same way. For part of the states, a one-to-three-sentence English description of the next step (written by an LLM from the state and the tactic) follows the state, as in Lean Finder's "augmented" proof states.
Decontamination (strict): a state is dropped when its theorem is in a held-out split or is the theorem of any evaluation query, when its text equals any evaluation query, or when its goal equals the goal of any proof-state evaluation query; a premise is dropped when its name or statement is a gold of any evaluation (MathlibQR/MPR, Lean Finder, LeanStateSearch, TBPS, TheoremSearch, MIRB, LeanDojo, hpsearch's own); such premises are also left out of the contrastive softmax. Kept: 147,412 states (89,719 LeanDojo, 57,693 LeanStateSearch), 89,298 premises.
- Downloads last month
- 22
Model tree for hmzprover/hpsearch-rerank-4b-state-v2
Base model
Qwen/Qwen3-4B-Base