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

[Model Support] Add support for wav2vec #303

Merged
merged 2 commits into from Jul 5, 2023

Conversation

yaoyaoding
Copy link
Member

Major:

  1. Enhance the hidet dynamo backend to support the pytorch model that used weight_norm.
  2. Add resolve rule for conv1d.

The example code that use hidet could be found at https://github.com/egorsmkv/wav2vec2-hidet.

Currently, hidet is still slower than pytorch (hidet 30ms vs. pytorch 25ms on RTX 4090). Will optimize these models when we have more hands.

@yaoyaoding yaoyaoding merged commit 6ebb6ec into hidet-org:main Jul 5, 2023
2 checks passed
@yaoyaoding yaoyaoding deleted the wav2vec branch July 5, 2023 17:28
@egorsmkv
Copy link

Nice, thanks

@egorsmkv
Copy link

egorsmkv commented Oct 4, 2023

@yaoyaoding
Copy link
Member Author

Hi @Aalanli, could you take a look at this? Thanks!

@egorsmkv
Copy link

Hello! Any update on it? @Aalanli

@egorsmkv
Copy link

Just tried hidet with wav2vec2-bert model recently released. Also I have some problems.

I made a colab to share what's going wrong: https://colab.research.google.com/drive/1qsw0Tu9ENS_q3ao0YUbh4CDTyWqUxLWq?usp=sharing

In short:

BackendCompilerFailed: backend='hidet' raised:
NotImplementedError: The following modules/functions are not supported by hidet yet:
  torch.rand
  torch.nn.GLU
  torch.softmax

@Aalanli
Copy link
Collaborator

Aalanli commented Jan 26, 2024

Hi @egorsmkv, sorry for the long delay. It turns out that implementing rand would require some invasive changes to the runtime, which we held off doing until our AMD support is ready.
As a potential work-around, one can pass any random state as an input to the model, kind of like what is done in Jax.
The other functions should be a quick fix.

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