pub fn forward_token_graph(
model: &Arc<CmfModel>,
kv_id: u64,
layers: &[GraphLayer<'_>],
invf: &[f32],
h: &mut [f32],
nh: usize,
nkv: usize,
hd: usize,
rd: usize,
hidden: usize,
inter: usize,
position: usize,
cap: usize,
gemma: bool,
eps: f32,
lm_head: Option<(&GraphW<'_>, usize)>,
final_norm: &[f32],
logits: &mut Vec<f32>,
loop_norm_at: &[usize],
) -> boolExpand description
Whole-token decode graph on wgpu: the entire layer stack in ONE submit,
hidden resident, one readback. Updates h in place. false = refusal.
loop_norm_at: virtual layer indices after which final_norm is applied
(Looped Transformer mid-stack norm). Empty for standard models.