Bendtorch.attn_bwd: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/main.bend as Bendtorch Lines 3009-3012 of bendtorch@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/main.bend&start_line=3009&end_line=3012 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA def attn_bwd(+n: Nat, +w: Nat, +kvw: Nat, +dm: AttnDims, s: AttnS, dy: TA.Mat) -> Bwd, Two, TA.Mat>>>: match dm s dy: case AttnDims{+b, +t, +kv, +g, +hd, +sc} AttnS{q, k, v} TA.Mat{d}: ab2(n, w, kvw, b, kv, dm_of(dm), bslices(b, 0n, t, w, kvw, kv, g, hd, BL{q, k, v, d, Nil{}})) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=AttnDims 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=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=Two https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=ab2 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=bslices https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=dm_of