Skip to main content

forward

Function forward 

Source
pub fn forward(
    token_id: u32,
    pos: usize,
    graph: &Graph,
    weights: &ModelWeights,
    cache: &mut KVCache,
) -> Vec<f32>
Expand description

Run a single forward pass for one token through the model.

Returns logits of shape [vocab_size].