Text Generation
Transformers
Safetensors
English
qwen3
lean4
autoformalization
mathematics
formal-verification
reasoning
conversational
text-generation-inference
Instructions to use openbmb/MathForm-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openbmb/MathForm-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openbmb/MathForm-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openbmb/MathForm-8B") model = AutoModelForCausalLM.from_pretrained("openbmb/MathForm-8B", device_map="auto") 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 Settings
- vLLM
How to use openbmb/MathForm-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openbmb/MathForm-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openbmb/MathForm-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openbmb/MathForm-8B
- SGLang
How to use openbmb/MathForm-8B 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 "openbmb/MathForm-8B" \ --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": "openbmb/MathForm-8B", "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 "openbmb/MathForm-8B" \ --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": "openbmb/MathForm-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openbmb/MathForm-8B with Docker Model Runner:
docker model run hf.co/openbmb/MathForm-8B
update readme: add arXiv and GitHub links, update citation
Browse files- README.md +11 -7
- README_zh.md +11 -7
README.md
CHANGED
|
@@ -21,8 +21,8 @@ tags:
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
<p align="center">
|
| 24 |
-
<img src="https://img.shields.io/badge/Paper-arXiv-b31b1b.svg" alt="Paper">
|
| 25 |
-
<a href="
|
| 26 |
<a href="https://huggingface.co/datasets/openbmb/FormalVerse"><img src="https://img.shields.io/badge/🤗%20Dataset-FormalVerse-yellow.svg" alt="FormalVerse Dataset"></a>
|
| 27 |
</p>
|
| 28 |
|
|
@@ -112,7 +112,7 @@ Both servers expose an OpenAI-compatible API at
|
|
| 112 |
## Evaluation
|
| 113 |
|
| 114 |
The evaluation pipeline, benchmark files, and Pass@k scripts are available in
|
| 115 |
-
the [MathForm repository](
|
| 116 |
Kimina Lean Server. The experiments use Lean 4.21.0.
|
| 117 |
|
| 118 |
## License
|
|
@@ -122,9 +122,13 @@ This project is licensed under the Apache License 2.0.
|
|
| 122 |
## Citation
|
| 123 |
|
| 124 |
```bibtex
|
| 125 |
-
@misc{
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
}
|
| 130 |
```
|
|
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
<p align="center">
|
| 24 |
+
<a href="https://arxiv.org/abs/2608.14221"><img src="https://img.shields.io/badge/Paper-arXiv-b31b1b.svg" alt="Paper"></a>
|
| 25 |
+
<a href="https://github.com/OpenBMB/MathForm"><img src="https://img.shields.io/badge/GitHub-MathForm-181717.svg" alt="Code"></a>
|
| 26 |
<a href="https://huggingface.co/datasets/openbmb/FormalVerse"><img src="https://img.shields.io/badge/🤗%20Dataset-FormalVerse-yellow.svg" alt="FormalVerse Dataset"></a>
|
| 27 |
</p>
|
| 28 |
|
|
|
|
| 112 |
## Evaluation
|
| 113 |
|
| 114 |
The evaluation pipeline, benchmark files, and Pass@k scripts are available in
|
| 115 |
+
the [MathForm repository](https://github.com/OpenBMB/MathForm). Compilation checks require a running
|
| 116 |
Kimina Lean Server. The experiments use Lean 4.21.0.
|
| 117 |
|
| 118 |
## License
|
|
|
|
| 122 |
## Citation
|
| 123 |
|
| 124 |
```bibtex
|
| 125 |
+
@misc{pu2026mathformscalingmathematicalautoformalization,
|
| 126 |
+
title={MathForm: Scaling Mathematical Autoformalization with Knowledge Retrieval and Verification-Guided Refinement},
|
| 127 |
+
author={Lushi Pu and Weiming Zhang and Xinheng Xie and Zixuan Fu and Bingxiang He and Hengyu Zhao and Hongya Lyu and Xin Li and Jie Zhou and Yudong Wang},
|
| 128 |
+
year={2026},
|
| 129 |
+
eprint={2608.14221},
|
| 130 |
+
archivePrefix={arXiv},
|
| 131 |
+
primaryClass={cs.AI},
|
| 132 |
+
url={https://arxiv.org/abs/2608.14221},
|
| 133 |
}
|
| 134 |
```
|
README_zh.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
</div>
|
| 4 |
|
| 5 |
<p align="center">
|
| 6 |
-
<img src="https://img.shields.io/badge/Paper-arXiv-b31b1b.svg" alt="论文">
|
| 7 |
-
<a href="
|
| 8 |
<a href="https://huggingface.co/datasets/openbmb/FormalVerse"><img src="https://img.shields.io/badge/🤗%20Dataset-FormalVerse-yellow.svg" alt="FormalVerse 数据集"></a>
|
| 9 |
</p>
|
| 10 |
|
|
@@ -88,7 +88,7 @@ OpenAI 的 API。
|
|
| 88 |
|
| 89 |
## 评测
|
| 90 |
|
| 91 |
-
评测流程、基准文件和 Pass@k 脚本位于 [MathForm 仓库](
|
| 92 |
|
| 93 |
## 许可证
|
| 94 |
|
|
@@ -97,9 +97,13 @@ OpenAI 的 API。
|
|
| 97 |
## 引用
|
| 98 |
|
| 99 |
```bibtex
|
| 100 |
-
@misc{
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
}
|
| 105 |
```
|
|
|
|
| 3 |
</div>
|
| 4 |
|
| 5 |
<p align="center">
|
| 6 |
+
<a href="https://arxiv.org/abs/2608.14221"><img src="https://img.shields.io/badge/Paper-arXiv-b31b1b.svg" alt="论文"></a>
|
| 7 |
+
<a href="https://github.com/OpenBMB/MathForm"><img src="https://img.shields.io/badge/GitHub-MathForm-181717.svg" alt="代码"></a>
|
| 8 |
<a href="https://huggingface.co/datasets/openbmb/FormalVerse"><img src="https://img.shields.io/badge/🤗%20Dataset-FormalVerse-yellow.svg" alt="FormalVerse 数据集"></a>
|
| 9 |
</p>
|
| 10 |
|
|
|
|
| 88 |
|
| 89 |
## 评测
|
| 90 |
|
| 91 |
+
评测流程、基准文件和 Pass@k 脚本位于 [MathForm 仓库](https://github.com/OpenBMB/MathForm)。编译检查需要运行 Kimina Lean Server。实验使用 Lean 4.21.0。
|
| 92 |
|
| 93 |
## 许可证
|
| 94 |
|
|
|
|
| 97 |
## 引用
|
| 98 |
|
| 99 |
```bibtex
|
| 100 |
+
@misc{pu2026mathformscalingmathematicalautoformalization,
|
| 101 |
+
title={MathForm: Scaling Mathematical Autoformalization with Knowledge Retrieval and Verification-Guided Refinement},
|
| 102 |
+
author={Lushi Pu and Weiming Zhang and Xinheng Xie and Zixuan Fu and Bingxiang He and Hengyu Zhao and Hongya Lyu and Xin Li and Jie Zhou and Yudong Wang},
|
| 103 |
+
year={2026},
|
| 104 |
+
eprint={2608.14221},
|
| 105 |
+
archivePrefix={arXiv},
|
| 106 |
+
primaryClass={cs.AI},
|
| 107 |
+
url={https://arxiv.org/abs/2608.14221},
|
| 108 |
}
|
| 109 |
```
|