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

feat: implemented sigmoid function #806

Merged
merged 4 commits into from
May 1, 2024

Conversation

justcho5
Copy link
Contributor

@justcho5 justcho5 commented Apr 26, 2024

  • implement sigmoid function in ggml
  • implement metal kernel
  • implement cuda kernel

This is required for encodec.cpp and bark.cpp.

@justcho5 justcho5 marked this pull request as ready for review May 1, 2024 19:22
@justcho5
Copy link
Contributor Author

justcho5 commented May 1, 2024

@slaren Hey my PR is complete. Should I implement tests?

@slaren
Copy link
Collaborator

slaren commented May 1, 2024

In this case since it is implemented as a GGML_OP_UNARY there is already a test, all you have to do to enable it is modify the supports_op function of the backends to return true for GGML_UNARY_OP_SIGMOID. Then you can run test-backend-ops to test the CUDA and Metal implementations.

@justcho5
Copy link
Contributor Author

justcho5 commented May 1, 2024

Thank you! Looks like the operation passed the tests on my machine.

@PABannier
Copy link
Contributor

That's super helpful! Thanks @justcho5 :)
Encodec.cpp will now be able to support the Metal backend :)

@slaren slaren merged commit 8cd3975 into ggerganov:master May 1, 2024
4 checks passed
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.

None yet

3 participants