Theme

Scriptor

A long scribe's desk seen from the front. A tall stack of yellowed scanned pages stands at the left, a white feather quill rests in a black inkwell beside a small teal box in the middle, and a row of clean blank pages is laid out at the right.

Scriptor, Latin for "scribe", is a server that reads scanned pages into text. Scriptor runs the GLM-OCR model on the NVIDIA DGX Spark, entirely on your own computer, and answers in the same way as the OpenAI API, so software you already use can send pages to Scriptor without changes.

Get Scriptor on GitHub Download the Latest Release See the Measured Speed

What Scriptor Is

Scriptor is our own engine for the GLM-OCR model, written from the ground up for the NVIDIA DGX Spark. Most people run GLM-OCR with vLLM, a general-purpose server made to run many models on many kinds of computer. Scriptor is made for one job on one computer: reading pages quickly.

Speed
About 1.92 times as many pages an hour as vLLM
Pace
About 5,600 pages an hour
Same Text
97.69% of words recovered, the same as vLLM at 97.67%

What Scriptor Does

  • Reads Pages Into Text

    Send a picture of a page and Scriptor returns the words on the page. Scriptor reads many pages at the same time and can send each answer back as the answer is written.

  • Works With Software You Already Have

    Scriptor accepts the same requests as the OpenAI chat API and reports the same measurements as a vLLM server, so programs and dashboards built for either one keep working.

  • Stays on Your Computer

    Scriptor uses only the model folder and the network address you name. Scriptor downloads nothing, looks for nothing, and sends your pages nowhere else.

  • Starts Clean Every Time

    Scriptor prepares everything needed at each start and keeps the result in memory only, so nothing saved from an earlier run can go stale.

  • Protects the Computer

    Scriptor checks that the model fits in memory before starting, watches memory while running, and turns new work away with a request to retry before the computer runs short.

  • Stops Safely

    When asked to stop, Scriptor finishes the pages in progress first. After a hardware fault, Scriptor exits with a code that tells the supervising program whether a restart will help.

One Program for Pages and Documents

Scriptor is one program. A single command, scriptor serve, runs the engine that reads pages and the document bridge that reads whole documents together, in one process.

scriptor serve --model /path/to/glm-ocr
Engine
Answers in the same way as the OpenAI API, so software you already use can send pages to it. It listens on port 8002 by default.
Document Bridge
Takes PDFs and PNG, JPEG, and WebP images, finds the text regions on each page with the PP-DocLayoutV3 layout model, reads each region with the engine, and returns the assembled text on its own port, 8765 by default.
Engine Alone
Add --no-bridge to scriptor serve to run the engine without the document bridge.
Bridge Alone
scriptor bridge runs a document bridge against an engine running elsewhere, such as a vLLM server.

Scriptor Compared With vLLM

We read the same 15 public example documents, 368 pages in all, with Scriptor and with vLLM, again and again, on one NVIDIA DGX Spark, using the same model and the same settings. Total time and pages an hour were better in every one of the 10 runs, and start-up time was better in every one of the 9 runs measured after the first start. The other timings pool all 10 runs, so they have no run-by-run range; for every timing shown, the 95% confidence interval of the gain lies entirely beyond the 5% margin that counts as a tie.

How We Tested

Runs
10 runs for each of Scriptor and vLLM, run in pairs with the order swapped each time and a fresh start for every run
Pages
15 documents, 368 pages per run, 3,680 pages for each engine
Requests
About 46,500 requests for each engine, 32 at a time
Typical (p50)
Half of requests were faster than this
Slowest 1 in 100 (p99)
99 in 100 requests were faster than this
Reading All 368 Pages

Time to Read 368 Pages

A shorter bar is better.

Typical (p50)

About 48% less time

Scriptor
236.7 seconds
vLLM
454.8 seconds

Slowest Run (p99)

About 47% less time

Scriptor
240.6 seconds
vLLM
457.1 seconds

Pages Read in an Hour

A longer bar is better.

Typical (p50)

About 1.92 times as many

Scriptor
About 5,598
vLLM
About 2,913

The pages an hour are worked out from the times measured for 368 pages, on one computer running without a break. For the whole job, the slowest run is the p99.

Waiting for Text

Time to the First Text

A shorter bar is better.

Typical (p50)

About 45% less time

Scriptor
5.1 seconds
vLLM
9.2 seconds

Slowest 1 in 100 (p99)

About 25% less time

Scriptor
29.5 seconds
vLLM
39.5 seconds

Time for a Whole Request

A shorter bar is better.

Typical (p50)

About 37% less time

Scriptor
8.3 seconds
vLLM
13.3 seconds

Slowest 1 in 100 (p99)

About 29% less time

Scriptor
29.7 seconds
vLLM
41.9 seconds

Time Spent Writing a Request's Text

A shorter bar is better.

Typical (p50)

About 47% less time

Scriptor
0.58 seconds
vLLM
1.09 seconds

Slowest 1 in 100 (p99)

About 56% less time

Scriptor
7.1 seconds
vLLM
16.2 seconds

A request is one page region sent to the server. The first text is the moment a request starts to answer, and the whole request runs until the last text arrives.

Starting Up and Staying Within Limits

Time to Get Ready to Read

A shorter bar is better.

After the First Start

About 10.8 times sooner

Scriptor
14.3 seconds
vLLM
154.3 seconds

Answers Cut Off at the Length Limit

A shorter bar is better.

Out of About 46,500 Requests Per Engine

90 fewer

Scriptor
0 requests
vLLM
90 requests

Start-up time is counted after the first start, once the model files are already in memory.

Accuracy, Repeatability, and Memory

Words Recovered From the Documents

A longer bar is better.

Against the Text Stored in the Documents

The same result

Scriptor
97.69%
vLLM
97.67%

Same Text From Run to Run

A longer bar is better.

Page Regions With Identical Text

More repeatable

Scriptor
99.83%
vLLM
98.24%

Memory Held While Running

A shorter bar is better.

Both Engines Running

About the same, with Scriptor holding about 2% more.

Scriptor
80,105 MiB
vLLM
78,415 MiB

Accuracy was checked against the text stored in the documents. Repeatability is how often the same page region gave the same text from one run to the next. Scriptor and vLLM tie on accuracy and on memory.

What Scriptor Needs

Computer
An NVIDIA DGX Spark running Linux
Model
A copy of the GLM-OCR model that you supply; the model is not bundled with Scriptor
Layout Model
For the document bridge, a PP-DocLayoutV3 layout model in ONNX form and an onnxruntime library that you supply; neither is bundled with Scriptor
Installation
A ready-to-run aarch64 Linux CUDA build from the releases page, or build from source with Rust and the NVIDIA CUDA toolkit

Licensing

Scriptor is dual-licensed. You may use Scriptor under the GNU Affero General Public License, version 3 only (AGPL-3.0-only), or under a commercial license from Chiron Courseworks.

Frequently Asked Questions

Can I use Scriptor without paying?
Yes. The AGPL-3.0-only license lets you use, study, change, and share Scriptor. In return, if you distribute Scriptor, or let others use a modified version over a network, you must make the corresponding source code available under the same license.
When do I need a commercial license for Scriptor?
When those conditions do not work for you: for example, building Scriptor into a product or service whose source you will not release, or working in an organization whose policies do not permit AGPL software. A commercial license releases you from the AGPL obligations.
How do I get Scriptor?
Scriptor is released on GitHub at github.com/mdmurphy822/Scriptor, the official source for releases and source code. The releases page has a ready-to-run build for aarch64 Linux with CUDA, made for the NVIDIA GB10 in the DGX Spark. For a commercial license, contact us.
Does Scriptor need an internet connection?
No. Scriptor runs entirely offline, and your pages never leave your computer.
Does Scriptor work with SemantiK?
Yes, but Scriptor does not need SemantiK. Scriptor's own document bridge reads whole documents, and SemantiK can also send pages to Scriptor to be read, like any other program that uses the OpenAI chat API.

Get Scriptor on GitHub Ask About a Commercial License