mlx-bun library API
    Preparing search index...

    The 4-bit group-64 full-attention lego of the Qwen3.8-27B Trellis M4 Pro and M1 Max compositions, bf16 first: Bf16FirstQuantizedKVCache whose quantized storage reads with Kv4Head256Cache's kernels, the decode kernel at the composition's decodeBlock. The first append is bf16, as the old graph's conversion after the first forward kept it; every later decode reads with the fused one-row KV4 kernel and every window with the folded-GQA kernel, the cores the old graph injected for one sequence. Its storage carries the KV4 set into the row layouts it joins, which read with the KV4 kernels while they hold one unpadded row and with plain's affine kernels when they hold more (AffineKernels.multiRow), as the old graph read several sequences through the generic path.

    Hierarchy (View Summary)

    Index
    bits: number
    composed: ComposedStorage = ...

    The storage the row layouts, clones and saved files take (see the class).

    decodeBlock: number = KV4_DECODE_BLOCK
    groupSize: number
    kernelSet: AffineKernelSet

    The affine kernel set the converted storage attends with, named by the composition (composedAffineKernels, or the KV4 set).

    masks: AttentionMasks = ...

    The per-forward masks of the model this cache belongs to.

    start: number

    Positions held in bf16 before the conversion; 0 converts after the first append.

    • get minimumReusableOffset(): number | undefined

      Earliest prefix whose retained representation can resume generation. Irreversible transitions may preserve bytes while invalidating older precision boundaries. Reuse policy must not trim below this offset.

      Returns number | undefined

    • set minimumReusableOffset(value: number | undefined): void

      Earliest prefix whose retained representation can resume generation. Irreversible transitions may preserve bytes while invalidating older precision boundaries. Reuse policy must not trim below this offset.

      Parameters

      • value: number | undefined

      Returns void

    • Stable storage identity for compatibility guards and persistence. REQUIRED: every capability predicate (isPlainKvCache, isRotating*, packages/inference/src/state/persistence.ts codecs) is a string compare on this value, so a missing override used to fail OPEN into wrong routing (PRs #42/#43: BatchedRotatingCache shipped without one and batched joins dropped running rows). Wrappers report their own kind plus the inner kind.

      Returns string

    • Drop the last n tokens (future writes overwrite them). bypass (default false → unchanged behavior) skips the isTrimmable guard for the speculative-decode rollback case (trim the last n ≤ γ tips right after a

      1 concat write); rotating caches then physically shrink the buffer tail.

      Parameters

      • n: number

      Returns void