The platform

FreightLM reads a scanned logistics document and shows where every value came from.

It returns structured JSON in which each field carries a page and a box. [Replace: current end-to-end time on the 4B model.]

Screen recording of the review interface, with no sound. A multi-page file is split into documents shown as tabs, with the JSON, raw OCR and layout views beside the page image and its fields. Each sample run of 3 pages and 3 documents completes in about 3 to 5 seconds. The sample documents are public sample forms.
How it is built

Four layers turn a scan into JSON that points at the page.

A reviewer works in the interface. The pipeline, PostgreSQL and the GPU do the rest, on infrastructure you run.

FreightLM architecture. A reviewer works in one interface. The interface talks to FastAPI, which queues work in PostgreSQL. Workers run the pipeline stages. PostgreSQL stores the data. Everything runs on your own infrastructure: a GPU, a CPU for OCR and local disk. A reviewer The FreightLM interface 1 Postgres queue Ingest: render and normalise pagesOCR: one task per pageOCR: one task per pageClassify the documentExtract: one task per documentExtract: one task per documentGround: one task per documentGround: one task per documentFinalize: set the job status Pipeline stages 2 PostgreSQL and file storage 3 NVIDIA GPUvLLM serverPaddleOCR on CPUPostgreSQL 16popplerLocal disk··· Your infrastructure 4
    • Click a value to see the box it was read from.
    • Pages and fields appear as the pipeline finishes them.
    • The interface also runs on built-in sample data with no backend.
    • FastAPI takes uploads and serves jobs, extractions and provenance.
    • Workers cover render and extraction, OCR and grounding.
    • Each job is a graph of tasks: ingest, OCR, classify, extract, ground and finalize.
    • Workers claim tasks with SKIP LOCKED, so there is no Redis or Celery.
    • A worker crash cannot lose a job, because the claim expires.
    • Each field is stored with its JSON Pointer, page and boxes.
    • One vLLM server holds one model; [Replace: GPU memory the 4B model needs.]
    • PaddleOCR runs on CPU, at about 1.45 seconds a page.
    • Three Python environments keep OCR, vLLM and the core apart.
Ways to deploy

FreightLM runs on infrastructure you control.

Today this is the only way to run it. [Replace: confirm whether a hosted option is offered.]

FreightLM</>APIPostgresvLLMSourceclone and bootstrapYour team runs it
Live today

Run FreightLM on your own GPU server.

What you need
One NVIDIA GPU, PostgreSQL 16, poppler, Python 3.11 and Node 20 or later.
How you set it up
Clone the repository, run make bootstrap, then make start.
What to expect
[Replace: cold start time for the 4B model.]

FreightLM is built so that its results can be checked.

These principles come from the repository. They shape how results are produced and shown.

Every field points to its pixels.

Nothing is asserted that cannot be pointed at. A value the pipeline cannot find is recorded as not found.

Boxes come from OCR, never from the model.

Vision models are unreliable at pixel coordinates, so every box is OCR geometry.

Quality is measured, not asserted.

Scores come from a real 158-document set and are published with the code.

Bad output is recorded, not resampled.

Unparseable model JSON is stored as a failed outcome. Nothing is retried to make a number look better.

Postgres is the queue.

One database holds the data and the jobs. There is no broker to install.

Geometry is normalised in one place.

One file divides coordinates by page size. The interface never does that arithmetic.