import s from "../layers/RoPECache.js";
import { s as c, e as i } from "../index-DSGwv2Yx.js";
import { t as p } from "../tensor4d-Dj4rDssL.js";
async function f(r) {
  await c(r);
  const n = p(
    [
      [
        [
          [0.1, 0.2],
          [0.3, 0.4]
        ]
      ]
    ],
    [1, 1, 2, 2]
  ), a = {
    modelType: "GenAI_NanoGPT_v1",
    vocabSize: 20,
    nEmbed: 16,
    nHead: 2,
    nLayer: 1,
    blockSize: 128,
    mlpFactor: 4,
    useRope: !0
  }, e = new s(a);
  e.ensureRopeCache(120);
  const o = i().runKernel(
    "Rope",
    { x: n, sin: e.getSin(), cos: e.getCos() },
    { pastLen: 20 }
  );
  return Array.isArray(o) ? o.map((t) => t.array()) : o.array();
}
export {
  f as execute
};
