Spaces:
Running on Zero
Running on Zero
File size: 757 Bytes
b0dacaa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | """The Space's reference timings (reference.json): measure_reference.py writes them and app.py shows them beside its
live race."""
from __future__ import annotations
from pydantic import BaseModel
class RegionTimes(BaseModel):
"""One region's median seconds, each from the encoded images to the reading: TrOCR on its lines one after the
other and as one batch, and the reader in vLLM alone and with its DSpark draft."""
lines: int
tokens: int
trocr_single: float
trocr_batch: float
vllm: float
vllm_dspark: float
class Reference(BaseModel):
"""The timings of every example region, with the GPU and the day they were measured on."""
gpu: str
measured: str
runs: int
regions: dict[str, RegionTimes]
|