getGeneratedNgrams(bannedNgrams, prevInputIds) {
        const ngramIdx = prevInputIds.slice(prevInputIds.length + 1 - this.no_repeat_ngram_size, prevInputIds.length);
        const banned = bannedNgrams.get(JSON.stringify(ngramIdx.map(Number))) ?? [];
        return banned;
    }
Generate n-grams from a sequence of token ids.
@param {Map<string, number[]>} bannedNgrams Map of banned n-grams
@param {bigint[]} prevInputIds List of previous input ids
@returns {number[]} Map of generated n-grams