Skip to content

examples : add parakeet-server example#3904

Draft
danbev wants to merge 10 commits into
ggml-org:masterfrom
danbev:parakeet-server
Draft

examples : add parakeet-server example#3904
danbev wants to merge 10 commits into
ggml-org:masterfrom
danbev:parakeet-server

Conversation

@danbev

@danbev danbev commented Jun 22, 2026

Copy link
Copy Markdown
Member

This commit adds a http server for parkeet similar to whisper-server. The shared functionality has been extracted in to
examples/server-common.h to avoid code duplication.

This commit adds a http server for parkeet similar to whisper-server.
The shared functionality has been extracted in to
examples/server-common.h to avoid code duplication.
@danbev danbev force-pushed the parakeet-server branch from e164e99 to ece8721 Compare June 23, 2026 12:23
danbev and others added 4 commits June 24, 2026 15:04
We currently don't have an session concept and having this option does
not make sense at the moment.
The motivation for this is that setting audio_ctx smaller than the
model default forces the encoder to process shorter chunks than it was
trained on which will hurt accuracy.

In the future a streaming model should be able to handles this instead.
@Turijon

Turijon commented Jun 25, 2026

Copy link
Copy Markdown

Hi @danbev. I've added small change to keep the input files: danbev#2
Quite useful when trying to check what exactly was recorded. You can merge if change is ok for you.

@danbev danbev marked this pull request as ready for review June 26, 2026 10:08
@TomTheWise

TomTheWise commented Jul 3, 2026

Copy link
Copy Markdown

Hi,

it works very fast and very good on shorter stuff, however after a few tests I saw that during running the VRAM usage is quite heavy - and that amount is not released after the transcription is finished.

service params:

[Unit]
Description=Parakeet Whisper Server (CUDA Enabled)
After=network.target

[Service]
Environment="LD_LIBRARY_PATH=/usr/local/cuda-13.0/lib64"

User=whisperuser
Group=whisperuser

WorkingDirectory=/opt/parakeet_whisper.cpp

ExecStart=/opt/parakeet_whisper.cpp/build/bin/parakeet-server \
  --model /srv/whisper.cpp/models/ggml-parakeet-tdt-0.6b-v3-q4_k.bin \
  --host 0.0.0.0 \
  --port 11535 \
  --inference-path "/v1/audio/transcriptions"

Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Uploading THIS OGG file from wikipedia via browser upload: https://en.wikipedia.org/wiki/File:Jfk_berlin_address_high.ogg

Nvidia-smi DURING transcription:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.09             Driver Version: 580.126.09     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA L4-24Q                  On  |   00000000:00:0B.0 Off |                  N/A |
| N/A   N/A    P0            N/A  /  N/A  |    8801MiB /  24576MiB |     91%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA L4-24Q                  On  |   00000000:00:0C.0 Off |                  N/A |
| N/A   N/A    P0            N/A  /  N/A  |    2035MiB /  24576MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A           88961      C   ...cpp/build/bin/parakeet-server       8784MiB |
|    1   N/A  N/A           88270      C   ....cpp/build/bin/whisper-server       2034MiB |
+-----------------------------------------------------------------------------------------+

Nvidia-smi AFTER 3 Minutes:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.09             Driver Version: 580.126.09     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA L4-24Q                  On  |   00000000:00:0B.0 Off |                  N/A |
| N/A   N/A    P0            N/A  /  N/A  |    8801MiB /  24576MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA L4-24Q                  On  |   00000000:00:0C.0 Off |                  N/A |
| N/A   N/A    P0            N/A  /  N/A  |    2035MiB /  24576MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A           88961      C   ...cpp/build/bin/parakeet-server       8784MiB |
|    1   N/A  N/A           88270      C   ....cpp/build/bin/whisper-server       2034MiB |
+-----------------------------------------------------------------------------------------+

Uploading a small "hello hello" audio file:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.09             Driver Version: 580.126.09     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA L4-24Q                  On  |   00000000:00:0B.0 Off |                  N/A |
| N/A   N/A    P0            N/A  /  N/A  |     769MiB /  24576MiB |      5%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA L4-24Q                  On  |   00000000:00:0C.0 Off |                  N/A |
| N/A   N/A    P0            N/A  /  N/A  |    2035MiB /  24576MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A           88961      C   ...cpp/build/bin/parakeet-server        768MiB |
|    1   N/A  N/A           88270      C   ....cpp/build/bin/whisper-server       2034MiB |
+-----------------------------------------------------------------------------------------+

So apparently VRAM wont get released after a transcription is finished and stays on the exact amount the last transcription job required - when a new job lands, VRAM get allocated only in the new amount and the rest (if new job requires less) is free again.

Also the VRAM usage is quite enormous - This 9:22 JFK speech uses up ~9GB of VRAM - is this expected?
Long files that won't allow the job fit into VRAM crashes the parakeet-server.

Jul 03 15:38:53 HOSTNAME parakeet-server[88961]: Successfully loaded b3e7be6a-81c3-4b7b-b480-b1f37ca2c02d.mp3
Jul 03 15:38:53 HOSTNAME parakeet-server[88961]: Running parakeet.cpp inference on b3e7be6a-81c3-4b7b-b480-b1f37ca2c02d.mp3
Jul 03 15:38:53 HOSTNAME parakeet-server[88961]: /opt/parakeet_whisper.cpp/ggml/src/ggml-cuda/ggml-cuda.cu:104: CUDA error
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-base.so.0(+0x18665) [0x7f89dba6f665]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-base.so.0(ggml_print_backtrace+0x1df) [0x7f89dba6fa3f]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-base.so.0(ggml_abort+0x11e) [0x7f89dba6fbce]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-cuda.so.0(+0x2261d3) [0x7f89d96261d3]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-cuda.so.0(_Z17ggml_cuda_op_reluR25ggml_backend_cuda_contextP11ggml_tensor+0x44c) [0x7f89d97e061c]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-cuda.so.0(+0x239ad3) [0x7f89d9639ad3]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-base.so.0(ggml_backend_sched_graph_compute_async+0x827) [0x7f89dba8c2c7]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libggml-base.so.0(ggml_backend_sched_graph_compute+0xe) [0x7f89dba8c5de]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libparakeet.so.1(+0xb68c) [0x7f89dc0fc68c]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libparakeet.so.1(+0x1204d) [0x7f89dc10304d]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/libparakeet.so.1(parakeet_full_with_state+0x12b) [0x7f89dc10b93b]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/parakeet-server(+0x13ad7) [0x55aef25d4ad7]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/parakeet-server(+0x17011) [0x55aef25d8011]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/parakeet-server(+0x413ac) [0x55aef26023ac]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/parakeet-server(+0x42aa5) [0x55aef2603aa5]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /opt/parakeet_whisper.cpp/build/bin/parakeet-server(+0x1913e) [0x55aef25da13e]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /lib/x86_64-linux-gnu/libstdc++.so.6(+0xe1224) [0x7f89dbee1224]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /lib/x86_64-linux-gnu/libc.so.6(+0x92b7b) [0x7f89dbbaeb7b]
Jul 03 15:38:53 HOSTNAME parakeet-server[89086]: /lib/x86_64-linux-gnu/libc.so.6(+0x1107f8) [0x7f89dbc2c7f8]
Jul 03 15:38:53 HOSTNAME systemd[1]: parakeet-whisper.service: Main process exited, code=killed, status=6/ABRT
Jul 03 15:38:53 HOSTNAME systemd[1]: parakeet-whisper.service: Failed with result 'signal'.

@danbev

danbev commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Sorry about this, I'll take a closer look but I'm currently on holidays for a few weeks so it will take a while before I get a chance. I'll move this back to draft when I have access to a computer again.

@danbev danbev marked this pull request as draft July 11, 2026 05:39
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

Successfully merging this pull request may close these issues.

3 participants