Model reference · open weights

PP-FormulaNet_plus-S

LLMs PaddlePaddle Image→text 1 build Open weights 604 dl/mo

PP-FormulaNet_plus-S is an open-weight language model from Baidu.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • PP-FormulaNet_plus-S is an image-to-text model developed by Baidu for recognizing mathematical formulas in English and Chinese.
  • It is part of the PaddleOCR suite and is licensed under Apache-2.0.
  • The model uses the PPHGNetV2_B4 backbone and achieves an En-BLEU score of 88.71 and a Zh-BLEU score of 53.32, with a GPU inference time of 191.69 milliseconds.

Summary of the PaddlePaddle/PP-FormulaNet_plus-S model card, 2026-10-01

What it is

Released byBaidu
Released2025-06-06

From the model card

What Baidu says about PP-FormulaNet_plus-S

Read the model card

Introduction

PP-FormulaNet_plus is an enhanced version of the formula recognition model developed by the PaddleOCR Team, building upon the original PP-FormulaNet. Compared to the original version, PP-FormulaNet_plus utilizes a more diverse formula dataset during training, including sources such as Chinese dissertations, professional books, textbooks, exam papers, and mathematics journals. This expansion significantly improves the model’s recognition capabilities. The PP-FormulaNet_plus includes multiple versions: L, M, and S, where PP-FormulaNet_plus-S model focuses on improving the recognition of English formulas. The key accuracy metrics are as follow:

ModelBackboneEn-BLEU↑Zh-BLEU(%)↑GPU Inference Time (ms)
UniMERNetDonut Swin85.9143.502266.96
PP-FormulaNet-SPPHGNetV2_B487.0045.71202.25
PP-FormulaNet-LVary_VIT_B90.3645.781976.52
PP-FormulaNet_plus-SPPHGNetV2_B488.7153.32191.69
PP-FormulaNet_plus-MPPHGNetV2_B691.4589.761301.56
PP-FormulaNet_plus-LVary_VIT_B92.2290.641745.25
LaTeX-OCRHybrid ViT74.5539.961244.61

Note: En-BLEU and Zh-BLEU (%) represent the BLEU scores for English formulas and Chinese formulas, respectively. The evaluation dataset for English formulas includes simple and complex formulas from UniMERNet, as well as simple, intermediate, and complex formulas from PaddleX’s internally developed dataset. The evaluation dataset for Chinese formulas comes from PaddleX’s internally developed Chinese formula dataset.

Quick Start

Installation

  1. PaddlePaddle

Please refer to the following commands to install PaddlePaddle using pip:

# for CUDA11.8
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/

# for CUDA12.6
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/

# for CPU
python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

For details about PaddlePaddle installation, please refer to the PaddlePaddle official website.

  1. PaddleOCR

Install the latest version of the PaddleOCR inference package from PyPI:

python -m pip install paddleocr

Model Usage

You can quickly experience the functionality with a single command:

paddleocr formula_recognition \
    --model_name PP-FormulaNet_plus-S  \
    -i https://cdn-uploads.huggingface.co/production/uploads/68493f0616e67d38f02f138a/4kkIUGxXMGozIg6U1BIxZ.png

You can also integrate the model inference of the formula recognition module into your project. Before running the following code, please download the sample image to your local machine.

from paddleocr import FormulaRecognition
model = FormulaRecognition(model_name="PP-FormulaNet_plus-S")
output = model.predict(input="4kkIUGxXMGozIg6U1BIxZ.png", batch_size=1)
for res in output:
    res.print()
    res.save_to_img(save_path="./output/")
    res.save_to_json(save_path="./output/res.json")

After running, the obtained result is as follows:

{'res': {'input_path': '4kkIUGxXMGozIg6U1BIxZ.png', 'page_index': None, 'rec_formula': '\\zeta_{0}(\\nu)=-\\frac{\\nu\\varrho^{-2\\nu}}{\\pi}\\int_{\\mu}^{\\infty}d\\omega\\int_{C_{+}}d z\\frac{2z^{2}}{(z^{2}+\\omega^{2})^{\\nu+1}}\\breve{\\Psi}(\\omega;z)e^{i\\epsilon z}\\quad,'}}
sudo apt-get update
sudo apt-get install texlive texlive-latex-base texlive-xetex latex-cjk-all texlive-latex-extra -y

The visualized image is as follows:

For details about usage command and descriptions of parameters, please refer to the Document.

Pipeline Usage

The ability of a single model is limited. But the pipeline consists of several models can provide more capacity to resolve difficult problems in real-world scenarios.

Formula Recognition Pipeline

The formula recognition pipeline is designed to solve formula recognition tasks by extracting formula information from images and outputting it in LaTeX source code format. And there are 4 modules in the pipeline:

  • Document Image Orientation Classification Module (Optional)
  • Text Image Unwarping Module (Optional)
  • Layout Detection Module (Optional)
  • Formula Recognition Module

Run a single command to quickly experience the Formula Recognition Pipeline. Before running the code below, please download the example image locally:

paddleocr formula_recognition_pipeline -i https://cdn-uploads.huggingface.co/production/uploads/68493f0616e67d38f02f138a/4HrLNUf2yKGI8CwN9axpt.png \
    --formula_recognition_model_name PP-FormulaNet_plus-S  \
    --save_path ./output \
    --device gpu:0

Results are printed to the terminal:

{'res': {'input_path': '/root/.paddlex/predict_input/4HrLNUf2yKGI8CwN9axpt.png', 'page_index': None, 'model_settings': {'use_doc_preprocessor': True, 'use_layout_detection': True}, 'doc_preprocessor_res': {'input_path': None, 'page_index': None, 'model_settings': {'use_doc_orientation_classify': True, 'use_doc_unwarping': True}, 'angle': 0}, 'layout_det_res': {'input_path': None, 'page_index': None, 'boxes': [{'cls_id': 2, 'label': 'text', 'score': 0.9855162501335144, 'coordinate': [90.5582, 1086.7775, 658.8992, 1553.267]}, {'cls_id': 2, 'label': 'text', 'score': 0.9814791679382324, 'coordinate': [93.042145, 12

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

How it works

How language models work

Your prompttext / messagesTransformerattention over tokensNext-token loopgenerate + streamResponsetext · tool callsA language model reads your tokens and predicts the next one, again and again, streaming the reply back.
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms