pub struct SecDecodingSteerer { /* private fields */ }Expand description
SafetyMode::SecDecoding — base-vs-safety-model logit steering.
FOLLOW-UP (ADR-005): requires two ~1B models run on Candle. Until model assets are wired, this returns no adjustment and reports its intended mode, so callers can select it without it silently mis-steering.
Implementations§
Source§impl SecDecodingSteerer
impl SecDecodingSteerer
pub fn placeholder() -> Self
Trait Implementations§
Source§impl SafetySteerer for SecDecodingSteerer
impl SafetySteerer for SecDecodingSteerer
fn adjust(&self, _recent: &[Token]) -> LogitAdjustment
fn mode(&self) -> SafetyMode
Source§fn adjust_with_logits(
&self,
recent_tokens: &[Token],
_base_logits: &[i32],
) -> LogitAdjustment
fn adjust_with_logits( &self, recent_tokens: &[Token], _base_logits: &[i32], ) -> LogitAdjustment
Logit-aware steering (ADR-013). Given the base model’s next-token logits
for this step, return the adjustment to apply (still after the grammar
mask, before sampling — the ADR-005 order is unchanged). Read more
Auto Trait Implementations§
impl Freeze for SecDecodingSteerer
impl RefUnwindSafe for SecDecodingSteerer
impl Send for SecDecodingSteerer
impl Sync for SecDecodingSteerer
impl Unpin for SecDecodingSteerer
impl UnsafeUnpin for SecDecodingSteerer
impl UnwindSafe for SecDecodingSteerer
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