Tracked under #6.
Scope
Today the sampling strategy is set at Params::new(SamplingStrategy::BeamSearch { beam_size, patience }) or Greedy { best_of } time. Direct access to whisper_full_params::beam_search.beam_size / patience and greedy.best_of post-construction isn't exposed.
Symbols
whisper_full_params::beam_search.beam_size, beam_search.patience.
whisper_full_params::greedy.best_of.
Why deferred
The current API channels everything through SamplingStrategy at construction, which is the idiomatic Rust shape (an enum with associated data) and matches how the wrapper validates the values (clamps beam_size / best_of to [1, MAX_BEAM_SIZE]). Direct field setters bypass that validation channel and create a "what gets validated where" question.
If a caller needs to mutate the strategy mid-config (e.g. retry with reduced beam size on failure), the cleanest answer is to call Params::new again rather than mutate fields.
Acceptance
Open design questions:
- Mutable setters that re-run the same clamping logic as
Params::new? (set_beam_size, set_patience, set_best_of).
- A single
set_strategy(SamplingStrategy) that re-applies the construction-time setup? (More ergonomic, less granular.)
- Just leave it — recommend reconstruction.
Smallest scope. Likely a quick PR if a caller materialises with a real need.
If you're hitting this, drop a comment with the scenario.
Tracked under #6.
Scope
Today the sampling strategy is set at
Params::new(SamplingStrategy::BeamSearch { beam_size, patience })orGreedy { best_of }time. Direct access towhisper_full_params::beam_search.beam_size/patienceandgreedy.best_ofpost-construction isn't exposed.Symbols
whisper_full_params::beam_search.beam_size,beam_search.patience.whisper_full_params::greedy.best_of.Why deferred
The current API channels everything through
SamplingStrategyat construction, which is the idiomatic Rust shape (an enum with associated data) and matches how the wrapper validates the values (clampsbeam_size/best_ofto[1, MAX_BEAM_SIZE]). Direct field setters bypass that validation channel and create a "what gets validated where" question.If a caller needs to mutate the strategy mid-config (e.g. retry with reduced beam size on failure), the cleanest answer is to call
Params::newagain rather than mutate fields.Acceptance
Open design questions:
Params::new? (set_beam_size,set_patience,set_best_of).set_strategy(SamplingStrategy)that re-applies the construction-time setup? (More ergonomic, less granular.)Smallest scope. Likely a quick PR if a caller materialises with a real need.
If you're hitting this, drop a comment with the scenario.