mlx-bun library API
    Preparing search index...

    Hierarchy

    • Attention
      • FullAttention
    Index
    hasKv: boolean
    headDim: number
    isSliding: boolean
    kNorm: RMSNorm | null
    kProj: QuantizedLinear | null
    nHeads: number
    nKvHeads: number
    qNorm: RMSNorm
    reads: Gemma4ReadStrategy = gemma4CacheRead

    How a donor layer reads its cache (the cache's own read).

    ropeBase: number | null
    ropeFreqs: MlxArray | null
    useKEqV: boolean
    vNorm: RMSNorm | null
    vProj: QuantizedLinear | null
    windowSize: number
    • x [B, L, hidden] (borrowed) to an owned [B, L, hidden]. A donor layer appends its keys and values to cache through the read phase names and returns that read (donor, owned by the caller, who keeps it for the layers that share it); a KV-sharing layer attends donor, the read its donor layer made in this forward, and returns null.

      Parameters

      • x: MlxArray
      • cache: Cache | null
      • phase: Gemma4Phase
      • _donor: DonorRead | null

      Returns { donor: DonorRead; out: MlxArray }