def pre_of

bend-ml-llama@0.2.1.0 · main.bend:1049

import bend-ml-llama@0.2.1.0/main.bend as BendMlLlama
import Base
import bend-ml-tensor-array@0.1.19.0/main.bend as TA

1049# a prompt position, whose logits nobody reads: the layers and the caches as forward_gen gives them, without the final
1050# norm and the product by the embedding (vocab x dim, the largest of a position), so lg and nf are empty
1051def pre_of(-c: Cfg, -cap: Nat, -t: Nat, +d: Nat, emb: TA.Bands<Cfg.vocab(c), Cfg.dim(c)>, +lnf: List<&2, F32>, r: Run<c, cap, t>) -> Out<c, cap, t>:
1052  match r:
1053    case Run{x, ls, cs, acts}:
1054      Out{Nil{}, Nil{}, acts, cs, Model{d, emb, ls, lnf}}

Uses (10)

Used by (1)