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

Inference on mac os not showing transcriptions #2602

Open
kabyanil opened this issue Dec 1, 2024 · 0 comments
Open

Inference on mac os not showing transcriptions #2602

kabyanil opened this issue Dec 1, 2024 · 0 comments

Comments

@kabyanil
Copy link

kabyanil commented Dec 1, 2024

Hi, I am trying to run inference on moc os monterey 12.7.6 using the default ggml-small.bin model downloaded using the download-ggml-model.sh script. Here are the steps to reproduce the issue -

  1. clone whisper.cpp github repo
  2. install sdl2 using brew install sdl2
  3. build the cloned repo using make -j in the root folder
  4. download the default whisper small model using bash ./download-ggml-model.sh small
  5. transcribe the given sample wav file using ./main -m models/ggml-small.bin -f samples/jfk.wav

Here is the output I receive -

whisper_init_from_file_with_params_no_state: loading model from 'models/ggml-small.bin'
whisper_init_with_params_no_state: use gpu    = 1
whisper_init_with_params_no_state: flash attn = 0
whisper_init_with_params_no_state: gpu_device = 0
whisper_init_with_params_no_state: dtw        = 0
whisper_init_with_params_no_state: devices    = 3
whisper_init_with_params_no_state: backends   = 3
whisper_model_load: loading model
whisper_model_load: n_vocab       = 51865
whisper_model_load: n_audio_ctx   = 1500
whisper_model_load: n_audio_state = 768
whisper_model_load: n_audio_head  = 12
whisper_model_load: n_audio_layer = 12
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 768
whisper_model_load: n_text_head   = 12
whisper_model_load: n_text_layer  = 12
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 3 (small)
whisper_model_load: adding 1608 extra tokens
whisper_model_load: n_langs       = 99
whisper_default_buffer_type: using device Metal (Intel(R) Iris(TM) Graphics 6100)
whisper_model_load:    Metal total size =   487.01 MB
whisper_model_load: model size    =  487.01 MB
whisper_backend_init_gpu: using Metal backend
ggml_metal_init: allocating
ggml_metal_init: found device: Intel(R) Iris(TM) Graphics 6100
ggml_metal_init: picking default device: Intel(R) Iris(TM) Graphics 6100
ggml_metal_init: using embedded metal library
ggml_metal_init: GPU name:   Intel(R) Iris(TM) Graphics 6100
ggml_metal_init: GPU family: MTLGPUFamilyCommon2 (3002)
ggml_metal_init: simdgroup reduction   = false
ggml_metal_init: simdgroup matrix mul. = false
ggml_metal_init: has bfloat            = false
ggml_metal_init: use bfloat            = false
ggml_metal_init: hasUnifiedMemory      = true
ggml_metal_init: recommendedMaxWorkingSetSize  =  1610.61 MB
ggml_metal_init: skipping kernel_soft_max_f16                      (not supported)
ggml_metal_init: skipping kernel_soft_max_f16_4                    (not supported)
ggml_metal_init: skipping kernel_soft_max_f32                      (not supported)
ggml_metal_init: skipping kernel_soft_max_f32_4                    (not supported)
ggml_metal_init: skipping kernel_get_rows_bf16                     (not supported)
ggml_metal_init: skipping kernel_rms_norm                          (not supported)
ggml_metal_init: skipping kernel_group_norm                        (not supported)
ggml_metal_init: skipping kernel_mul_mv_f32_f32                    (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32_1row              (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_f32_l4                (not supported)
ggml_metal_init: skipping kernel_mul_mv_bf16_bf16                  (not supported)
ggml_metal_init: skipping kernel_mul_mv_f16_f32                    (not supported)
ggml_metal_init: skipping kernel_mul_mv_f16_f32_1row               (not supported)
ggml_metal_init: skipping kernel_mul_mv_f16_f32_l4                 (not supported)
ggml_metal_init: skipping kernel_mul_mv_f16_f16                    (not supported)
ggml_metal_init: skipping kernel_mul_mv_q4_0_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q4_1_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q5_0_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q5_1_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q8_0_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q2_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q3_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q4_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q5_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_q6_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq2_xxs_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq2_xs_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq3_xxs_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq3_s_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq2_s_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq1_s_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq1_m_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq4_nl_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mv_iq4_xs_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_f32_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_f16_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_bf16_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q4_0_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q4_1_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q5_0_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q5_1_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q8_0_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q2_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q3_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q4_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q5_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_q6_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq2_xxs_f32             (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq2_xs_f32              (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq3_xxs_f32             (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq3_s_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq2_s_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq1_s_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq1_m_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq4_nl_f32              (not supported)
ggml_metal_init: skipping kernel_mul_mv_id_iq4_xs_f32              (not supported)
ggml_metal_init: skipping kernel_mul_mm_f32_f32                    (not supported)
ggml_metal_init: skipping kernel_mul_mm_f16_f32                    (not supported)
ggml_metal_init: skipping kernel_mul_mm_bf16_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q4_0_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q4_1_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q5_0_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q5_1_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q8_0_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q2_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q3_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q4_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q5_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_q6_K_f32                   (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq2_xxs_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq2_xs_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq3_xxs_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq3_s_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq2_s_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq1_s_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq1_m_f32                  (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq4_nl_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mm_iq4_xs_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_f32_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_f16_f32                 (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_bf16_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q4_0_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q4_1_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q5_0_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q5_1_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q8_0_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q2_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q3_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q4_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q5_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_q6_K_f32                (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq2_xxs_f32             (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq2_xs_f32              (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq3_xxs_f32             (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq3_s_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq2_s_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq1_s_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq1_m_f32               (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq4_nl_f32              (not supported)
ggml_metal_init: skipping kernel_mul_mm_id_iq4_xs_f32              (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_f16_h64            (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_f16_h80            (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_f16_h96            (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_f16_h112           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_f16_h128           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_f16_h256           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h64           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h80           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h96           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h112          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h128          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_bf16_h256          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_0_h64           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_0_h80           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_0_h96           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_0_h112          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_0_h128          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_0_h256          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_1_h64           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_1_h80           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_1_h96           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_1_h112          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_1_h128          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q4_1_h256          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_0_h64           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_0_h80           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_0_h96           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_0_h112          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_0_h128          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_0_h256          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_1_h64           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_1_h80           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_1_h96           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_1_h112          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_1_h128          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q5_1_h256          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q8_0_h64           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q8_0_h80           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q8_0_h96           (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q8_0_h112          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q8_0_h128          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_q8_0_h256          (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_f16_h128       (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h128      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q4_0_h128      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q4_1_h128      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q5_0_h128      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q5_1_h128      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q8_0_h128      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_f16_h256       (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_bf16_h256      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q4_0_h256      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q4_1_h256      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q5_0_h256      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q5_1_h256      (not supported)
ggml_metal_init: skipping kernel_flash_attn_ext_vec_q8_0_h256      (not supported)
ggml_metal_init: skipping kernel_cpy_f32_bf16                      (not supported)
ggml_metal_init: skipping kernel_cpy_bf16_f32                      (not supported)
ggml_metal_init: skipping kernel_cpy_bf16_bf16                     (not supported)
whisper_backend_init: using BLAS backend
whisper_init_state: kv self size  =   18.87 MB
whisper_init_state: kv cross size =   56.62 MB
whisper_init_state: kv pad  size  =    4.72 MB
whisper_init_state: compute buffer (conv)   =   26.92 MB
whisper_init_state: compute buffer (encode) =  148.74 MB
whisper_init_state: compute buffer (cross)  =   10.79 MB
whisper_init_state: compute buffer (decode) =  102.77 MB

system_info: n_threads = 4 / 4 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | COREML = 0 | OPENVINO = 0 | 

main: processing 'samples/jfk.wav' (176000 samples, 11.0 sec), 4 threads, 1 processors, 5 beams + best of 5, lang = en, task = transcribe, timestamps = 1 ...



whisper_print_timings:     load time =  1131.39 ms
whisper_print_timings:     fallbacks =   5 p /   0 h
whisper_print_timings:      mel time =    21.54 ms
whisper_print_timings:   sample time =     5.74 ms /    30 runs (    0.19 ms per run)
whisper_print_timings:   encode time =  9596.01 ms /     1 runs ( 9596.01 ms per run)
whisper_print_timings:   decode time =     0.00 ms /     1 runs (    0.00 ms per run)
whisper_print_timings:   batchd time =   537.63 ms /    18 runs (   29.87 ms per run)
whisper_print_timings:   prompt time =     0.00 ms /     1 runs (    0.00 ms per run)
whisper_print_timings:    total time = 11628.92 ms
ggml_metal_free: deallocating

Running the exact same steps produces the expected transcription output in my ubuntu 22.04 machine. There, the transcription appears with a to-and-fro timestamp below the line main: processing 'samples/jfk.wav' (176000 samples, 11.0 sec), 4 threads, 1 processors, 5 beams + best of 5, lang = en, task = transcribe, timestamps = 1 .... However in my mac, the transcription output is not shown.

Any help to fix this would be much appreciated!

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

1 participant