Bendtorch.head_fwd: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 2571-2576 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=2571&end_line=2576 import Base # one head's forward pass at the columns hc (its queries) and kc (its key/value head) that head_cols gives; it has no # head index, so it reads no other columns def head_fwd(+dm: Dm, +cols: HC, s: FS) -> FS: match dm cols s: case Dm{+t, +g, +hd, +w, +kvw, +sc} HC{+hc, +kc} FS{q, k, v, o}: head_f2(t, hd, w, kvw, hc, kc, v, o, probs(t, hd, sc, U32.from_nat(w), hc, U32.from_nat(kvw), kc, q, k)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Dm https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=FS https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=HC https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=head_f2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=probs