mlx-bun library API
    Preparing search index...
    • apply_min_p: mask tokens whose probability is below minP · p(top token). Faithful to the reference (mlx-lm 0.31.3 sample_utils.apply_min_p): the threshold is computed in log space directly against the max logprob — scaled_min_p = max(lp) + log(minP) — no full sort; min_tokens_to_keep survivors are recovered with an argpartition on the top tail.

      Parameters

      • lp: MlxArray
      • minP: number
      • minTokensToKeep: number = 1

      Returns MlxArray