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

[WIP] Add Moonshine #34784

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

[WIP] Add Moonshine #34784

wants to merge 34 commits into from

Conversation

eustlb
Copy link
Contributor

@eustlb eustlb commented Nov 18, 2024

What does this PR do?

This PR adds support for Moonshine to the Transformers library.

Moonshine builds on top of Whisper’s architecture to overcome some of its limitations, primarily the restriction to a fixed 30-second audio window.

Key improvements in Moonshine’s architecture:
1. It uses SwiGLU activation instead of GELU in the decoder layers.
2. Most importantly, it replaces absolute position embeddings with Rotary Position Embeddings (RoPE), enabling Moonshine to process audio inputs of any length—unlike Whisper, which is limited to fixed 30-second windows.

Who can review?

@ArthurZucker

TODO

  • update UsefulSensors model repos
  • change model id occurrences in modular_moonshine.py
  • run benchmarks

@eustlb eustlb changed the title Add Moonshine [WIP] Add Moonshine Nov 18, 2024
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@xenova xenova left a comment

Choose a reason for hiding this comment

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

(just some notes in the meantime).

@Reza2kn
Copy link

Reza2kn commented Dec 19, 2024

Hey @eustlb, awesome implementation! 🔥
Although, I think you meant to link to Moonshine instead of the current link pointing to Moonshine.

@eustlb
Copy link
Contributor Author

eustlb commented Dec 19, 2024

Indeed 😅 corrected, thanks !!

Comment on lines +17 to +18
# moonshine

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# moonshine

duplicate?

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.

4 participants