pub struct QualityGate {
pub log_prob_threshold: f32,
pub compression_ratio_threshold: f32,
}Expand description
Per-window quality thresholds, mirroring faster-whisper’s log_prob_threshold
and compression_ratio_threshold. Used by the streaming caller to reject a decoded
window before it reaches the LocalAgreement committer — LA-2 only rejects unstable
output, so a confident hallucination loop (the *sigh* *sigh* *sigh* failure mode)
would otherwise commit. The defaults match faster-whisper.
Fields§
§log_prob_threshold: f32Reject the window when avg_logprob of content tokens is below this (default -1.0).
compression_ratio_threshold: f32Reject the window when the gzip compression ratio of its text exceeds this (default 2.4) — high ratios signal a repetition/hallucination loop.
Trait Implementations§
Source§impl Clone for QualityGate
impl Clone for QualityGate
Source§fn clone(&self) -> QualityGate
fn clone(&self) -> QualityGate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for QualityGate
Source§impl Debug for QualityGate
impl Debug for QualityGate
Auto Trait Implementations§
impl Freeze for QualityGate
impl RefUnwindSafe for QualityGate
impl Send for QualityGate
impl Sync for QualityGate
impl Unpin for QualityGate
impl UnsafeUnpin for QualityGate
impl UnwindSafe for QualityGate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more