-
Notifications
You must be signed in to change notification settings - Fork 32
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
other backends such as whisper.cpp? #33
Comments
I think whisper.cpp does not support batching. Do you know of any community implementation for batched whisper.cpp ? |
The "tigros" link i gave you above, the guy names it "batch" but I'm not sure if it's "batch" in the same sense as you mean the word in a technical sense... |
And apparently he uses the the "const-me/whisper" repository's approach...and just creates multiple instances though, which might be different technically than what you're referring to? However, correct me if I'm wrong, but weren't you the one to implement batch processing with ctranslate2? I don't know of anyone else who did before you, and it'd been something I'd been looking for for awhile. WhisperX I guess kind of did it I guess...I know there was some discussion on faster-whisper about it, but I didn't think that he actually did it. That's why I thought you could implement batch processing in whisper.cpp if it didn't already exist? |
Upon further researching the issue...am I correct in understanding that you're referring to batch processing capabilities like this method within the ctranslate2 library:
I believe that your program primarily harnesses the inherent batch processing capabilities of ctranslate2 in this manner in contrast to the And you're wondering if whisper.cpp has something similar? |
I did some further research regarding the https://github.com/ggerganov/whisper.cpp/blob/master/whisper.cpp I "believe" that it allows for batch processing in this snippet. I will first provide you with the portions from the "cpp" repository that pertain to batch processing...then, if I'm able, I'll locate any python bindings for MULTIPLE EXAMPLES OF BATCH REFERENCES FROM WHISPER.CPP
static struct ggml_cgraph * whisper_build_graph_decoder(
} // evaluate the decoder
}
int whisper_decode_with_state(struct whisper_context * ctx, struct whisper_state * state, const whisper_token * tokens, int n_tokens, int n_past, int n_threads) {
} int whisper_decode(struct whisper_context * ctx, const whisper_token * tokens, int n_tokens, int n_past, int n_threads) {
} int whisper_tokenize(struct whisper_context * ctx, const char * text, whisper_token * tokens, int n_max_tokens) {
} int whisper_lang_max_id() {
} int whisper_lang_id(const char * lang) {
} const char * whisper_lang_str(int id) {
} const char * whisper_lang_str_full(int id) {
} int whisper_lang_auto_detect_with_state(
} int whisper_lang_auto_detect( int whisper_model_n_vocab(struct whisper_context * ctx) { int whisper_model_n_audio_ctx(struct whisper_context * ctx) { int whisper_model_n_audio_state(struct whisper_context * ctx) { int whisper_model_n_audio_head(struct whisper_context * ctx) { int whisper_model_n_audio_layer(struct whisper_context * ctx) { int whisper_model_n_text_ctx(struct whisper_context * ctx) { int whisper_model_n_text_state(struct whisper_context * ctx) { int whisper_model_n_text_head(struct whisper_context * ctx) { int whisper_model_n_text_layer(struct whisper_context * ctx) { int whisper_model_n_mels(struct whisper_context * ctx) { int whisper_model_ftype(struct whisper_context * ctx) { int whisper_model_type(struct whisper_context * ctx) { const char *whisper_model_type_readable(struct whisper_context * ctx) { int whisper_n_len_from_state(struct whisper_state * state) { int whisper_n_len(struct whisper_context * ctx) { int whisper_n_vocab(struct whisper_context * ctx) { int whisper_n_text_ctx(struct whisper_context * ctx) { int whisper_n_audio_ctx(struct whisper_context * ctx) { int whisper_is_multilingual(struct whisper_context * ctx) { float * whisper_get_logits(struct whisper_context * ctx) { float * whisper_get_logits_from_state(struct whisper_state * state) { const char * whisper_token_to_str(struct whisper_context * ctx, whisper_token token) { whisper_token whisper_token_eot(struct whisper_context * ctx) { whisper_token whisper_token_sot(struct whisper_context * ctx) { whisper_token whisper_token_solm(struct whisper_context * ctx) { whisper_token whisper_token_prev(struct whisper_context * ctx) { whisper_token whisper_token_nosp(struct whisper_context * ctx) { whisper_token whisper_token_not(struct whisper_context * ctx) { whisper_token whisper_token_beg(struct whisper_context * ctx) { whisper_token whisper_token_lang(struct whisper_context * ctx, int lang_id) { whisper_token whisper_token_translate(struct whisper_context * ctx) { whisper_token whisper_token_transcribe(struct whisper_context * ctx) { void whisper_print_timings(struct whisper_context * ctx) {
} void whisper_reset_timings(struct whisper_context * ctx) {
|
This also seems to confirm that whisper.cpp supports batch processing like huggingface and ctranslate2 do.... |
One the announcement for version 1.5 it states that they support batching... https://github.com/ggerganov/whisper.cpp/releases?q=batch&expanded=true And these python bindings claim to support https://github.com/abdeladim-s/pywhispercpp/releases/tag/v1.2.0 Note, the above bindings are NOT listed on https://github.com/stlukey/whispercpp.py I don't know if this means that the owner of "abdeladim" just hasn't requested a community integration shoutout or what...so I wouldn't assume necessarily that his bindings aren't good... |
If you're collecting backends, I'd be very interested in seeing whisper.cpp as a possible backend. Here are some links:
https://github.com/ggerganov/whisper.cpp
https://github.com/abdeladim-s/pywhispercpp
https://github.com/tigros/Whisperer
https://github.com/Const-me/Whisper
https://github.com/aarnphm/whispercpp
The text was updated successfully, but these errors were encountered: