What StepFun-Formalizer-7B does
StepFun-Formalizer-7B is a language model for mathematical autoformalization. In practical terms, it takes a problem written in ordinary mathematical language and produces a formal statement in Lean 4, a proof-assistant language used to express definitions, propositions, and proofs in a machine-checkable form.
The model is aimed primarily at the formalization step, not at replacing Lean's verifier. It can identify mathematical objects and relationships in an informal prompt and propose a corresponding theorem statement, including relevant definitions, imports, and Mathlib terminology. The generated result remains a candidate until it is compiled and checked in a compatible Lean environment.
This distinction is important for new users. A fluent-looking Lean response is not automatically a correct formalization. Lean checking can reveal syntax errors, missing imports, incorrect theorem statements, or a mismatch between the intended informal problem and the generated proposition.
Position in the StepFun lineup
The model belongs to the StepFun-Formalizer family and is the smaller named variant described in the supplied research. A 32B sibling is also identified in the research, but StepFun-Formalizer-7B is the subject of this page. Its smaller scale makes it a more practical candidate for local or resource-constrained deployment than a much larger specialized checkpoint, while the larger sibling may be relevant when maximum formalization quality is more important than hardware efficiency.
The canonical name uses 7B, while the Hugging Face listing describes the checkpoint as approximately 8B parameters. The model is based on DeepSeek-R1-Distill-Qwen-7B and has been fine-tuned for formalization rather than general-purpose conversational assistance. It is distributed through Hugging Face under the Apache 2.0 license.
How the model is intended to be used
StepFun describes the training approach as combining formal-knowledge distillation, informal-to-formal reasoning synthesis, supervised fine-tuning, and reinforcement learning with verification-oriented feedback. These methods are intended to connect mathematical reasoning in ordinary language with the vocabulary and structure expected by a formal theorem prover.
The model card provides prompting examples that ask the model to generate Lean 4 statements from a supplied Mathlib header. A practical workflow is therefore to provide the mathematical problem, specify the expected Lean and Mathlib environment, request a formal statement, and then test the output in Lean. If the statement does not compile or does not express the intended problem, the prompt can be revised and another candidate generated.
This workflow makes StepFun-Formalizer-7B useful as a formalization assistant. It does not establish that the model independently proves every theorem it describes, and the supplied research does not identify it as a complete autonomous theorem-proving system.
Benchmark results and main strengths
In the authors' evaluation, StepFun-Formalizer-7B achieved BEq@1 scores of 38.3% on FormalMATH-Lite, 25.1% on ProverBench, and 5.2% on CombiBench. With up to 16 generated candidates, the reported BEq@16 scores were 61.2%, 37.9%, and 11.0% on the same benchmarks, respectively.
BEq measures whether at least one generated formal statement is definitionally or semantically equivalent to the reference under the evaluation procedure. The difference between the one-sample and 16-sample results indicates the practical value of generating multiple candidates when the deployment workflow can rank or verify them. It also shows why evaluation results should not be read as a guarantee that the first output will be correct.
The benchmarks cover mathematical areas including algebra, number theory, calculus, and combinatorial problems. Within its intended niche, the model's key strengths are its specialization in Lean 4, its ability to map informal mathematical language to formal statements, and its relatively modest open-weight size. The Apache 2.0 license and downloadable checkpoint also allow deployers to build local workflows without depending on a provider-managed inference endpoint.
Technical specifications and supported modalities
| Specification | Verified information |
|---|---|
| Model family | StepFun-Formalizer |
| Provider | StepFun |
| Parameter scale | 7B in the canonical name; approximately 8B on the Hugging Face listing |
| Context length | 16,384 tokens, according to the research paper |
| Input and output | Text input and text output |
| Primary output | Lean 4 formal statements and related text-generation responses |
| License | Apache 2.0 |
| Deployment | Local or self-managed inference through open-weight tooling |
The model is text-only in its native interface. It does not natively generate images, audio, or video, and there is no supplied evidence of image, audio, or video input. Its 16,384-token context is relevant when prompts include long mathematical descriptions, definitions, or Mathlib headers, although the usable length also depends on the selected inference system and prompt format.
No exact maximum output-token limit is specified in the supplied research. Users should therefore avoid treating the context length as a published maximum completion length. The 16,384-token figure describes the reported context capacity, not a separately verified output allowance.
Pricing and deployment costs
There is no official hosted token price supplied for StepFun-Formalizer-7B. The model is an open-weight checkpoint, so access is based on downloading and running the model rather than purchasing a documented recurring API plan. The model card includes deployment examples for Transformers and vLLM, and the repository is also associated with SGLang tooling.
That does not mean inference is free. Operators must provide suitable hardware, storage, electricity, and an inference stack. The actual cost and speed depend on the deployment configuration, including hardware and generation settings. Compared with a managed API, local deployment can offer greater control and predictable ownership of prompts and outputs, but it requires setup and operational responsibility.
The smaller model size is its main cost advantage relative to substantially larger formalization models. However, a smaller checkpoint may require more candidate generations, prompt iteration, or external checking to achieve a desired success rate. In a verification workflow, the cost of generating several candidates should be considered alongside the cost of running Lean checks.
Reasoning, coding, and tool support
StepFun-Formalizer-7B is best understood as a reasoning-oriented code-generation model for a narrow technical domain. Its reasoning capability is expressed through interpreting mathematical relationships and producing formal statements, while its coding output is specifically centered on Lean 4 rather than broad software development.
The model itself generates text and Lean code, but the supplied research does not verify native function calling, tool use, web search, or a provider-managed agent interface. Lean and Mathlib can be used as external verification tools in a surrounding pipeline, but that is different from the model having a built-in tool-use API. Similarly, no official JSON mode, hosted batch API, or managed caching service is identified.
For reliable use, an application can place the model beside a Lean compiler or checker: generate one or more statements, submit them for validation, inspect errors, and retain only outputs that compile and match the intended theorem. That surrounding process is an engineering pattern rather than a claimed built-in capability of the checkpoint.
Limitations and when to choose this model
StepFun-Formalizer-7B is a good choice when the main task is converting mathematical prose into Lean 4, especially when an organization wants an open-weight model that can run locally. It is particularly suitable for formal mathematics research, theorem-statement generation, educational experiments, and proof-assistance pipelines in which every output will be checked externally.
It may be a better fit than a general-purpose hosted language model when Lean-specific vocabulary and formalization are more important than broad conversational ability. Its open licensing and self-managed deployment can also be attractive when data must remain on local infrastructure or when a project does not want to depend on per-token API pricing.
Another option may be more appropriate for general web research, current-information retrieval, multimodal work, or applications that require a documented hosted API with tool calling, structured outputs, batch processing, or published latency and pricing guarantees. A larger sibling such as the StepFun-Formalizer 32B may be worth evaluating when the project can support greater resource use and prioritizes model scale, although the supplied research does not provide a direct head-to-head result that proves it is better for every task.
The model should also be avoided as the sole authority for mathematical correctness. Its benchmark results are meaningful evidence of specialized capability, but they do not guarantee that an individual generated statement is correct. Lean compilation and semantic review remain necessary, particularly when a formalization will be used in research, education, or production software.
Bottom line
StepFun-Formalizer-7B is a focused, open-weight model for turning natural-language mathematics into Lean 4 formal statements. Its strongest practical combination is specialization, local deployability, Apache 2.0 licensing, and a 16,384-token context. Its trade-offs are equally clear: there is no published hosted price or managed API, no verified native multimodal or tool-use interface, no specified maximum output length, and no substitute for Lean-based verification. For users building a formalization pipeline rather than a general chatbot, those characteristics make it a targeted model to evaluate.

