Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
ad6274f
parakeet : add support for NVIDIA Parakeet
danbev Feb 27, 2026
661c9e2
ci : add -DGGML_NATIVE=OFF to windows job
danbev Apr 20, 2026
1e0c5dd
ci : add GGML_BMI2=OFF to window job
danbev Apr 20, 2026
1ed636a
examples : set flash attention to false for parakeet-cli [no ci]
danbev Apr 21, 2026
ac39626
parakeet : initialize ggml_tensors pointers to nullptr [no ci]
danbev Apr 22, 2026
05ffa91
parakeet : remove non relavant fields in parakeet_state [no ci]
danbev Apr 24, 2026
b899ce0
parakeet : fix indentation in default params [no ci]
danbev Apr 24, 2026
9fe3b5c
parakeet : check and free ggml_backend_sched_t [no-ci]
danbev Apr 24, 2026
ceaa8bb
parakeet : group related types and helpers [no ci]
danbev Apr 29, 2026
6e61988
parakeet : remove parakeet_full_parallel() API and implementation [no…
danbev Apr 30, 2026
66e6b09
parakeet : remove unused timeing fields [no ci]
danbev Apr 30, 2026
2ad47d1
parakeet : generate rel pos tensor in graph instead of in conversion …
danbev May 4, 2026
42dcf19
examples : print system info and timings for parakeet-cli [no ci]
danbev May 4, 2026
2f9216f
parakeet : add missing free of batch.i_time [no ci]
danbev May 4, 2026
27cc5d7
examples : add --output-txt and --output-file to parakeet-cli [no ci]
danbev May 4, 2026
93806f4
examples : add --no-prints to parakeet-cli
danbev May 4, 2026
3f6b17c
tests : add script to benchmark parakeet.cpp on LibriSpeech [no ci]
danbev May 4, 2026
d8b74e4
squash! tests : add script to benchmark parakeet.cpp on LibriSpeech […
danbev May 5, 2026
3fa1f69
parakeet : enable model conversion on win [no ci]
danbev May 5, 2026
0c4f4ba
parakeet : add parakeet_reset_state function [no ci]
danbev May 7, 2026
cb611a4
examples : reuse context in parakeet-cli [no ci]
danbev May 7, 2026
54ec90e
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 7, 2026
646976b
parakeet : remove unused functions [no ci]
danbev May 8, 2026
5cc5a55
parakeet : remove unused include [no ci]
danbev May 8, 2026
f9dc488
parakeet : zero initialize samples_padded [no ci]
danbev May 8, 2026
64160ed
parakeet : add mel_worker_params struct [no ci]
danbev May 8, 2026
89d59f3
parakeet : add missing eps to model output and align [no ci]
danbev May 8, 2026
a803541
parakeet : fix n_tensor calculation and cleanup [no ci]
danbev May 8, 2026
a24a5db
parakeet : remove empty block [no ci]
danbev May 8, 2026
ab031ed
parakeet : clean up comments [no ci]
danbev May 8, 2026
d934101
parakeet : clear tdt_stream_state in parakeet_reset_state
danbev May 11, 2026
7e0e274
parakeet : add parakeet_stream_clear helper function
danbev May 11, 2026
ab609b0
parakeet : minor cleanup of parakeet.h [no ci]
danbev May 13, 2026
9164f9c
parakeet : remove flash attention param
danbev May 13, 2026
c68ab47
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 15, 2026
efab3e1
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 19, 2026
094fa51
parakeet : add progress_callback call
danbev May 20, 2026
5edf4a5
parakeet : call encoder_begin_callback
danbev May 20, 2026
319ccc4
parakeet : enable abort_callback to be called
danbev May 20, 2026
cb7725c
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 21, 2026
9f1b430
parakeet : replace hardcode dimensions [no ci]
danbev May 25, 2026
a24aa3f
parakeet : add missing n_conv_kernel from orig model [no ci]
danbev May 25, 2026
9c99575
parakeet : remove more hardcoded dimensions/values [no ci]
danbev May 25, 2026
83b618e
parakeet : add small test model and generator script
danbev May 25, 2026
1443301
parakeet : updated test model to avoid NaN
danbev May 26, 2026
78db596
parakeet : fix segment fault in test-parakeet-stream
danbev May 26, 2026
29933c4
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 26, 2026
8302e8e
fix asan issue with test model
danbev May 27, 2026
a8cc3fa
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 29, 2026
3ce5332
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev May 29, 2026
da55e1e
parakeet : remove flash attn options from README.md [no ci]
danbev Jun 1, 2026
ce4e756
parakeet : add exception handling to parakeet_model_load [no ci]
danbev Jun 2, 2026
2d5219a
cmake : use CMAKE_INSTALL_LIBDIR for parakeet.cpp [no ci]
danbev Jun 2, 2026
b9ea94a
parakeet : remove unnecessary ggml_cont operations
danbev Jun 8, 2026
0bfa13d
parakeet : remove redundant ggml_cont in encoder graph
danbev Jun 8, 2026
fa763f6
parakeet : merge/fuse subsampling and encoder
danbev Jun 8, 2026
8cd9718
parakeet : remove streaming path from parakeet_full_with_state
danbev Jun 8, 2026
4d410be
parakeet : add parakeet_stream_params [no ci]
danbev Jun 8, 2026
78c82d9
parakeet: use local encoder attention for long audio
danbev Jun 9, 2026
ac935e3
parakeet : support f16 model conversion [no ci]
danbev Jun 10, 2026
0764628
parakeet : add quantization support [no ci]
danbev Jun 10, 2026
f55f7eb
tests : update run-tests.sh to support parakeet models [no ci]
danbev Jun 10, 2026
c1d57fa
parakeet : fix parakeet_log_callback_default [no ci]
danbev Jun 10, 2026
94c226b
parakeet : clean up of local attention [no ci]
danbev Jun 11, 2026
210c05e
parakeet : clarify stride-shift code comment [no ci]
danbev Jun 12, 2026
804771c
scripts : add quantize-parakeet.sh script [no ci]
danbev Jun 12, 2026
b0946f4
parakeet : fix skip list in parakeet-quantize [no ci]
danbev Jun 12, 2026
9fef588
scripts : use Q8_0 as the example in parakeet model card [no ci]
danbev Jun 12, 2026
81d1469
scripts : add ggml- prefix to HF models [no ci]
danbev Jun 12, 2026
572a798
parakeet : add prediction timing and fix sample time [no ci]
danbev Jun 12, 2026
c5b308a
parakeet : use persistent tensor for encoder output
danbev Jun 14, 2026
eb8f824
parakeet : rename whisper_backend_init_gpu
danbev Jun 14, 2026
80e68a8
parakeet : avoid copying pred_h as input to joint network
danbev Jun 15, 2026
23b2eb5
parakeet : avoid forcing token embedding lookup onto CPU
danbev Jun 15, 2026
0024ebd
parakeet : reduce operations in LSTM layers
danbev Jun 16, 2026
7c06be7
parakeet : update for-tests-ggml-parakeet-dtd.bin
danbev Jun 16, 2026
e11a11e
parakeet : correct packed gates comment [no ci]
danbev Jun 16, 2026
b05d775
parakeet : use ggml-org HF org [no ci]
danbev Jun 16, 2026
17888ae
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev Jun 16, 2026
8cc7881
Merge remote-tracking branch 'upstream/master' into parakeet-support
danbev Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,20 @@ set(WHISPER_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Location
get_directory_property(WHISPER_TRANSIENT_DEFINES COMPILE_DEFINITIONS)

set_target_properties(whisper PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/whisper.h)

install(TARGETS whisper LIBRARY PUBLIC_HEADER)

target_compile_definitions(whisper PRIVATE
WHISPER_VERSION="${PROJECT_VERSION}"
)

set_target_properties(parakeet PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/parakeet.h)
install(TARGETS parakeet LIBRARY PUBLIC_HEADER)

target_compile_definitions(parakeet PRIVATE
PARAKEET_VERSION="${PROJECT_VERSION}"
)

configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/whisper-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/whisper-config.cmake
Expand All @@ -211,6 +219,35 @@ configure_file(cmake/whisper.pc.in
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/whisper.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

set(PARAKEET_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Location of header files")
set(PARAKEET_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Location of library files")
set(PARAKEET_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Location of binary files")

configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/parakeet-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/parakeet-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/parakeet
PATH_VARS
PARAKEET_INCLUDE_INSTALL_DIR
PARAKEET_LIB_INSTALL_DIR
PARAKEET_BIN_INSTALL_DIR)

write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/parakeet-version.cmake
VERSION ${WHISPER_INSTALL_VERSION}
COMPATIBILITY SameMajorVersion)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/parakeet-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/parakeet-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/parakeet)

configure_file(cmake/parakeet.pc.in
"${CMAKE_CURRENT_BINARY_DIR}/parakeet.pc"
@ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/parakeet.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

#
# programs, examples and tests
#
Expand Down
2 changes: 1 addition & 1 deletion bindings/ruby/ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
#{libs}: cmake-targets
cmake-targets:
#{"\t"}"#{cmake}" -S sources -B build #{options}
#{"\t"}"#{cmake}" --build build --config Release --target common whisper
#{"\t"}"#{cmake}" --build build --config Release --target common whisper parakeet
EOF
end
30 changes: 30 additions & 0 deletions cmake/parakeet-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
set(PARAKEET_VERSION @WHISPER_INSTALL_VERSION@)
set(PARAKEET_BUILD_COMMIT @WHISPER_BUILD_COMMIT@)
set(PARAKEET_BUILD_NUMBER @WHISPER_BUILD_NUMBER@)
set(PARAKEET_SHARED_LIB @BUILD_SHARED_LIBS@)

@PACKAGE_INIT@

set_and_check(PARAKEET_INCLUDE_DIR "@PACKAGE_PARAKEET_INCLUDE_INSTALL_DIR@")
set_and_check(PARAKEET_LIB_DIR "@PACKAGE_PARAKEET_LIB_INSTALL_DIR@")
set_and_check(PARAKEET_BIN_DIR "@PACKAGE_PARAKEET_BIN_INSTALL_DIR@")

find_package(ggml REQUIRED HINTS ${PARAKEET_LIB_DIR}/cmake)

find_library(parakeet_LIBRARY parakeet
REQUIRED
HINTS ${PARAKEET_LIB_DIR}
NO_CMAKE_FIND_ROOT_PATH
)

add_library(parakeet UNKNOWN IMPORTED)
set_target_properties(parakeet
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PARAKEET_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "ggml::ggml;ggml::ggml-base;"
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${parakeet_LIBRARY}"
INTERFACE_COMPILE_FEATURES cxx_std_11
POSITION_INDEPENDENT_CODE ON)

check_required_components(parakeet)
10 changes: 10 additions & 0 deletions cmake/parakeet.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/include

Name: parakeet
Description: Port of NVIDIA's Parakeet model in C/C++
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lggml -lggml-base -lparakeet
Cflags: -I${includedir}
2 changes: 2 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ else()
add_subdirectory(server)
add_subdirectory(quantize)
add_subdirectory(vad-speech-segments)
add_subdirectory(parakeet-cli)
add_subdirectory(parakeet-quantize)
if (WHISPER_SDL2)
add_subdirectory(stream)
add_subdirectory(command)
Expand Down
8 changes: 8 additions & 0 deletions examples/parakeet-cli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set(TARGET parakeet-cli)
add_executable(${TARGET} parakeet-cli.cpp)

include(DefaultTargetOptions)

target_link_libraries(${TARGET} PRIVATE common parakeet ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

install(TARGETS ${TARGET} RUNTIME)
106 changes: 106 additions & 0 deletions examples/parakeet-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# whisper.cpp/examples/parakeet-cli

This is an example of using the [Parakeet] model in whisper.cpp.

### Download converted model
```console
$ hf download ggml-org/parakeet-GGUF parakeet-tdt-0.6b-v3-f16.bin --local-dir models
```

### Building
```console
$ cmake -B build -S .
$ cmake --build build --target parakeet-cli -j 12
```

### Usage
```console
$ ./build/bin/parakeet-cli --help

usage: ./build/bin/parakeet-cli [options] file0 file1 ...
supported audio formats: flac, mp3, ogg, wav

options:
-h, --help [default] show this help message and exit
-t N, --threads N [4 ] number of threads to use during computation
-m, --model FILE [models/ggml-parakeet-tdt-0.6b-v3.bin] model path
-f, --file FILE [ ] input audio file
-ng, --no-gpu [false ] disable GPU
-dev N, --device N [0 ] GPU device to use
-ps, --print-segments [false ] print segment information
```

### Example
```console
$ ./build/bin/parakeet-cli -m models/parakeet-tdt-0.6b-v3-f16.bin -f samples/jfk.wav
Processing audio (176000 samples, 11.00 seconds)
Processing audio: total_frames=1101, chunk_size=1101
parakeet_decode: starting decode with n_frames=138
And so, my fellow Americans, ask not what your country can do for you, ask what you can do for your country.
```

To print segment information:
```console
$ ./build/bin/parakeet-cli -m models/parakeet-tdt-0.6b-v3-f16.bin -f samples/jfk.wav --print-segments
Processing audio (176000 samples, 11.00 seconds)
Processing audio: total_frames=1101, chunk_size=1101
parakeet_decode: starting decode with n_frames=138
And so, my fellow Americans, ask not what your country can do for you, ask what you can do for your country.

Segments (1):
Segment 0: [0 -> 1101] "And so, my fellow Americans, ask not what your country can do for you, ask what you can do for your country."
Tokens [38]:
[ 0] id= 1976 frame= 3 dur_idx= 4 dur_val= 4 p=0.9996 plog=-15.6206 t0= 24 t1= 56 word_start=true "▁And"
[ 1] id= 547 frame= 7 dur_idx= 4 dur_val= 4 p=0.9999 plog=-18.7922 t0= 56 t1= 88 word_start=true "▁so"
[ 2] id= 7877 frame= 11 dur_idx= 2 dur_val= 2 p=0.8451 plog=-14.5929 t0= 88 t1= 88 word_start=false ","
[ 3] id= 1103 frame= 13 dur_idx= 3 dur_val= 3 p=0.9996 plog=-15.6127 t0= 104 t1= 128 word_start=true "▁my"
[ 4] id= 309 frame= 16 dur_idx= 1 dur_val= 1 p=0.9912 plog=-11.9635 t0= 128 t1= 136 word_start=true "▁f"
[ 5] id= 530 frame= 17 dur_idx= 2 dur_val= 2 p=1.0000 plog=-13.5239 t0= 136 t1= 152 word_start=false "ell"
[ 6] id= 596 frame= 19 dur_idx= 3 dur_val= 3 p=1.0000 plog=-16.3120 t0= 152 t1= 176 word_start=false "ow"
[ 7] id= 3213 frame= 22 dur_idx= 4 dur_val= 4 p=0.9999 plog=-10.1462 t0= 176 t1= 208 word_start=true "▁Amer"
[ 8] id= 404 frame= 26 dur_idx= 4 dur_val= 4 p=1.0000 plog=-25.0910 t0= 208 t1= 240 word_start=false "ic"
[ 9] id= 667 frame= 30 dur_idx= 4 dur_val= 4 p=1.0000 plog=-27.1707 t0= 240 t1= 272 word_start=false "ans"
[10] id= 7877 frame= 37 dur_idx= 4 dur_val= 4 p=0.9094 plog=-16.3405 t0= 272 t1= 272 word_start=false ","
[11] id= 279 frame= 41 dur_idx= 4 dur_val= 4 p=0.9980 plog=-19.7244 t0= 328 t1= 360 word_start=true "▁a"
[12] id= 583 frame= 45 dur_idx= 4 dur_val= 4 p=1.0000 plog=-24.5312 t0= 360 t1= 392 word_start=false "sk"
[13] id= 1491 frame= 53 dur_idx= 4 dur_val= 4 p=1.0000 plog=-23.2991 t0= 424 t1= 456 word_start=true "▁not"
[14] id= 3470 frame= 65 dur_idx= 4 dur_val= 4 p=0.9995 plog=-16.7306 t0= 520 t1= 552 word_start=true "▁what"
[15] id= 3629 frame= 69 dur_idx= 2 dur_val= 2 p=0.8139 plog=-11.6486 t0= 552 t1= 568 word_start=true "▁your"
[16] id= 867 frame= 75 dur_idx= 1 dur_val= 1 p=0.9980 plog=-12.5265 t0= 600 t1= 608 word_start=true "▁co"
[17] id= 331 frame= 76 dur_idx= 2 dur_val= 2 p=1.0000 plog=-11.6697 t0= 608 t1= 624 word_start=false "un"
[18] id= 958 frame= 78 dur_idx= 2 dur_val= 2 p=1.0000 plog=-11.3621 t0= 624 t1= 640 word_start=false "tr"
[19] id= 7893 frame= 80 dur_idx= 2 dur_val= 2 p=1.0000 plog=-14.3245 t0= 640 t1= 656 word_start=false "y"
[20] id= 2059 frame= 82 dur_idx= 3 dur_val= 3 p=1.0000 plog=-17.7694 t0= 656 t1= 680 word_start=true "▁can"
[21] id= 458 frame= 85 dur_idx= 4 dur_val= 4 p=1.0000 plog=-23.2510 t0= 680 t1= 712 word_start=true "▁do"
[22] id= 509 frame= 89 dur_idx= 4 dur_val= 4 p=1.0000 plog=-23.0688 t0= 712 t1= 744 word_start=true "▁for"
[23] id= 1180 frame= 93 dur_idx= 4 dur_val= 4 p=0.9999 plog=-25.0567 t0= 744 t1= 776 word_start=true "▁you"
[24] id= 7877 frame= 98 dur_idx= 4 dur_val= 4 p=0.8820 plog=-14.2549 t0= 776 t1= 776 word_start=false ","
[25] id= 279 frame=102 dur_idx= 3 dur_val= 3 p=0.9992 plog=-16.8176 t0= 816 t1= 840 word_start=true "▁a"
[26] id= 583 frame=105 dur_idx= 4 dur_val= 4 p=1.0000 plog=-21.0352 t0= 840 t1= 872 word_start=false "sk"
[27] id= 3470 frame=109 dur_idx= 3 dur_val= 3 p=0.9999 plog=-15.4659 t0= 872 t1= 896 word_start=true "▁what"
[28] id= 1180 frame=112 dur_idx= 4 dur_val= 4 p=0.9997 plog=-17.6392 t0= 896 t1= 928 word_start=true "▁you"
[29] id= 2059 frame=116 dur_idx= 3 dur_val= 3 p=0.9999 plog=-15.5484 t0= 928 t1= 952 word_start=true "▁can"
[30] id= 458 frame=119 dur_idx= 2 dur_val= 2 p=1.0000 plog=-15.9953 t0= 952 t1= 968 word_start=true "▁do"
[31] id= 509 frame=121 dur_idx= 3 dur_val= 3 p=1.0000 plog=-15.9605 t0= 968 t1= 992 word_start=true "▁for"
[32] id= 3629 frame=124 dur_idx= 2 dur_val= 2 p=0.9994 plog=-12.2083 t0= 992 t1=1008 word_start=true "▁your"
[33] id= 867 frame=126 dur_idx= 2 dur_val= 2 p=0.9969 plog=-9.1252 t0=1008 t1=1024 word_start=true "▁co"
[34] id= 331 frame=128 dur_idx= 1 dur_val= 1 p=0.9999 plog=-12.6911 t0=1024 t1=1032 word_start=false "un"
[35] id= 958 frame=129 dur_idx= 1 dur_val= 1 p=1.0000 plog=-8.8885 t0=1032 t1=1040 word_start=false "tr"
[36] id= 7893 frame=130 dur_idx= 2 dur_val= 2 p=1.0000 plog=-14.1441 t0=1040 t1=1056 word_start=false "y"
[37] id= 7883 frame=132 dur_idx= 4 dur_val= 4 p=0.9567 plog=-11.5227 t0=1056 t1=1056 word_start=false "."
```

### Model conversion
Clone the original model from Hugging Face:
```console
$ git clone https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3
```
Convert the model:
```console
(venv) $ python models/convert-parakeet-to-ggml.py \
--model <path to cloned model> \
--out-dir models \
--out-name ggml-parakeet-tdt-0.6b-v3-f16.bin
```

[Parakeet]: https://huggingface.co/nvidia/parakeet-tdt-0.6b-v3
Loading
Loading