pub struct InferenceConfig {
pub max_inference_tokens: Option<usize>,
pub use_input_token_fallback: bool,
}Expand description
Controls deterministic inference behavior for the lightweight transition
engine (MultiscreenEngine).
This is distinct from ModelInferenceConfig
which controls the neural MultiscreenModel inference path.
Fields§
§max_inference_tokens: Option<usize>Maximum number of output tokens to produce. None means output length
equals input length.
use_input_token_fallback: boolWhen true and no trained transition exists for a token, fall back to
echoing the input token.
Implementations§
Trait Implementations§
Source§impl Clone for InferenceConfig
impl Clone for InferenceConfig
Source§fn clone(&self) -> InferenceConfig
fn clone(&self) -> InferenceConfig
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 InferenceConfig
impl Debug for InferenceConfig
Source§impl Default for InferenceConfig
impl Default for InferenceConfig
Source§impl<'de> Deserialize<'de> for InferenceConfig
impl<'de> Deserialize<'de> for InferenceConfig
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
Source§impl PartialEq for InferenceConfig
impl PartialEq for InferenceConfig
Source§fn eq(&self, other: &InferenceConfig) -> bool
fn eq(&self, other: &InferenceConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InferenceConfig
impl Serialize for InferenceConfig
impl Eq for InferenceConfig
impl StructuralPartialEq for InferenceConfig
Auto Trait Implementations§
impl Freeze for InferenceConfig
impl RefUnwindSafe for InferenceConfig
impl Send for InferenceConfig
impl Sync for InferenceConfig
impl Unpin for InferenceConfig
impl UnsafeUnpin for InferenceConfig
impl UnwindSafe for InferenceConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.