decode(
        token_ids,
        decode_args = {},
    ) {
        if (token_ids instanceof Tensor) {
            token_ids = prepareTensorForDecode(token_ids);
        }

        if (!Array.isArray(token_ids) || token_ids.length === 0 || !isIntegralNumber(token_ids[0])) {
            throw Error("token_ids must be a non-empty array of integers.");
        }

        return this.decode_single(token_ids, decode_args)
    }
Decodes a sequence of token IDs back to a string.

@param {number[]|bigint[]|Tensor} token_ids List/Tensor of token IDs to decode.
@param {Object} [decode_args={}]
@param {boolean} [decode_args.skip_special_tokens=false] If true, special tokens are removed from the output string.
@param {boolean} [decode_args.clean_up_tokenization_spaces=true] If true, spaces before punctuations and abbreviated forms are removed.

@returns {string} The decoded string.
@throws {Error} If `token_ids` is not a non-empty array of integers.