We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13e647b commit 3b653c7Copy full SHA for 3b653c7
whisper.cpp/whisper.cpp
@@ -2774,7 +2774,7 @@ static bool whisper_decode_internal(
2774
whisper_context & wctx,
2775
whisper_state & wstate,
2776
const whisper_batch & batch,
2777
- const int n_threads,
+ int n_threads,
2778
bool save_alignment_heads_QKs,
2779
ggml_abort_callback abort_callback,
2780
void * abort_callback_data) {
@@ -2866,6 +2866,11 @@ static bool whisper_decode_internal(
2866
2867
logits = gf->nodes[gf->n_nodes - 1];
2868
2869
+ if (batch.n_tokens < 16) {
2870
+ if (n_threads > 20)
2871
+ n_threads = 20;
2872
+ }
2873
+
2874
if (!ggml_graph_compute_helper(sched, gf, n_threads)) {
2875
return false;
2876
}
0 commit comments