def fprow

bendtorch@1.3.0.0 · main.bend:2457

import bendtorch@1.3.0.0/main.bend as Bendtorch
import Base

2457# row i of a head's P with every key: the scaled scores of query i against keys 0..t-1 (frow), then the softmax over
2458# all t of them (the law full)
2459def fprow(+i: Nat, +m: Nat, +hd: Nat, +sc: F32, +qs: U32, +qc: U32, +ks: U32, +kc: U32, q: Array<F32>, k: Array<F32>, p: Array<F32>) -> PR:
2460  fprow2(sc, (U32.from_nat(i) * U32.from_nat(1n+m) : U32), p, frow(i, m, hd, qs, qc, ks, kc, q, k))

Uses (9)

Used by (3)