Text Generation
Transformers
PyTorch
English
internlm2
feature-extraction
math
conversational
custom_code
Run this model with HF Jobs
Run internlm/internlm2-step-prover on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/internlm/internlm2-step-prover. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/internlm/internlm2-step-prover on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/internlm/internlm2-step-prover. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/internlm/internlm2-step-prover. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use internlm/internlm2-step-prover with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use internlm/internlm2-step-prover with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="internlm/internlm2-step-prover", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("internlm/internlm2-step-prover", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use internlm/internlm2-step-prover with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "internlm/internlm2-step-prover" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/internlm2-step-prover", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/internlm/internlm2-step-prover
- SGLang
How to use internlm/internlm2-step-prover 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 "internlm/internlm2-step-prover" \ --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": "internlm/internlm2-step-prover", "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 "internlm/internlm2-step-prover" \ --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": "internlm/internlm2-step-prover", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use internlm/internlm2-step-prover with Docker Model Runner:
docker model run hf.co/internlm/internlm2-step-prover
InternLM-Step-Prover
InternLM-Step-Prover is a 7B language model trained on Lean-Github and multiple sythesis datasets. InternLM-Step-Prover achieves state-of-the-art performances on MiniF2F, ProofNet, and Putnam math benchmarks, showing its formal math proving ability in multiple domains.
Dialogue Example
### Input Example
DECL MyNat.mul_pow
GOAL a b n : N
β’ (a * b) ^ n = a ^ n * b ^ n
### Output Example
PROOFSTEP induction n with t Ht
Performance
MiniF2F
| Method | Model size | Pass | miniF2F-valid | miniF2F-test |
|---|---|---|---|---|
| Whole-Proof Generation Methods | ||||
| GPT-4-turbo 0409 | - | 64 | 25.4% | 23.0% |
| DeepSeekMath-Base | 7B | 128 | 25.4% | 27.5% |
| DeepSeek-Prover | 7B | 1 | - | 30.0% |
| 64 | - | 46.3% | ||
| 128 | - | 46.3% | ||
| 8192 | - | 48.8% | ||
| 65536 | - | 50.0% | ||
| cumulative | 60.2% | 52.0% | ||
| TheoremLlama | - | cumulative | 36.5% | 33.6% |
| Tree Search Methods | ||||
| COPRA (GPT-3.5) | - | 1 | - | 9.0% |
| COPRA (GPT-4) | - | 1 | - | 26.6% |
| DSP(Isabelle) | 540B | 100 | 42.6% | 38.9% |
| Proof Artifact Co-Training | 837M | 1 | 23.9% | 24.6% |
| 8 | 29.3% | 29.2% | ||
| ReProver | 229M | 1 | - | 25.0% |
| Llemma | 7B | 1 | 26.2% | 26.2% |
| Llemma | 34B | 1 | 27.9% | 25.8% |
| Curriculum Learning | 837M | 1 | 33.6% | 29.6% |
| 8 | 41.2% | 34.5% | ||
| 64 | 47.3% | 36.6% | ||
| Hypertree Proof Search | 600M | cumulative | 58.6% | - |
| 64 | - | 41.0% | ||
| Lean-STaR | 7B | 64 | - | 46.3% |
| InternLM2-Math | 7B | 1 | 29.9% | 30.3% |
| InternLM2-Math-Plus | 7B | 1 | - | 43.4% |
| InternLM2-Step-Prover | 7B | 1 | 59.8% | 48.8% |
| InternLM2-Step-Prover | 7B | 64 | 63.9% | 54.5% |
Proofnet & Putnam
| Method | Model size | Pass | result |
|---|---|---|---|
| ProofNet benchmark | |||
| ReProver | 229M | 1 | 13.8% |
| InternLM2-Step-Prover | 7B | 1 | 18.1% |
| Putnam benchmark | |||
| GPT-4 | - | 10 | 1/640 |
| COPRA (GPT-4) | - | 10 | 1/640 |
| DSP(Isabelle) | 540B | 10 | 4/640 |
| ReProver | 229M | 1 | 0/640 |
| InternLM2-Step-Prover | 7B | 1 | 5/640 |
Citation and Tech Report
@misc{wu2024leangithubcompilinggithublean,
title={LEAN-GitHub: Compiling GitHub LEAN repositories for a versatile LEAN prover},
author={Zijian Wu and Jiayu Wang and Dahua Lin and Kai Chen},
year={2024},
eprint={2407.17227},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2407.17227},
}
- Downloads last month
- 133
Model tree for internlm/internlm2-step-prover
Space using internlm/internlm2-step-prover 1
Collection including internlm/internlm2-step-prover
Collection
16 items β’ Updated β’ 11