pub struct InputTokenCount {
pub text_tokens: u64,
pub media_positions: u64,
pub model_positions: u64,
pub kind: ObservationKind,
/* private fields */
}Expand description
Accounting for a tokenized or backend-prepared input.
Fields§
§text_tokens: u64Ordinary tokenizer IDs present in the input.
media_positions: u64Positions inserted by prepared media.
model_positions: u64Total decoder/model positions consumed by prefill.
kind: ObservationKindSemantics of the model-position count.
Implementations§
Source§impl InputTokenCount
impl InputTokenCount
Sourcepub const fn prepared(
text_tokens: u64,
media_positions: u64,
model_positions: u64,
media_execution_workspace_bytes: u64,
media_execution_workspace_kind: ObservationKind,
) -> Self
pub const fn prepared( text_tokens: u64, media_positions: u64, model_positions: u64, media_execution_workspace_bytes: u64, media_execution_workspace_kind: ObservationKind, ) -> Self
Creates an exact position count for backend-prepared input.
Sourcepub const fn media_execution_workspace_bytes(&self) -> u64
pub const fn media_execution_workspace_bytes(&self) -> u64
Conservative media-tower workspace attributed to this input.
Sourcepub const fn media_execution_workspace_kind(&self) -> ObservationKind
pub const fn media_execution_workspace_kind(&self) -> ObservationKind
Measurement semantics of the media workspace.
Trait Implementations§
Source§impl Clone for InputTokenCount
impl Clone for InputTokenCount
Source§fn clone(&self) -> InputTokenCount
fn clone(&self) -> InputTokenCount
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 InputTokenCount
Source§impl Debug for InputTokenCount
impl Debug for InputTokenCount
Source§impl<'de> Deserialize<'de> for InputTokenCount
impl<'de> Deserialize<'de> for InputTokenCount
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InputTokenCount
Source§impl PartialEq for InputTokenCount
impl PartialEq for InputTokenCount
Source§impl Serialize for InputTokenCount
impl Serialize for InputTokenCount
impl StructuralPartialEq for InputTokenCount
Auto Trait Implementations§
impl Freeze for InputTokenCount
impl RefUnwindSafe for InputTokenCount
impl Send for InputTokenCount
impl Sync for InputTokenCount
impl Unpin for InputTokenCount
impl UnsafeUnpin for InputTokenCount
impl UnwindSafe for InputTokenCount
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