pub struct GenerationPlan {
pub sampling: SamplingPlan,
pub max_tokens: u32,
pub biases: Vec<LogitBias>,
pub grammar: Option<Grammar>,
pub stops: Vec<Vec<u8>>,
}Expand description
Complete bounded generation mechanics independent of prompt semantics.
Fields§
§sampling: SamplingPlanNative sampler configuration.
max_tokens: u32Maximum causally admitted output tokens.
biases: Vec<LogitBias>Additive biases with unique token IDs, applied after Rust transforms and before filters.
grammar: Option<Grammar>Optional eager grammar.
stops: Vec<Vec<u8>>Exact byte suffixes that stop after causal admission.
Matching bytes remain in output and causal state. When several suffixes match the same output, the lowest declared index wins.
Implementations§
Trait Implementations§
Source§impl Clone for GenerationPlan
impl Clone for GenerationPlan
Source§fn clone(&self) -> GenerationPlan
fn clone(&self) -> GenerationPlan
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 GenerationPlan
impl Debug for GenerationPlan
Source§impl<'de> Deserialize<'de> for GenerationPlan
impl<'de> Deserialize<'de> for GenerationPlan
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GenerationPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GenerationPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenerationPlan
impl PartialEq for GenerationPlan
Source§impl Serialize for GenerationPlan
impl Serialize for GenerationPlan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GenerationPlan
Auto Trait Implementations§
impl Freeze for GenerationPlan
impl RefUnwindSafe for GenerationPlan
impl Send for GenerationPlan
impl Sync for GenerationPlan
impl Unpin for GenerationPlan
impl UnsafeUnpin for GenerationPlan
impl UnwindSafe for GenerationPlan
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