Skip to content

Nougat

Converts academic PDFs into markup text, preserving LaTeX math and tables.

Stars
10.1k
Forks
633
Licence
MIT
Language
Python
Last update
1.7 years ago
Type
AI model / agent

No commits in over a year — check for forks or alternatives before adopting.

What it is

Nougat is a neural model from Meta's research team that reads scientific PDF papers and converts them into a lightweight markup format (.mmd) that is mostly compatible with Mathpix Markdown. It is built to handle LaTeX math and tables, which ordinary PDF text extraction often mangles. You run it from the command line or start a local API to process documents.

  • Convert a folder of research PDFs into .mmd files with one command
  • Extract LaTeX math and tables from a paper into markup text
  • Run a local HTTP API that returns the markdown of an uploaded PDF
  • Process only selected page ranges of a long paper using the pages option
  • Prepare training data by generating paired image and markdown datasets

Great for

  • Researchers who want editable text from arXiv-style papers with equations and tables
  • People building datasets of scientific documents in markup form
  • Developers who want a local PDF-to-markup conversion step in a pipeline
  • Users processing mostly English, Latin-alphabet academic papers

Not ideal for

  • Documents in Chinese, Russian, Japanese and similar languages, which the README says will not work
  • Non-academic PDFs like invoices or forms, since the model was trained on arXiv and PMC papers
  • Users without a GPU who need fast throughput, since CPU use may be slow and can trigger false failure detections
  • Commercial projects needing unrestricted model use, because the model weights are licensed CC-BY-NC
Step-by-step guide: how to use NougatInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Python 3.9+ · PyTorch (install the correct version first for GPU use on Windows)

    Install from PyPI

    pip install nougat-ocr

    Install from the repository

    pip install git+https://github.com/facebookresearch/nougat

    Install with API extras

    pip install "nougat-ocr[api]"
  2. 2

    Run it

    • Install the package with pip install nougat-ocr
    • Run nougat path/to/file.pdf -o output_directory to convert a PDF
    • Open the .mmd file in the output directory to read the result
    • If you see many [MISSING_PAGE] responses, rerun with the --no-skipping flag
  3. 3

    Get the most out of it

    • Use -m 0.1.0-base to switch from the default small model to the base model
    • Use --pages to convert only selected page ranges of a single PDF
    • Use the API with start and stop URL parameters to limit conversion to certain pages
    • Pass a text file listing PDF paths to process many documents in one run

Downloads

Strengths

  • Designed specifically for LaTeX math and tables in academic PDFs
  • Offers a command-line tool, a local API, and pip installation
  • Code is MIT licensed and the project is backed by a published arXiv paper

Trade-offs

  • Model weights are CC-BY-NC, so they cannot be used commercially despite the MIT-licensed code
  • Works poorly outside English-style scientific documents and can return [MISSING_PAGE] responses
  • Setup on Windows with GPU requires installing a matching PyTorch version first

How it compares

ProjectStarsTypeLevelUpdatedBest for
nougat (this)10.1kAI model / agentintermediate1.7 years agoResearchers who want editable text from arXiv-style papers with equations and tables
docling70kLibrarybeginner5 days agoPython developers building retrieval or RAG pipelines over PDFs and office files

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.