pub struct NullEngine {
pub eos: Token,
pub vocab: usize,
}Expand description
A trivial engine that emits EOS immediately after prefill. Lets you exercise the full session lifecycle without the Candle adapter (ADR-002 is the real engine). Not for production inference.
Fields§
§eos: Token§vocab: usizeImplementations§
Trait Implementations§
Source§impl InferenceEngine for NullEngine
impl InferenceEngine for NullEngine
Source§fn rollback(&mut self, _keep_committed: u32) -> Result<()>
fn rollback(&mut self, _keep_committed: u32) -> Result<()>
Stateless: next_logits ignores committed, so there is nothing to undo.
Source§fn prefill(&mut self, tokens: &[Token]) -> Result<u32>
fn prefill(&mut self, tokens: &[Token]) -> Result<u32>
Encode the (compressed) prompt; returns the resulting KV length.
Auto Trait Implementations§
impl Freeze for NullEngine
impl RefUnwindSafe for NullEngine
impl Send for NullEngine
impl Sync for NullEngine
impl Unpin for NullEngine
impl UnsafeUnpin for NullEngine
impl UnwindSafe for NullEngine
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