FastAPI service wrapping the Surya-OCR-2 model (datalab-to) served through vLLM: legacy /v1/api/ai/* endpoints, an OpenAI-compatible /v1/chat/completions endpoint, a coalescing request batcher, a local OCR CLI, Docker packaging, multilingual example outputs, and quantization/concurrency benchmarks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
218 lines
5.6 KiB
JSON
218 lines
5.6 KiB
JSON
{
|
|
"started_at": "2026-06-10T15:58:07+0400",
|
|
"image": "/path/to/suya-ocr-api/temp_image_c3c56948-282e-453b-8fac-6c482243d1e5.jpg",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"levels": [
|
|
1,
|
|
2,
|
|
4,
|
|
6,
|
|
8,
|
|
10,
|
|
12,
|
|
20,
|
|
30,
|
|
40,
|
|
50
|
|
],
|
|
"results": [
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 1,
|
|
"concurrency": 1,
|
|
"success": 1,
|
|
"failed": 0,
|
|
"wall_seconds": 7.6577067924663424,
|
|
"throughput_rps": 0.13058739738949013,
|
|
"latency_seconds": {
|
|
"min": 7.656610286794603,
|
|
"mean": 7.656610286794603,
|
|
"p50": 7.656610286794603,
|
|
"p95": 7.656610286794603,
|
|
"max": 7.656610286794603
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 2,
|
|
"concurrency": 2,
|
|
"success": 2,
|
|
"failed": 0,
|
|
"wall_seconds": 11.936453193426132,
|
|
"throughput_rps": 0.16755395992349534,
|
|
"latency_seconds": {
|
|
"min": 11.934747929684818,
|
|
"mean": 11.935045637656003,
|
|
"p50": 11.934747929684818,
|
|
"p95": 11.935343345627189,
|
|
"max": 11.935343345627189
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 4,
|
|
"concurrency": 4,
|
|
"success": 4,
|
|
"failed": 0,
|
|
"wall_seconds": 20.956660461612046,
|
|
"throughput_rps": 0.19087010582278188,
|
|
"latency_seconds": {
|
|
"min": 20.942796256393194,
|
|
"mean": 20.951773355016485,
|
|
"p50": 20.954541454091668,
|
|
"p95": 20.95546007528901,
|
|
"max": 20.95546007528901
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 6,
|
|
"concurrency": 6,
|
|
"success": 6,
|
|
"failed": 0,
|
|
"wall_seconds": 29.489064288325608,
|
|
"throughput_rps": 0.20346525550406608,
|
|
"latency_seconds": {
|
|
"min": 29.45817438978702,
|
|
"mean": 29.47708616297071,
|
|
"p50": 29.48345213010907,
|
|
"p95": 29.487088727764785,
|
|
"max": 29.487088727764785
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 8,
|
|
"concurrency": 8,
|
|
"success": 8,
|
|
"failed": 0,
|
|
"wall_seconds": 41.46563811413944,
|
|
"throughput_rps": 0.192930830534405,
|
|
"latency_seconds": {
|
|
"min": 11.84945331979543,
|
|
"mean": 34.050638656364754,
|
|
"p50": 41.457184289582074,
|
|
"p95": 41.46130123361945,
|
|
"max": 41.46130123361945
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 10,
|
|
"concurrency": 10,
|
|
"success": 10,
|
|
"failed": 0,
|
|
"wall_seconds": 50.19571524951607,
|
|
"throughput_rps": 0.19922019141058875,
|
|
"latency_seconds": {
|
|
"min": 12.104127056896687,
|
|
"mean": 42.553733562212436,
|
|
"p50": 50.15600565075874,
|
|
"p95": 50.19275312870741,
|
|
"max": 50.19275312870741
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 12,
|
|
"concurrency": 12,
|
|
"success": 12,
|
|
"failed": 0,
|
|
"wall_seconds": 59.99224958010018,
|
|
"throughput_rps": 0.20002583807059768,
|
|
"latency_seconds": {
|
|
"min": 25.362822842784226,
|
|
"mean": 45.54706535985073,
|
|
"p50": 59.93020099774003,
|
|
"p95": 59.95823861565441,
|
|
"max": 59.98695467971265
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 20,
|
|
"concurrency": 20,
|
|
"success": 20,
|
|
"failed": 0,
|
|
"wall_seconds": 99.85960746835917,
|
|
"throughput_rps": 0.20028117981874766,
|
|
"latency_seconds": {
|
|
"min": 16.85126264579594,
|
|
"mean": 66.68330737100914,
|
|
"p50": 55.060471390374005,
|
|
"p95": 92.9106959477067,
|
|
"max": 99.76074412371963
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 30,
|
|
"concurrency": 30,
|
|
"success": 30,
|
|
"failed": 0,
|
|
"wall_seconds": 147.6483807535842,
|
|
"throughput_rps": 0.20318543181362822,
|
|
"latency_seconds": {
|
|
"min": 20.873554840683937,
|
|
"mean": 90.49832232653473,
|
|
"p50": 97.37336550559849,
|
|
"p95": 147.4727698881179,
|
|
"max": 147.48508568760008
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 40,
|
|
"concurrency": 40,
|
|
"success": 40,
|
|
"failed": 0,
|
|
"wall_seconds": 195.21150322351605,
|
|
"throughput_rps": 0.20490595758693703,
|
|
"latency_seconds": {
|
|
"min": 25.34921144787222,
|
|
"mean": 114.89935769808945,
|
|
"p50": 102.41363409627229,
|
|
"p95": 194.96774306707084,
|
|
"max": 194.99985321611166
|
|
},
|
|
"errors": []
|
|
},
|
|
{
|
|
"name": "vllm",
|
|
"url": "http://127.0.0.1:5002/v1/api/ai/suya_ocr_vllm/",
|
|
"requests": 50,
|
|
"concurrency": 50,
|
|
"success": 50,
|
|
"failed": 0,
|
|
"wall_seconds": 241.15029445569962,
|
|
"throughput_rps": 0.20733957680978582,
|
|
"latency_seconds": {
|
|
"min": 88.28880738746375,
|
|
"mean": 149.28542947791516,
|
|
"p50": 126.26868482958525,
|
|
"p95": 240.86813501361758,
|
|
"max": 240.87839913833886
|
|
},
|
|
"errors": []
|
|
}
|
|
]
|
|
} |