constructor(top_k, {
        filter_value = -Infinity,
        min_tokens_to_keep = 1,
    } = {}) {
        super();
        if (!Number.isInteger(top_k) || top_k < 0) {
            throw new Error(`\`top_k\` must be a positive integer, but is ${top_k}`)
        }

        this.top_k = Math.max(top_k, min_tokens_to_keep)
        this.filter_value = filter_value
    }
Create a `TopKLogitsWarper`.
@param {number} top_k If set to > 0, only the top `top_k` tokens are kept for generation.
@param {Object} options Additional options for the top-k sampling.
@param {number} [options.filter_value=-Infinity] All filtered values will be set to this float value.
@param {number} [options.min_tokens_to_keep=1] Minimum number of tokens that cannot be filtered.