def head_sr
import bend-ml-llama@0.2.1.0/main.bend as BendMlLlamaimport Base
780def head_sr(+hd: Nat, +t: Nat, +scale: F32, v: Array<F32>, sr: SR) -> HO:
781 match sr:
782 case SR{k, s}:
783 head_wr(k, weighted(hd, t, v, list.softmax(list.scale(scale, s))))