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

Add ctranslate2 whisper models #10

Merged
merged 14 commits into from
Sep 11, 2023

Conversation

chainyo
Copy link
Contributor

@chainyo chainyo commented Sep 8, 2023

This PR:

  • Adds ctranslate2 backend with all the whisper models
  • Update README with hub login step
  • Change use_auth_token to token to avoid the warning
  • Normalize all rtf computation file names to calc_rtf.py

I put the DEVICE_INDEX as a variable to quickly change it in the shell file for ctranslate2 because I had only the device 0 available.

Also, the batch feature is currently in beta testing for faster-whisper, so the batch is set to 1, but it could be improved soon.

I tested the run_eval.py script on my side:
CleanShot 2023-09-08 at 11 26 09@2x

Fixes #9

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

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

Once you make the changes, I can merge and run the evals 🍾

README.md Show resolved Hide resolved
compute_type="float16",
)

for i in range(3):
Copy link
Member

Choose a reason for hiding this comment

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

What's the outer loop for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. I just copied and pasted this part from the transformers folder example. 🤗

Copy link
Member

Choose a reason for hiding this comment

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

Ah! Okay, I'll sync and fix this offline.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The outer loop is to compute the average of 3 runs for RTF

ctranslate2/run_whisper.sh Outdated Show resolved Hide resolved
normalizer/data_utils.py Show resolved Hide resolved
chainyo added 2 commits September 11, 2023 11:50
Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

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

Dope! Thanks @chainyo

compute_type="float16",
)

for i in range(3):
Copy link
Member

Choose a reason for hiding this comment

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

Ah! Okay, I'll sync and fix this offline.

@Vaibhavs10 Vaibhavs10 merged commit 9a596ac into huggingface:main Sep 11, 2023
@chainyo chainyo deleted the add-ctranslate2-whisper-models branch September 11, 2023 10:43
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.

Adding ctranslate2 whisper models
3 participants