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 image-classify's vision LLMs at real time (#478)

svonava38e705b4771f
diff --git a/examples/image-classify/README.md b/examples/image-classify/README.md
index c16e12ae2..3346cc123 100644
--- a/examples/image-classify/README.md
+++ b/examples/image-classify/README.md
@@ -38,15 +38,16 @@ page's `page-evidence.json`:
| Arm | All three fields right | Type | Colour | Material | $ per million photos |
|---|---|---|---|---|---|
-| GPT-6 Luna | 84.2% | 94.6% | 92.9% | 96.0% | $81 (Batch) |
-| GPT-5.4 mini | 77.7% | 91.4% | 89.8% | 93.2% | $325 (Batch) |
+| GPT-6 Luna | 84.2% | 94.6% | 92.9% | 96.0% | $162 |
+| GPT-5.4 mini | 77.7% | 91.4% | 89.8% | 93.2% | $650 |
| **SIE SigLIP so400m-384** | **72.3%** | **95.8%** | 86.1% | 87.5% | **$24** |
-| Claude Haiku 4.5 | 71.2% | 90.6% | 86.3% | 90.4% | $1,079 (Batch) |
-| GPT-5.4 nano | 64.3% | 86.2% | 86.8% | 85.8% | $87 (Batch) |
+| Claude Haiku 4.5 | 71.2% | 90.6% | 86.3% | 90.4% | $2,158 |
+| GPT-5.4 nano | 64.3% | 86.2% | 86.8% | 85.8% | $174 |
| AWS Rekognition | 26.8% | 82.0% | 40.0% | 77.5% | $1,750 |
-Prices are each service's cheapest case for one million photos a month: LLMs at their Batch rate on the tokens they
-actually used, Rekognition at its first-million tier with the image-properties charge its colour answer needs.
+Prices are real-time list prices for one million photos a month: LLMs on the tokens they actually used (each at the
+cheaper resolution within a point of its best), Rekognition at its first-million tier with the image-properties charge
+its colour answer needs.
## Tag your own photo
diff --git a/examples/image-classify/fetch.py b/examples/image-classify/fetch.py
index a6e9aaf3f..a22ea72d5 100755
--- a/examples/image-classify/fetch.py
+++ b/examples/image-classify/fetch.py
@@ -28,7 +28,7 @@ HERE = Path(__file__).resolve().parent
EVIDENCE = HERE / "evidence"
DATASET = "superlinked/sie-task-evidence"
-REVISION = "6b1e8ad5d655b10486f5e8505cb8e340586e97ba"
+REVISION = "92feeb4cf95be8654a6f4a68ee06887bc195fbf7"
TASK = "catalogue-tagging"
API = f"https://huggingface.co/api/datasets/{DATASET}/tree/{REVISION}"
diff --git a/examples/image-classify/score.py b/examples/image-classify/score.py
index 5632d4c93..cf5dd9ec9 100755
--- a/examples/image-classify/score.py
+++ b/examples/image-classify/score.py
@@ -42,9 +42,9 @@ TEMPLATES = {
}
VARIANTS = ("t0", "t1", "t2", "ensemble")
-# Prices for one million photos a month, each at its cheapest case (read 2026-09-30).
+# Real-time prices for one million photos a month (read 2026-09-30).
SIE_USD_PER_1K_IMAGES = 0.0232 # google/siglip-so400m-patch14-384 on SIE Cloud
-LLM_USD_PER_1M = { # standard (input, output) per million tokens; batch is half
+LLM_USD_PER_1M = { # real-time list price (input, output) per million tokens
"gpt-6-luna": (0.10, 0.50),
"gpt-5.4-mini": (0.75, 4.50),
"gpt-5.4-nano": (0.20, 1.25),
@@ -108,7 +108,7 @@ def llm_answers(name: str, vocab: dict[str, list[str]]) -> tuple[dict[str, dict[
price_in, price_out = LLM_USD_PER_1M[name.split("@")[0]]
tin = statistics.mean(r["tokens_in"] for r in rows)
tout = statistics.mean(r["tokens_out"] for r in rows)
- return out, (tin * price_in + tout * price_out) / 2 # batch, per million photos
+ return out, tin * price_in + tout * price_out # real time, per million photos
def rekognition_answers(maps: dict[str, dict[str, str]]) -> dict[str, dict[str, str | None]]:
@@ -172,7 +172,7 @@ def main() -> int:
_, usd = llm_answers(priced, vocab)
rows.append((scored, name, {k: pct(answers, test, k) for k in ("all", *FIELDS)}, usd))
- print(f"{len(test)} test photos: share with the field right (%), and $ per million photos at the cheapest case\n")
+ print(f"{len(test)} test photos: share with the field right (%), and $ per million photos at real-time prices\n")
print(f"{'':24s} {'all three':>9s} {'type':>6s} {'colour':>6s} {'material':>8s} {'$ / 1M':>8s}")
for _, name, figures, usd in sorted(rows, key=lambda r: -r[2]["all"]):
cost = "" if math.isnan(usd) else f"{usd:8.0f}"