Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server example: 1st query fast, subsequent queries slower #2657

Open
laurence-henderson opened this issue Dec 22, 2024 · 1 comment
Open

Comments

@laurence-henderson
Copy link

Repeatably the first time I call /inference after the server has been started performance is great, constant 100% CPU. Subsequent calls take about twice as long, CPU activity fluctuates from about 20% to 80%.
Something to do with reusing the context?

<start server with ./build/bin/whisper-server -m models/ggml-small.en.bin -t 16>
time curl 127.0.0.1:8080/inference -H "Content-Type: multipart/form-data" -F file=@./samples/output.wav
real 0m26.195s
time curl 127.0.0.1:8080/inference -H "Content-Type: multipart/form-data" -F file=@./samples/output.wav
real 0m48.280s
time curl 127.0.0.1:8080/inference -H "Content-Type: multipart/form-data" -F file=@./samples/output.wav
real 0m48.256s

<restart server with ./build/bin/whisper-server -m models/ggml-small.en.bin -t 16>
time curl 127.0.0.1:8080/inference -H "Content-Type: multipart/form-data" -F file=@./samples/output.wav
real 0m26.566s
time curl 127.0.0.1:8080/inference -H "Content-Type: multipart/form-data" -F file=@./samples/output.wav
real 0m48.180s
time curl 127.0.0.1:8080/inference -H "Content-Type: multipart/form-data" -F file=@./samples/output.wav
real 0m48.206s

Each invocation I see the exact same server output:

system_info: n_threads = 16 / 16 | AVX = 0 | AVX2 = 0 | AVX512 = 0 | FMA = 0 | NEON = 1 | ARM_FMA = 1 | F16C = 0 | FP16_VA = 1 | WASM_SIMD = 0 | SSE3 = 0 | SSSE3 = 0 | VSX = 0 | COREML = 0 | OPENVINO = 0 |
operator(): processing 'output.wav' (8142848 samples, 508.9 sec), 16 threads, 1 processors, lang = en, task = transcribe, timestamps = 1

In case it is relevant this is running on AWS ARM c7g.4xlarge, Ubuntu 24.04

@ggerganov
Copy link
Owner

Hm, not sure. I cannot reproduce locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants