Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

docs(examples): price GPT-5.4 mini at its real-time rate in the OCR example (#475)

svonavaea42f92e60ea
diff --git a/examples/ocr-receipts-handwriting/README.md b/examples/ocr-receipts-handwriting/README.md
index 9fae36894..2c1f9cc2d 100644
--- a/examples/ocr-receipts-handwriting/README.md
+++ b/examples/ocr-receipts-handwriting/README.md
@@ -10,7 +10,7 @@ EasyOCR read the same images, and every output was scored by the same rule.
| System | Words read exactly | Handwriting (GNHK) | $ per 1,000 images |
| --- | --- | --- | --- |
| SIE LightOnOCR-2-1B | 92.4% | 83.9% | $1.16 |
-| GPT-5.4 mini | 91.3% | 81.6% | $1.18 on the batch API, $2.36 standard |
+| GPT-5.4 mini | 91.3% | 81.6% | $2.36 |
| PaddleOCR PP-OCRv5, self-hosted | 81.9% | 54.6% | $0 plus your servers |
| Tesseract 5, self-hosted | 56.7% | 12.5% | $0 plus your servers |
| EasyOCR, self-hosted | 55.1% | 15.7% | $0 plus your servers |
@@ -62,7 +62,7 @@ hold 63% of its unmatched tokens. The evidence holds every arm's precision.
Every arm received the same bytes: each photo converted to RGB, longest side at most
2,048 px, JPEG quality 92. GPT-5.4 mini's price is its recorded tokens (1,898 input and
-209 output per image on average) at $0.75 and $4.50 per million, halved on the batch API
+209 output per image on average) at its real-time $0.75 and $4.50 per million
([OpenAI pricing](https://developers.openai.com/api/docs/pricing), read 30 September 2026).
Google Cloud Vision, AWS Textract `DetectDocumentText` and Azure AI Document Intelligence
diff --git a/examples/ocr-receipts-handwriting/score.py b/examples/ocr-receipts-handwriting/score.py
index 9b1fd4bbd..bcfc724e5 100644
--- a/examples/ocr-receipts-handwriting/score.py
+++ b/examples/ocr-receipts-handwriting/score.py
@@ -48,7 +48,7 @@ ARMS = {
SETS = ("gnhk", "cord", "sroie")
# What superlinked.com/ocr publishes: words read correctly in whole percent, ours rounded
-# down and every rival up, and $ per 1,000 images (GPT-5.4 mini at its batch price on
+# down and every rival up, and $ per 1,000 images (GPT-5.4 mini at its real-time price on
# its recorded tokens; self-hosted engines at $0 plus your servers).
PAGE = {
"percent": {
@@ -58,7 +58,7 @@ PAGE = {
"tesseract-5": 57,
"easyocr": 56,
},
- "usd_per_1k": {"sie-lightonocr-2-1b": 1.16, "gpt-5.4-mini": 1.18},
+ "usd_per_1k": {"sie-lightonocr-2-1b": 1.16, "gpt-5.4-mini": 2.36},
}
# The token rule, fixed before the run: NFKC; markup stripped from model output; split on
@@ -123,9 +123,9 @@ def recorded() -> int:
per_image = json.loads((EVIDENCE / "per_image.json").read_text())
gpt = results["gpt_5_4_mini"]
rate = gpt["usd_per_1m"]
- gpt_batch = (gpt["mean_input_tokens"] * rate["input"] + gpt["mean_output_tokens"] * rate["output"]) / 1e6 * 1000
- gpt_batch *= rate["batch_discount"]
- prices = {"sie-lightonocr-2-1b": results["sie"]["price_page_usd_per_1k"], "gpt-5.4-mini": gpt_batch}
+ # Real-time against real-time: GPT-5.4 mini's standard token price, not its batch tier.
+ gpt_usd = (gpt["mean_input_tokens"] * rate["input"] + gpt["mean_output_tokens"] * rate["output"]) / 1e6 * 1000
+ prices = {"sie-lightonocr-2-1b": results["sie"]["price_page_usd_per_1k"], "gpt-5.4-mini": gpt_usd}
ok = True
print(f"{'Arm':38} {'Words':>7} {'Digits':>7} {'GNHK':>6} {'CORD':>6} {'SROIE':>6} $/1k images")