why whisper max_length set to total_max_length / 2 when prompt is short?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 536
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 4
Description
I found that when using Whisper, if I set total_max_length to 448 and the prompt length is 4, the max_length is only 224.
This might be due to the following code in whisper.cc :
decoding_options.max_length = std::min(total_max_length / 2, total_max_length - start_step);
I would like to ask why it is set to total_max_length / 2 instead of total_max_length - start_step ?
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in whisper.cc at the decoding_options.max_length assignment and trace how total_max_length, start_step, and the prompt length are computed. Determine whether the total_max_length / 2 cap is intentional for Whisper decoding; done means the rationale is established and any necessary behavior change is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100