Skip to content

Conversation

danbev
Copy link
Member

@danbev danbev commented Apr 1, 2025

This commit adds a new job to the CI pipeline that downloads the base.en model and converts it to CoreML format. The CoreML model is then packed into a zip file and uploaded as an artifact.

This will only be done for pushes to master, releases, or pre-releases.

Refs: #2783


I've run this on my fork and it produces the following release:
https://github.com/danbev/whisper.cpp/releases/tag/b2368

I've only included one model but this will exercise the model conversion scripts and should give early feedback if anything breaks. We could also add more models to be published too.

This commit adds a new job to the CI pipeline that downloads the base.en
model and converts it to CoreML format. The CoreML model is then packed
into a zip file and uploaded as an artifact.

This will only be done for pushes to master, releases, or pre-releases.

Refs: ggml-org#2783
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now one model is OK to test the conversion.

Not sure if there is need to create an artifact - it would result in a lot of data (80MB) that is almost always the same.

So I think it's better to remove the artifact from this CI. We can add an additional ggml-ci that generates a CoreML model and even runs a transcription with it. It can run on the ggml-100-mac-m4 node.

@danbev
Copy link
Member Author

danbev commented Apr 1, 2025

So I think it's better to remove the artifact from this CI.

Just wanted to make sure that I'm not misunderstanding anything. Should we not include this job at all or should we just skip the publishing of the artifact?

@ggerganov
Copy link
Member

Just skip the publishing of the artifact. The job is good to have.

@danbev
Copy link
Member Author

danbev commented Apr 1, 2025

Running the CI for this as I've modified the bulid.yml. I think the build it taking a little longer than before because the test have been enabled. I did not consider this when I enabled them. I'll take a closer look though.

Only the tests labeled with gh will run in CI which currently are only test-whisper-cli-tiny and test-whisper-cli-tiny.en:

set(TEST_TARGET test-whisper-cli-tiny)
add_test(NAME ${TEST_TARGET}
    COMMAND $<TARGET_FILE:whisper-cli>
    -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-tiny.bin -l fr
    -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;gh")

set(TEST_TARGET test-whisper-cli-tiny.en)
add_test(NAME ${TEST_TARGET}
    COMMAND $<TARGET_FILE:whisper-cli>
    -m ${PROJECT_SOURCE_DIR}/models/for-tests-ggml-tiny.en.bin
    -f ${PROJECT_SOURCE_DIR}/samples/jfk.wav)
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;en;gh")

But this can still take a long time, for example ubuntu-22-gcc (Debug, linux/ppc64le):

Test project /workspace
    Start 1: test-whisper-cli-tiny
1/2 Test #1: test-whisper-cli-tiny ............   Passed  784.02 sec
    Start 2: test-whisper-cli-tiny.en
2/2 Test #2: test-whisper-cli-tiny.en .........   Passed  763.74 sec
100% tests passed, 0 tests failed out of 2
Label Time Summary:
en      = 763.74 sec*proc (1 test)
gh      = 1547.75 sec*proc (2 tests)
tiny    = 1547.75 sec*proc (2 tests)
Total Test time (real) = 1547.80 sec

@ggerganov
Copy link
Member

ggerganov commented Apr 1, 2025

Btw, to fix the thread sanitizer warnings here: https://github.com/ggerganov/whisper.cpp/actions/runs/14195883603/job/39770792600?pr=2979, we have to build with GGML_OPENMP=OFF.

Here is llama.cpp config:

https://github.com/ggml-org/llama.cpp/blob/3fd072a54001a908c54e81fd2e82b682ecfdd475/.github/workflows/build.yml#L295-L306

The reason is that OpenMP threads are causing false positives when the thread sanitizer is enabled, so we simply disable them for sanitizer tests.

@danbev danbev merged commit 04b9508 into ggml-org:master Apr 1, 2025
50 checks passed
bygreencn added a commit to bygreencn/whisper.cpp that referenced this pull request Jun 29, 2025
* tag 'v1.7.5': (256 commits)
  release : v1.7.5
  bench : update numbers [no ci] (ggml-org#2993)
  sync : ggml
  get_rows and dup optimization (llama/12671)
  opencl : fix memory allocation size (llama/12649)
  metal : use F32 prec in FA kernels (llama/12688)
  Fix clang warning in gguf_check_reserved_keys (llama/12686)
  vulkan: fix build when glslc doesn't support coopmat (llama/12683)
  SYCL: Rename oneMKL to oneMath (llama/12192)
  SYCL: switch to SYCL namespace (llama/12674)
  ggml : faster ssm scan (llama/10558)
  Vulkan: Add DP4A MMQ and Q8_1 quantization shader (llama/12135)
  cmake : fix whitespace (llama/0)
  tests : remove gh label test-whisper-cli-tiny-en (ggml-org#2988)
  examples : clarify Core ML encoder model usage [no ci] (ggml-org#2987)
  ci : remove intermediate build on push to master (ggml-org#2986)
  whisper.objc : fix typo in README.md [no ci] (ggml-org#2985)
  coreml: fix Whisper to CoreML conversion by disabling SDPA [no ci] (ggml-org#2979)
  ci : add coreml job that converts base.en to coreml [no ci] (ggml-org#2981)
  tests : re-enable tests [no ci] (ggml-org#2977)
  ...
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.

2 participants