pub struct BackboneModel {
pub seed: Option<u32>,
/* private fields */
}Expand description
NeuTTS backbone — RLX Llama-3.2 runner over a llama-tagged GGUF.
Fields§
§seed: Option<u32>Implementations§
Source§impl BackboneModel
impl BackboneModel
pub fn load(path: &Path, n_ctx: u32) -> Result<BackboneModel, Error>
Sourcepub fn load_on(
path: &Path,
n_ctx: u32,
device: Device,
) -> Result<BackboneModel, Error>
pub fn load_on( path: &Path, n_ctx: u32, device: Device, ) -> Result<BackboneModel, Error>
Load the GGUF backbone on a specific execution device.
Sourcepub fn load_greedy_parity(
path: &Path,
n_ctx: u32,
) -> Result<BackboneModel, Error>
pub fn load_greedy_parity( path: &Path, n_ctx: u32, ) -> Result<BackboneModel, Error>
F32 dequant + incremental greedy (tail parity vs llama-cpp Q4).
Sourcepub fn load_greedy_parity_on(
path: &Path,
n_ctx: u32,
device: Device,
) -> Result<BackboneModel, Error>
pub fn load_greedy_parity_on( path: &Path, n_ctx: u32, device: Device, ) -> Result<BackboneModel, Error>
Greedy parity load on a specific execution device.
pub fn generate( &self, prompt: &str, max_new_tokens: u32, ) -> Result<String, Error>
pub fn generate_streaming<F>( &self, prompt: &str, max_new_tokens: u32, on_piece: F, ) -> Result<(), Error>
Sourcepub fn generate_greedy_ids(
&self,
prompt: &str,
max_new_tokens: u32,
) -> Result<Vec<u32>, Error>
pub fn generate_greedy_ids( &self, prompt: &str, max_new_tokens: u32, ) -> Result<Vec<u32>, Error>
Greedy token IDs for parity tests (same GGUF vocab as production).
Sourcepub fn generate_greedy_ids_from_prompt(
&self,
prompt_ids: &[u32],
max_new_tokens: u32,
) -> Result<Vec<u32>, Error>
pub fn generate_greedy_ids_from_prompt( &self, prompt_ids: &[u32], max_new_tokens: u32, ) -> Result<Vec<u32>, Error>
Greedy continuation for parity tests.
[load_greedy_parity] uses KV-cached Llama32Runner::generate (F32 weights,
MSVC uses oneshot decode in step_cached). Production [load] uses packed Q4.
Debug: NEUTTS_GREEDY_INCREMENTAL=1 or NEUTTS_GREEDY_PREDICT_LOGITS=1.
Auto Trait Implementations§
impl !Freeze for BackboneModel
impl RefUnwindSafe for BackboneModel
impl Send for BackboneModel
impl Sync for BackboneModel
impl Unpin for BackboneModel
impl UnsafeUnpin for BackboneModel
impl UnwindSafe for BackboneModel
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