Skip to content

Reject beam search options up front instead of inconsistently - #20

Merged
CodeWithBehnam merged 1 commit into
mainfrom
claude/lucid-franklin-gsu7v4
Sep 30, 2026
Merged

CodeWithBehnam merged 1 commit into
mainfrom
claude/lucid-franklin-gsu7v4

Conversation

@CodeWithBehnam

Copy link
Copy Markdown
Owner

What does this PR do?

Closes #10.

Beam search isn't implemented, but beam_size and patience behaved differently depending on the path:

  • With batch_size=1, beam_size raised NotImplementedError from deep inside decoding, and patience alone raised "patience requires beam_size".
  • With batching, both were silently dropped.
  • The LightningWhisperMLX docstring listed them as supported.
  • The CLI exposed --patience, which always failed because there's no --beam-size.

Now:

  • transcribe() raises NotImplementedError for either option before loading the model, in both paths.
  • The transcribe() and LightningWhisperMLX docstrings say what is and isn't supported, including that best_of and hallucination_silence_threshold only apply with batch_size=1.
  • --patience is removed from the CLI.

How was this tested?

  • Tested with audio file(s)
  • Ran existing tests (pytest): 80 passed, 1 skipped
  • Tested CLI (vayu audio.mp3)

tests/test_beam_search.py: both options are rejected at batch sizes 1 and 4, unset (None) values still work, the wrapper rejects beam_size, and the CLI no longer accepts --patience. Six fail on main.

claude-review will fail as on #12 (the repository's CLAUDE_CODE_OAUTH_TOKEN secret, see this comment).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TMXYMqgLAykqRApmbRfpTA


Generated by Claude Code

Beam search is not implemented, but beam_size and patience behaved
differently depending on the path: with batch_size=1, beam_size raised
NotImplementedError from deep inside decoding and patience alone raised
"patience requires beam_size"; with batching both were silently dropped.
The LightningWhisperMLX docstring listed them as supported, and the CLI
exposed --patience, which always failed because there is no --beam-size.

transcribe() now raises NotImplementedError for either option before
loading the model, the docstrings say what is and isn't supported, and
--patience is removed from the CLI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TMXYMqgLAykqRApmbRfpTA
@CodeWithBehnam
CodeWithBehnam merged commit 1489a03 into main Sep 30, 2026
3 of 4 checks passed
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.

beam_size / patience are documented but not supported

2 participants