Bendtorch.af2_full: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 2989-2992 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=2989&end_line=2992 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def af2_full(-n: Nat, +w: Nat, +b: Nat, +kv: Nat, +dm: Dm, s: FL) -> Fwd, AttnS>: match dm s: case Dm{+t, +g, +hd, +gw, +kw, +sc} FL{q, k, v, xs}: Fwd{Unit{}, TA.Mat{blocks_in(b, 0n, t, gw, w, kv, UO{fgo_full(attn_tree(Nat.mul(b, kv), t, gw), Nat.mul(b, kv), g, dm, List.reverse(&1, FS, xs)), zeros_a(Nat.mul(Nat.mul(b, t), w))})}, AttnS{q, k, v}} Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=AttnS 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=FL 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=Fwd https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=UO https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=attn_tree https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=blocks_in https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=fgo_full https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=zeros_a