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

How to add hot words in whisper prompt #597

Open
taorui-plus opened this issue May 26, 2024 · 1 comment
Open

How to add hot words in whisper prompt #597

taorui-plus opened this issue May 26, 2024 · 1 comment

Comments

@taorui-plus
Copy link

I completed the concurrency test based on tensor RT + triton server deployment, and the concurrency was about doubled compared to faster-whisper.

I am testing its accuracy, but the Chinese transcription always shows 繁体字. I want to solve this problem by adding hot words in the prompt, but I encounter some problems.

I tried both of these methods with no success:
<|startofpref|>{prompt}<|startoftranscript|><|zh|><|transcribe|><|notimestamps|>
<|startoftranscript|><|zh|><|transcribe|><|notimestamps|>{prompt}<|endoftext|>

Here is some information I referenced:

  1. The whisper documentation only gives this way of writing:
    <|startoftranscript|> <|en|> <|transcribe|> <|notimestamps|>

  2. The readme document of triton/whisper shows:
    image

@taorui-plus
Copy link
Author

@yuekaizhang

I found the difference between faster-whisper and triton whisper prompts is:
faster-whisper:<|transcribe|>{prompt_text}<|startoftranscript|><|startofprev|><|startoflm|>
Triton whisper: <|startoftranscript|> <|{language}|> <|transcribe|> <|notimestamps|>
faster-whisper uses <|startofprev|><|startoflm|> token instead of <|notimestamps|> token,
This openAI discussion explains that <|startoflm|> token is not used in openAI's API.
Therefore, triton whisper is the same as openAI's API,This solution also has better recognition performance.

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

1 participant