pub struct StageWireMessage {
pub kind: WireMessageKind,
pub pos_start: i32,
pub token_count: i32,
pub state: StageStateHeader,
pub request_id: u64,
pub session_id: u64,
pub sampling: Option<StageSamplingConfig>,
pub chat_sampling_metadata: Option<String>,
pub tokens: Vec<i32>,
pub positions: Vec<i32>,
pub activation: Vec<u8>,
pub raw_bytes: Vec<u8>,
}Fields§
§kind: WireMessageKind§pos_start: i32§token_count: i32§state: StageStateHeader§request_id: u64§session_id: u64§sampling: Option<StageSamplingConfig>§chat_sampling_metadata: Option<String>§tokens: Vec<i32>§positions: Vec<i32>§activation: Vec<u8>§raw_bytes: Vec<u8>Implementations§
Source§impl StageWireMessage
impl StageWireMessage
The committed session position that must exist before this message runs.
Stage-state v11 makes this absolute position authoritative: a worker whose speculative KV is ahead must rewind locally before executing the message.
pub fn verify_window_id(&self) -> Option<i32>
pub fn verify_window_base_position(&self) -> Option<i32>
pub fn verify_window_token_count(&self) -> Option<i32>
pub fn estimated_wire_bytes(&self) -> usize
pub fn request_epoch(&self) -> StageRequestEpoch
pub fn stop(dtype: WireActivationDType) -> Self
pub fn stop_with_identity( dtype: WireActivationDType, request_id: u64, session_id: u64, ) -> Self
pub fn configure_generation( dtype: WireActivationDType, request_id: u64, session_id: u64, prompt_token_count: i32, sampling: Option<StageSamplingConfig>, chat_sampling_metadata: Option<String>, ) -> Self
pub fn activation_f32_payload(&self, n_embd: i32) -> Result<Vec<u8>>
pub fn take_activation_f32_payload(&mut self, n_embd: i32) -> Result<Vec<u8>>
Trait Implementations§
Source§impl Clone for StageWireMessage
impl Clone for StageWireMessage
Source§fn clone(&self) -> StageWireMessage
fn clone(&self) -> StageWireMessage
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 StageWireMessage
impl Debug for StageWireMessage
Source§impl PartialEq for StageWireMessage
impl PartialEq for StageWireMessage
impl StructuralPartialEq for StageWireMessage
Auto Trait Implementations§
impl Freeze for StageWireMessage
impl RefUnwindSafe for StageWireMessage
impl Send for StageWireMessage
impl Sync for StageWireMessage
impl Unpin for StageWireMessage
impl UnsafeUnpin for StageWireMessage
impl UnwindSafe for StageWireMessage
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