Instructions to use RickyDeSkywalker/GAR_DeepSeek-Prover-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RickyDeSkywalker/GAR_DeepSeek-Prover-V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RickyDeSkywalker/GAR_DeepSeek-Prover-V2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RickyDeSkywalker/GAR_DeepSeek-Prover-V2") model = AutoModelForCausalLM.from_pretrained("RickyDeSkywalker/GAR_DeepSeek-Prover-V2") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use RickyDeSkywalker/GAR_DeepSeek-Prover-V2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RickyDeSkywalker/GAR_DeepSeek-Prover-V2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RickyDeSkywalker/GAR_DeepSeek-Prover-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RickyDeSkywalker/GAR_DeepSeek-Prover-V2
- SGLang
How to use RickyDeSkywalker/GAR_DeepSeek-Prover-V2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RickyDeSkywalker/GAR_DeepSeek-Prover-V2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RickyDeSkywalker/GAR_DeepSeek-Prover-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RickyDeSkywalker/GAR_DeepSeek-Prover-V2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RickyDeSkywalker/GAR_DeepSeek-Prover-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RickyDeSkywalker/GAR_DeepSeek-Prover-V2 with Docker Model Runner:
docker model run hf.co/RickyDeSkywalker/GAR_DeepSeek-Prover-V2
GAR: Generative Adversarial Reinforcement Learning for Formal Theorem Proving
This is the official model for GAR: Generative Adversarial Reinforcement Learning, a framework that jointly trains a problem composer and solver in an adversarial loop for formal theorem proving.
- Paper: GAR: Generative Adversarial Reinforcement Learning for Formal Theorem Proving
- Repository: GAR-Official
- Authors: Ruida Wang, Jiarui Yao, Rui Pan, Shizhe Diao, Tong Zhang
Introduction
We introduce GAR: Generative Adversarial Reinforcement Learning, an RL training method that intends to solve inefficiency and suboptimial performance in formal theorem prover training caused by fixed problem sets. GAR jointly trains the problem composer and solver in an adversarial loop, which introduces an implicit curriculum learning mechanism, aligning the task difficulty with the prover's evolving capability to improve training efficiency and enabling stronger model performance.
Experiments indicates that GAR trained models (such as Goedel-Prover-V2-8B and DeepSeek-Prover-V2-7B) achieve an average of 4.20% of enhancement on MiniF2F-Test under pass@32, and improve the DeepSeek-Prover-V2's pass@32 performance on ProofNet-Test from 22.58% to 25.81%.
Related Artifacts
Trained Models
- GAR_Goedel-Prover-V2: RickyDeSkywalker/GAR_Goedel-Prover-V2
- GAR_DeepSeek-Prover-V2 (this repo): RickyDeSkywalker/GAR_DeepSeek-Prover-V2
Base Datasets
- Original base dataset: RickyDeSkywalker/GAR_baseDataset
- Base dataset under Numina-Math: RickyDeSkywalker/GAR_baseDataset_NuminaMath
Training Guide
Clone repository
Clone the repo using the following command:
git clone --recurse-submodules git@github.com:RickySkywalker/GAR-Official.git
Init Lean server
We apply KiminaLeanServer as the Lean verification server. It can be initialized by:
cd KiminaLeanServer
cp .env.template .env
docker compose up -d
Setup environment
The environment can be set up by running the following command:
conda env create -f environment.yaml
Clone base dataset
Clone and transform the dataset into JSON form:
from datasets import load_dataset
ds = load_dataset("RickyDeSkywalker/GAR_baseDataset_NuminaMath")
ds["train"].to_json("./base_data/GAR_base_data_Numina-Math.json")
Run training
The GAR training can be initialized through the following command, detailed training config can be found in ./main.py.
python -u ./main.py \
--training_name GAR-Prover \
--base_data_path ./base_data/GAR_base_data_Numina-Math.json
Citation
@article{wang2025gar,
title={GAR: Generative Adversarial Reinforcement Learning for Formal Theorem Proving},
author={Wang, Ruida and Yao, Jiarui and Pan, Rui and Diao, Shizhe and Zhang, Tong},
journal={arXiv preprint arXiv:2510.11769},
year={2025}
}
Acknowledgement
This material is based upon work supported partially by NSF under Grant No. 2416897, Grant No. 2505932, and by ORN under Grant No. N000142512318. This research used both Delta (NSF award OAC 2005572) and DeltaAI (NSF award OAC 2320345) advanced computing systems, and computing resources provided by NAIRR Pilot NAIRR250157.
- Downloads last month
- 6
Model tree for RickyDeSkywalker/GAR_DeepSeek-Prover-V2
Base model
deepseek-ai/DeepSeek-Prover-V2-7B