pub struct FakePrimitives {
pub cfg: FakeConfig,
pub feeds: Vec<(usize, bool)>,
pub beside: Vec<u64>,
pub synced: Option<bool>,
/* private fields */
}Fields§
§cfg: FakeConfig§feeds: Vec<(usize, bool)>§beside: Vec<u64>For every step, the cells the pool held for sequences the step did not feed: what a runtime that attends over its whole pool (llama.cpp’s unified cache) pays for on each one.
synced: Option<bool>What the executor last asked of sync_steps.
Implementations§
Source§impl FakePrimitives
impl FakePrimitives
pub fn new(cfg: FakeConfig) -> FakePrimitives
pub fn token_for(&self, content: &[u32]) -> u32
pub fn row_for(&self, content: &[u32]) -> Vec<f32>
pub fn contents(&self, seq: Seq) -> Option<&[u32]>
pub fn script(&mut self, seq: Seq, tokens: Vec<u32>)
pub fn fault_next_step(&mut self, code: u32)
pub fn fail_next_step(&mut self, e: PrimError)
pub fn poison_next_import(&mut self)
Trait Implementations§
Source§impl Default for FakePrimitives
impl Default for FakePrimitives
Source§impl RuntimePrimitives for FakePrimitives
impl RuntimePrimitives for FakePrimitives
Source§fn sync_steps(&mut self, on: bool)
fn sync_steps(&mut self, on: bool)
Whether a step that reads no row is done when it returns, rather than queued.
fn describe(&self) -> RuntimeDescriptor
fn is_eos(&self, token: u32) -> bool
fn mem_counters(&self) -> MemCounters
fn seq_create(&mut self) -> Result<Seq, PrimError>
fn seq_free(&mut self, seq: Seq)
fn seq_len(&self, seq: Seq) -> u64
fn cells_released(&self, seqs: &[Seq]) -> u64
fn seq_copy(&mut self, src: Seq, dst: Seq, len: u64) -> Result<(), PrimError>
fn seq_truncate(&mut self, seq: Seq, new_len: u64) -> Result<(), PrimError>
fn seq_boundary(&self, seq: Seq, cap: u64) -> u64
fn seq_export( &mut self, seq: Seq, len: u64, enc: u8, ) -> Result<Vec<u8>, PrimError>
fn seq_import(&mut self, seq: Seq, payload: &[u8]) -> Result<u64, PrimError>
fn step(&mut self, feeds: &[Feed<'_>]) -> Result<Vec<Vec<f32>>, PrimError>
Source§fn step_rows(
&mut self,
feeds: &[Feed<'_>],
) -> Result<Option<Vec<Vec<Vec<f32>>>>, PrimError>
fn step_rows( &mut self, feeds: &[Feed<'_>], ) -> Result<Option<Vec<Vec<Vec<f32>>>>, PrimError>
step, answering for each feed that wants rows a row after every
one of its tokens (in order), not only its last. Ok(None): not
served, and nothing moved.fn step_sampled( &mut self, feeds: &[Feed<'_>], specs: &[SampleSpec], ) -> Result<Option<Vec<u32>>, PrimError>
fn vocabulary(&self) -> Option<Vocabulary>
fn shed(&mut self, _bytes_target: u64) -> u64
Auto Trait Implementations§
impl Freeze for FakePrimitives
impl RefUnwindSafe for FakePrimitives
impl Send for FakePrimitives
impl Sync for FakePrimitives
impl Unpin for FakePrimitives
impl UnsafeUnpin for FakePrimitives
impl UnwindSafe for FakePrimitives
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more