---
title: "decodeBatch"
sidebar_label: "decodeBatch"
description: "Kotlin binding reference: decodeBatch."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Tokenizer](index.md)/[decodeBatch](decodeBatch.md)

# decodeBatch

[common]\
fun [decodeBatch](decodeBatch.md)(sequences: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[IntArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html)&gt;, skipSpecialTokens: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = true): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)&gt;

Decode many id sequences, one string per sequence, in order.

[common]\
fun [decodeBatch](decodeBatch.md)(ids: [Tensor](../Tensor/index.md), skipSpecialTokens: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = true): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)&gt;

Decode an ids tensor (Int32 or Int64): a `[S]` sequence yields one string, a padded `[B, S]` batch one string per row.

[common]\
fun [decodeBatch](decodeBatch.md)(ids: [Tensor](../Tensor/index.md), cuSeqlens: [Tensor](../Tensor/index.md), skipSpecialTokens: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = true): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)&gt;

Decode a flat varlen ids row sliced by its `[B + 1]` offset table, one string per sequence.