Bendtorch.prow: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 2426-2430 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=2426&end_line=2430 import Base # row i of a head's P (t x t, row-major, created zeros): the scaled scores of query i against keys 0..i (qrow) written # from the row's start, then the softmax over as many positions as were written: i + 1 (the law causal). The positions # after i are never written and keep their zeros. def prow(+i: Nat, +t: Nat, +hd: Nat, +sc: F32, +qs: U32, +qc: U32, +ks: U32, +kc: U32, q: Array, k: Array, p: Array) -> PR: prow2(sc, (U32.from_nat(i) * U32.from_nat(t) : U32), p, qrow(i, hd, qs, qc, ks, kc, q, k)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=PR https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=prow2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=qrow