def probs

bendtorch@1.3.0.0 · main.bend:2441

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

2441# P of one head: queries in q (row stride qs, columns from qc), keys in k (row stride ks, columns from kc)
2442def probs(+t: Nat, +hd: Nat, +sc: F32, +qs: U32, +qc: U32, +ks: U32, +kc: U32, q: Array<F32>, k: Array<F32>) -> QK:
2443  prows(Nat.sub(t, 1n), 0n, t, hd, sc, qs, qc, ks, kc, prow(0n, t, hd, sc, qs, qc, ks, kc, q, k, zeros_a(Nat.mul(t, t))))

Uses (10)

Used by (2)