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

sync : ggml (new ops, new backend, etc) #1602

Merged
merged 6 commits into from
Dec 7, 2023
Merged

sync : ggml (new ops, new backend, etc) #1602

merged 6 commits into from
Dec 7, 2023

Conversation

ggerganov
Copy link
Owner

No description provided.

@ggerganov
Copy link
Owner Author

@slaren Did I mess-up the sync, or is this some issue with Windows:

https://github.com/ggerganov/whisper.cpp/actions/runs/7129122907/job/19412511626

@slaren
Copy link
Collaborator

slaren commented Dec 7, 2023

This seems to be caused by the code to register backends automatically on startup. The macros used for this depend heavily on the compiler and can be finicky, but it should work on MSVC. It does work on ggml and llama.cpp, so I am not sure what is different here.

@ggerganov ggerganov merged commit afce6fa into master Dec 7, 2023
72 checks passed
@ggerganov ggerganov deleted the sync branch December 7, 2023 20:27
@zshannon
Copy link

zshannon commented Dec 7, 2023

there's a bug somewhere in this commit for metal. running the whisper.swiftui example on macOS, it compiles then crashes when clicking "transcribe" with a console error "validateComputeFunctionArguments:1056: failed assertion `Compute Function(kernel_soft_max_4): missing buffer binding at index 1 for src1[0].'".

same thing works fine with previous commit 3163090.

sorry to not have more info, the metal bits go way over my head and make me so so grateful for these awesome libraries :)

@ggerganov
Copy link
Owner Author

ggerganov commented Dec 8, 2023

@zshannon Should be fixed on master.

By the way, can you explain how you run the whisper.swiftui example?
When I try to run it, I get the following error, and I cannot figure out how to fix it:

image

Edit: nevermind - something was wrong with my Xcode project. I re-cloned the repo from scratch and it works now

@landtanin
Copy link

landtanin commented Dec 12, 2023

Hi @ggerganov , on the latest commit 6335933, I'm still seeing crashes from ggml-metal with the error Compute Function(kernel_soft_max_4): missing buffer binding at index 1 for src1[0].

I naively tried the solution from #1607 but to no avail.

Crashes occur when I run it on an iPhone 13 with the ggml-base model.


To make it work on the same phone, I either

  • switch to the ggml-tiny
  • switch to commit 3163090

Notes: I use a simple wav file with only a few seconds of spoken words. My app code is based on whisper.swiftui

P.S. this can never be said enough, thanks for this amazing project 🙌

@landtanin
Copy link

This is fixed in v1.5.2 released 👍

landtanin pushed a commit to landtanin/whisper.cpp that referenced this pull request Dec 16, 2023
* sync : ggml (new ops, new backend, etc)

* whisper : remove obsolete broadcasting code

* ggml : remove backend self-registers + fix ggml_concat + n_task logic

* metal : fix assert

* metal : print resource path

* whisper : fix bug if metal init fails
landtanin pushed a commit to landtanin/whisper.cpp that referenced this pull request Dec 16, 2023
@AuroraWright
Copy link

AuroraWright commented Dec 18, 2023

This commit seems to break large-v3 CoreML for me.
I reverted 8171e62 7bc4d22 and this one, and using this audio file https://drive.google.com/file/d/1HWS1pExtOR2mYr0q7w_8ZCl69BjlFZad/view?usp=sharing with large-v3 (command line: -t 10 -pp -osrt -l ja output.wav ) it starts repeating "カタカナで裁判官" at 00:09:30.680 and never recovers. I can consistently reproduce it every time I try
Interestingly, the same issue is not occurring on large-v3 without CoreML

@ggerganov
Copy link
Owner Author

@AuroraWright Can you confirm that on latest master using CoreML with large-v3 does not work for you? Does it work if you add the -mc 0 flag?

Does anyone else experience issues on latest master with Metal / CoreML?

@AuroraWright
Copy link

AuroraWright commented Dec 18, 2023

@ggerganov yeah with latest master too, it seems mc = 0 fixes it
actually my bad, even before this commit with CoreML it avoids that specific repetition but then eventually breaks/starts repeating at 00:48:54 (same audio).
I also noticed with large-v2+CoreML and latest master it just prints garbage from 50:37 to 51:05 (eg 00:50:39,430 --> 00:50:40,730 ーーーーーーーーーーーーーーーーーーーー ), and everything is fine without CoreML.

bygreencn added a commit to bygreencn/whisper.cpp that referenced this pull request Dec 20, 2023
* origin/master:
  bench.py : add different large models (ggerganov#1655)
  wchess : update README.md
  release : v1.5.2
  wchess : update readme
  wchess : whisper assisted chess (ggerganov#1595)
  sync : ggml (Metal fixes, new ops, tests) (ggerganov#1633)
  cmake : target windows 8 or above for prefetchVirtualMemory in llama-talk (ggerganov#1617)
  cmake : Fix bug in httplib.h for mingw (ggerganov#1615)
  metal : fix `ggml_metal_log` vargs (ggerganov#1606)
  whisper.objc : disable timestamps for real-time transcription
  whisper : more debug messages + fix fallback logic
  metal : fix soft_max kernel src1 argument (ggerganov#1602)
  sync : ggml (new ops, new backend, etc) (ggerganov#1602)
  server : pass max-len argument to the server (ggerganov#1574)
  ios : Remove `#if arch(arm)` check for using Metal (ggerganov#1561)
  ggml : Fix 32-bit compiler warning (ggerganov#1575)
  ggml : re-enable blas for src0 != F32 (ggerganov#1583)
iThalay pushed a commit to iThalay/whisper.cpp that referenced this pull request Sep 23, 2024
* sync : ggml (new ops, new backend, etc)

* whisper : remove obsolete broadcasting code

* ggml : remove backend self-registers + fix ggml_concat + n_task logic

* metal : fix assert

* metal : print resource path

* whisper : fix bug if metal init fails
iThalay pushed a commit to iThalay/whisper.cpp that referenced this pull request Sep 23, 2024
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.

5 participants