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

Wav2Vec2 #278

Open
ChrisBeeson opened this issue Aug 27, 2022 · 3 comments
Open

Wav2Vec2 #278

ChrisBeeson opened this issue Aug 27, 2022 · 3 comments

Comments

@ChrisBeeson
Copy link

How tricky would it be to implement Wav2Vec2?

@guillaume-be
Copy link
Owner

Hello @ChrisBeeson ,

The transformer model itself is probably rather straightforward to implement as it seems to use standard Torch operations throughout that are supported in tch-rs.

The tricky part is the pre-processing and tokenization process for the model that would differ significantly from the existing tokenizer, since the input would be an audio file. One would need to identify an alternative in Rust to load audio files, build a sampling, tensor conversion and padding module and the associated tokenizer, which would represent a significant amount of work.

I would welcome a pull request for this feature, but this would probably meaning getting started with a pre-processing/tokenization implementation, either directly in https://github.com/guillaume-be/rust-tokenizers or as in a separate crate/dependency.

@ChrisBeeson
Copy link
Author

ChrisBeeson commented Sep 12, 2022

Hi @guillaume-be,

Thanks for your thoughts on this.

Would porting the hugging face tokenizer and the feature extractor be a good starting point?

@j4qfrost
Copy link

I've started some work here guillaume-be/rust-tokenizers#90

Can I get some input?

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

No branches or pull requests

3 participants