pub enum GenerationEvent {
Token {
token_id: u32,
is_draft: bool,
},
Burst {
accepted: usize,
total_produced: usize,
},
AdaptiveKChanged {
old_k: usize,
new_k: usize,
acceptance_rate: f32,
},
Metrics(SpeculativeMetrics),
Finished {
total_tokens: usize,
reason: String,
},
}Expand description
Events emitted during the speculative generation stream.
Variants§
Token
A committed token ready for output.
Fields
Burst
Telemetry burst summary for the speculative cycle.
AdaptiveKChanged
Adaptive K changed based on empirical acceptance rate.
Metrics(SpeculativeMetrics)
Updated performance metrics and speedup ratio.
Finished
Generation stream finished.
Trait Implementations§
Source§impl Clone for GenerationEvent
impl Clone for GenerationEvent
Source§fn clone(&self) -> GenerationEvent
fn clone(&self) -> GenerationEvent
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 moreSource§impl Debug for GenerationEvent
impl Debug for GenerationEvent
Source§impl<'de> Deserialize<'de> for GenerationEvent
impl<'de> Deserialize<'de> for GenerationEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GenerationEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GenerationEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenerationEvent
impl PartialEq for GenerationEvent
Source§impl Serialize for GenerationEvent
impl Serialize for GenerationEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GenerationEvent
Auto Trait Implementations§
impl Forget for GenerationEvent
impl Freeze for GenerationEvent
impl Move for GenerationEvent
impl RefUnwindSafe for GenerationEvent
impl Send for GenerationEvent
impl Sync for GenerationEvent
impl Unpin for GenerationEvent
impl UnsafeUnpin for GenerationEvent
impl UnwindSafe for GenerationEvent
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