Bendtorch.ab2: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 3004-3007 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=3004&end_line=3007 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def ab2(+n: Nat, +w: Nat, +kvw: Nat, +b: Nat, +kv: Nat, +dm: Dm, s: BL) -> Bwd, Two, TA.Mat>>>: match dm s: case Dm{+t, +g, +hd, +gw, +kw, +sc} BL{q, k, v, d, xs}: ab3(n, w, kvw, dblocks_in(b, 0n, t, gw, hd, w, kvw, kv, UD{bgo(attn_tree(Nat.mul(b, kv), t, gw), Nat.mul(b, kv), 1n, dm, List.reverse(&1, BG, xs)), D3{zeros_a(Nat.mul(n, w)), zeros_a(Nat.mul(n, kvw)), zeros_a(Nat.mul(n, kvw))}})) Uses (17): 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=BG https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=BL https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Bwd https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=D3 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=Two https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=UD https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ab3 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=bgo https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=dblocks_in https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=zeros_a